纸通宝SAAS仓库
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 

44 lines
1.9 KiB

<wxs src="../wxs/utils.wxs" module="utils" />
<button id="{{ id }}"
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 }}" style="{{ baseStyle }} {{ customStyle }}"
open-type="{{ 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 }}" catchtap="{{ !disabled ? 'onClick' : 'noop' }}"
bindgetuserinfo="{{ !disabled ? 'bindGetUserInfo' : 'noop' }}" bindcontact="{{ !disabled ? 'bindContact' : 'noop' }}"
bindgetphonenumber="{{ !disabled ? 'bindGetPhoneNumber' : 'noop' }}"
binderror="{{ !disabled ? 'bindError' : 'noop' }}" bindlaunchapp="{{ !disabled ? 'bindLaunchApp' : 'noop' }}"
bindopensetting="{{ !disabled ? 'bindOpenSetting' : 'noop' }}">
<block wx:if="{{ loading }}">
<van-loading custom-class="loading-class" size="{{ loadingSize }}" type="{{ loadingType }}"
color="{{ loadingColor(type,color,plain) }}" />
<view wx:if="{{ loadingText }}" class="van-button__loading-text">
{{ loadingText }}
</view>
</block>
<block wx:else>
<van-icon wx:if="{{ icon }}" size="1.6em" name="{{ icon }}" class="van-button__icon"
custom-style="line-height: inherit;" />
<view class="van-button__text">
<slot />
</view>
</block>
</button>
<wxs module="loadingColor">
function get(type, color, plain) {
if (plain) {
return color ? color : '#c9c9c9';
}
if (type === 'default') {
return '#c9c9c9';
}
return 'white';
}
module.exports = get;
</wxs>