[improvement] GoodsAction: add disabled and loading props (#790)

[improvement] GoodsAction: add disabled and loading props
This commit is contained in:
neverland 2018-10-19 14:15:59 +08:00 committed by GitHub
parent a0a2c3120f
commit 853b28e048
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 6 additions and 0 deletions

View File

@ -6,6 +6,8 @@ VantComponent({
props: { props: {
text: String, text: String,
loading: Boolean,
disabled: Boolean,
type: { type: {
type: String, type: String,
value: 'danger' value: 'danger'

View File

@ -2,6 +2,8 @@
square square
size="large" size="large"
type="{{ type }}" type="{{ type }}"
loading="{{ loading }}"
disabled="{{ disabled }}"
bind:click="onClick" bind:click="onClick"
> >
{{ text }} {{ text }}

View File

@ -80,6 +80,8 @@ Page({
|-----------|-----------|-----------|-------------| |-----------|-----------|-----------|-------------|
| text | 按钮文字 | `String` | - | | text | 按钮文字 | `String` | - |
| type | 按钮类型 | `String` | `danger` | | type | 按钮类型 | `String` | `danger` |
| disabled | 是否禁用按钮 | `Boolean` | `false` |
| loading | 是否显示为加载状态 | `Boolean` | `false` |
| url | 跳转链接 | `String` | - | | url | 跳转链接 | `String` | - |
| link-type | 链接跳转类型,可选值为 `redirectTo` `switchTab` `reLaunch` | `String` | `navigateTo` | | link-type | 链接跳转类型,可选值为 `redirectTo` `switchTab` `reLaunch` | `String` | `navigateTo` |