42 lines
1.6 KiB
Plaintext
42 lines
1.6 KiB
Plaintext
<button
|
|
data-id="test-toy-button-id"
|
|
class="{{rootClassName}} custom-class"
|
|
style="{{rootStyle}}"
|
|
session-from="{{ sessionFrom }}"
|
|
open-type="{{ disabled || loading ? '' : openType }}"
|
|
send-message-title="{{ sendMessageTitle }}"
|
|
send-message-path="{{ sendMessagePath }}"
|
|
send-message-img="{{ sendMessageImg }}"
|
|
show-message-card="{{ showMessageCard }}"
|
|
app-parameter="{{ appParameter }}"
|
|
aria-label="{{ ariaLabel }}"
|
|
bindtouchstart="onTouchStart"
|
|
bindtouchend="onTouchEnd"
|
|
bindtouchcancel="onTouchCancel"
|
|
bind:tap="{{ 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 }}">
|
|
<view
|
|
class="loading-class toy-button__spinner toy-button__spinner--{{loadingType}}"
|
|
style="width:{{resolvedLoadingSize}};height:{{resolvedLoadingSize}};border-color:transparent;border-top-color:{{resolvedLoadingColor}};border-right-color:{{resolvedLoadingColor}};"></view>
|
|
</block>
|
|
<block wx:else>
|
|
<toy-icon
|
|
wx:if="{{ icon }}"
|
|
name="{{ icon }}"
|
|
size="{{ resolvedIconSize }}"
|
|
color="{{ resolvedIconColor }}"
|
|
class-prefix="{{ iconClassPrefix }}"
|
|
custom-class="toy-button__icon" />
|
|
</block>
|
|
<slot></slot>
|
|
</button>
|