39 lines
1.3 KiB
XML
39 lines
1.3 KiB
XML
<import-sjs from="./index.sjs" name="utils" />
|
|
|
|
|
|
<button
|
|
form-type="{{htmlType}}"
|
|
hover-class="{{utils.getHoverClass(loading, type, activeClassName)}}"
|
|
scope="{{scope}}"
|
|
onTap="{{onTap ? 'onTap' : ''}}"
|
|
onGetAuthorize="{{onGetAuthorize}}"
|
|
onFollowLifestyle="{{onFollowLifestyle}}"
|
|
onError="{{onError}}"
|
|
onGetUserInfo="{{onGetUserInfo}}"
|
|
onGetPhoneNumber="{{onGetPhoneNumber}}"
|
|
catchTap="{{catchTap ? 'catchTap' : ''}}"
|
|
public-id="{{publicId}}"
|
|
open-type="{{openType}}"
|
|
class="ant-button {{inline ? `ant-button-inline ${utils.getClass(size)}` : ''}} {{`ant-button-${type}${danger ? '-danger' : ''}`}} {{(disabled || loading) ? 'ant-button-disabled' : ''}} {{className ? className : ''}}"
|
|
style="{{style}}"
|
|
>
|
|
<view class="ant-button-wrap">
|
|
<block a:if="{{icon}}">
|
|
<icon type="{{icon}}" />
|
|
</block>
|
|
<view class="ant-button-content-text {{icon ? 'ant-button-content-text-margin' : ''}}" >
|
|
<slot />
|
|
<view a:if="{{ !inline && subText}}" class="ant-button-content-subtext">
|
|
{{subText}}
|
|
</view>
|
|
</view>
|
|
<view a:if="{{loading}}" class="ant-button-content-loading-container">
|
|
<loading
|
|
type="mini"
|
|
color="currentColor"
|
|
className="ant-button-content-loading"
|
|
/>
|
|
</view>
|
|
</view>
|
|
</button>
|