22 lines
1.7 KiB
Plaintext
Raw Normal View History

2021-01-12 18:04:14 +08:00
<!---------- wxs start ----------->
<wxs module="utils" src="../wxs/utils.wxs"></wxs>
<wxs module="computed" src="./index.wxs"></wxs>
<!---------- wxs end ----------->
<button id="{{ id }}" data-detail="{{ dataset }}" class="custom-class {{ utils.bem('button', [type, size, { block, round, plain, square, loading, disabled, hairline, unclickable: disabled || loading }]) }} {{ hairline ? 'van-hairline--surround' : '' }}" hover-class="van-button--active hover-class" lang="{{ lang }}" form-type="{{ formType }}" style="{{ computed.rootStyle({ plain, color }) }} {{ customStyle }}" open-type="{{ disabled ? '' : openType }}" business-id="{{ businessId }}" session-from="{{ sessionFrom }}" send-message-title="{{ sendMessageTitle }}" send-message-path="{{ sendMessagePath }}" send-message-img="{{ sendMessageImg }}" show-message-card="{{ showMessageCard }}" app-parameter="{{ appParameter }}" aria-label="{{ ariaLabel }}" bindtap="{{ !disabled ? 'onClick' : 'noop' }}" bindgetuserinfo="bindGetUserInfo" bindcontact="bindContact" bindgetphonenumber="bindGetPhoneNumber" binderror="bindError" bindlaunchapp="bindLaunchApp" bindopensetting="bindOpenSetting">
<block wx:if="{{ loading }}">
<van-loading custom-class="loading-class" size="{{ loadingSize }}" type="{{ loadingType }}" color="{{ computed.loadingColor({ type, color, plain }) }}"></van-loading>
<view wx:if="{{ loadingText }}" class="van-button__loading-text">
{{ loadingText }}
</view>
</block>
<block wx:else="">
<van-icon wx:if="{{ icon }}" size="1.2em" name="{{ icon }}" class-prefix="{{ classPrefix }}" class="van-button__icon" custom-style="line-height: inherit;"></van-icon>
<view class="van-button__text">
<slot></slot>
</view>
</block>
</button>