42 lines
1.5 KiB
Plaintext
42 lines
1.5 KiB
Plaintext
<wxs src="../wxs/base.wxs" module="Utils" />
|
|
|
|
<button
|
|
class="toy-button toy-button--{{type}} {{ disabled ? 'toy-button--disabled' : '' }} {{Utils.classNames({disabled: disabled, loading: loading })}}"
|
|
style="{{style}};{{width ? 'width:' + width + ';' : ''}};{{height ? 'height:' + height + ';' : ''}}"
|
|
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 || loading ? '' : 'onClick' }}"
|
|
bindgetuserinfo="onGetUserInfo"
|
|
bindcontact="onContact"
|
|
bindgetphonenumber="onGetPhoneNumber"
|
|
bindgetrealtimephonenumber="onGetRealTimePhoneNumber"
|
|
bindagreeprivacyauthorization="onAgreePrivacyAuthorization"
|
|
binderror="onError"
|
|
bindlaunchapp="onLaunchApp"
|
|
bindopensetting="onOpenSetting"
|
|
bindchooseavatar="onChooseAvatar">
|
|
<block wx:if="{{ loading }}">
|
|
<van-loading
|
|
custom-class="loading-class"
|
|
size="{{ loadingSize || iconSize }}"
|
|
type="{{ loadingType }}"
|
|
color="{{ loadingColor }}" />
|
|
</block>
|
|
<block wx:else>
|
|
<van-icon
|
|
wx:if="{{ icon }}"
|
|
size="1.2em"
|
|
name="{{ icon }}"
|
|
size="{{ iconSize }}"
|
|
color="{{ iconColor }}"
|
|
class-prefix="{{ iconClassPrefix }}"
|
|
class="toy-button__icon" />
|
|
</block>
|
|
<slot></slot>
|
|
</button>
|