feat:重构按钮和icon组件
This commit is contained in:
@@ -0,0 +1,40 @@
|
||||
<button
|
||||
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="onClick"
|
||||
bindgetuserinfo="onGetUserInfo"
|
||||
bindcontact="onContact"
|
||||
bindgetphonenumber="onGetPhoneNumber"
|
||||
bindgetrealtimephonenumber="onGetRealTimePhoneNumber"
|
||||
bindagreeprivacyauthorization="onAgreePrivacyAuthorization"
|
||||
binderror="onError"
|
||||
bindlaunchapp="onLaunchApp"
|
||||
bindopensetting="onOpenSetting"
|
||||
bindchooseavatar="onChooseAvatar">
|
||||
|
||||
<view wx:if="{{ loading }}" class="toy-btn__spinner"
|
||||
style="width:{{loadingSize}};height:{{loadingSize}};border-top-color:{{resolvedLoadingColor}};border-right-color:{{resolvedLoadingColor}};"></view>
|
||||
|
||||
<toy-icon
|
||||
wx:elif="{{ icon }}"
|
||||
name="{{ icon }}"
|
||||
size="{{ resolvedIconSize }}"
|
||||
color="{{ resolvedIconColor }}"
|
||||
class-prefix="{{ iconClassPrefix }}"
|
||||
custom-class="toy-btn__icon" />
|
||||
|
||||
<view wx:if="{{ !iconOnly }}" class="toy-btn__label">
|
||||
<slot></slot>
|
||||
</view>
|
||||
</button>
|
||||
Reference in New Issue
Block a user