mirror of
https://gitee.com/vant-contrib/vant-weapp.git
synced 2025-04-06 03:58:05 +08:00
[new feature] Button: add loading-size prop (#1346)
This commit is contained in:
parent
e83908f543
commit
899b115418
@ -76,6 +76,7 @@
|
|||||||
| disabled | 是否禁用按钮 | `Boolean` | `false` |
|
| disabled | 是否禁用按钮 | `Boolean` | `false` |
|
||||||
| loading | 是否显示为加载状态 | `Boolean` | `false` |
|
| loading | 是否显示为加载状态 | `Boolean` | `false` |
|
||||||
| loading-text | 加载状态提示文字 | `String` | - |
|
| loading-text | 加载状态提示文字 | `String` | - |
|
||||||
|
| loading-size | 加载图标大小 | `String` | `20px` |
|
||||||
| open-type | 微信开放能力,具体支持可参考 [微信官方文档](https://mp.weixin.qq.com/debug/wxadoc/dev/component/button.html) | `String` | - |
|
| open-type | 微信开放能力,具体支持可参考 [微信官方文档](https://mp.weixin.qq.com/debug/wxadoc/dev/component/button.html) | `String` | - |
|
||||||
| app-parameter | 打开 APP 时,向 APP 传递的参数 | `String` | - |
|
| app-parameter | 打开 APP 时,向 APP 传递的参数 | `String` | - |
|
||||||
| lang | 指定返回用户信息的语言,zh_CN 简体中文,<br>zh_TW 繁体中文,en 英文 | `String` | `en` |
|
| lang | 指定返回用户信息的语言,zh_CN 简体中文,<br>zh_TW 繁体中文,en 英文 | `String` | `en` |
|
||||||
|
@ -22,6 +22,10 @@ VantComponent({
|
|||||||
size: {
|
size: {
|
||||||
type: String,
|
type: String,
|
||||||
value: 'normal'
|
value: 'normal'
|
||||||
|
},
|
||||||
|
loadingSize: {
|
||||||
|
type: String,
|
||||||
|
value: '20px'
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -3,7 +3,6 @@
|
|||||||
<button
|
<button
|
||||||
id="{{ id }}"
|
id="{{ id }}"
|
||||||
class="custom-class {{ utils.bem('button', [type, size, { block, round, plain, square, loading, disabled, unclickable: disabled || loading }]) }}"
|
class="custom-class {{ utils.bem('button', [type, size, { block, round, plain, square, loading, disabled, unclickable: disabled || loading }]) }}"
|
||||||
|
|
||||||
open-type="{{ openType }}"
|
open-type="{{ openType }}"
|
||||||
hover-class="van-button--active hover-class"
|
hover-class="van-button--active hover-class"
|
||||||
lang="{{ lang }}"
|
lang="{{ lang }}"
|
||||||
@ -15,7 +14,6 @@
|
|||||||
show-message-card="{{ showMessageCard }}"
|
show-message-card="{{ showMessageCard }}"
|
||||||
app-parameter="{{ appParameter }}"
|
app-parameter="{{ appParameter }}"
|
||||||
aria-label="{{ ariaLabel }}"
|
aria-label="{{ ariaLabel }}"
|
||||||
|
|
||||||
bindtap="onClick"
|
bindtap="onClick"
|
||||||
bindgetuserinfo="bindGetUserInfo"
|
bindgetuserinfo="bindGetUserInfo"
|
||||||
bindcontact="bindContact"
|
bindcontact="bindContact"
|
||||||
@ -27,7 +25,7 @@
|
|||||||
<block wx:if="{{ loading }}">
|
<block wx:if="{{ loading }}">
|
||||||
<van-loading
|
<van-loading
|
||||||
custom-class="loading-class"
|
custom-class="loading-class"
|
||||||
size="{{ size === 'mini' ? '14px' : '20px' }}"
|
size="{{ loadingSize }}"
|
||||||
color="{{ type === 'default' ? '#c9c9c9' : '' }}"
|
color="{{ type === 'default' ? '#c9c9c9' : '' }}"
|
||||||
/>
|
/>
|
||||||
<view
|
<view
|
||||||
|
Loading…
x
Reference in New Issue
Block a user