mirror of
https://gitee.com/vant-contrib/vant.git
synced 2025-04-23 18:00:27 +08:00
[Improvement] Button: add square prop (#1627)
This commit is contained in:
parent
559a04924b
commit
513b62053e
@ -71,6 +71,7 @@ Use `tag` prop to custom button tag
|
|||||||
| disabled | Whether to disable button | `Boolean` | `false` |
|
| disabled | Whether to disable button | `Boolean` | `false` |
|
||||||
| loading | Whether show loading status | `Boolean` | `false` |
|
| loading | Whether show loading status | `Boolean` | `false` |
|
||||||
| block | Whether to set display block | `Boolean` | `false` |
|
| block | Whether to set display block | `Boolean` | `false` |
|
||||||
|
| square | Whether to be square button | `Boolean` | `false` |
|
||||||
|
|
||||||
### Event
|
### Event
|
||||||
|
|
||||||
|
@ -9,6 +9,7 @@
|
|||||||
{
|
{
|
||||||
block,
|
block,
|
||||||
plain,
|
plain,
|
||||||
|
square,
|
||||||
loading,
|
loading,
|
||||||
disabled,
|
disabled,
|
||||||
unclickable: disabled || loading,
|
unclickable: disabled || loading,
|
||||||
@ -34,6 +35,7 @@ export default create({
|
|||||||
text: String,
|
text: String,
|
||||||
block: Boolean,
|
block: Boolean,
|
||||||
plain: Boolean,
|
plain: Boolean,
|
||||||
|
square: Boolean,
|
||||||
loading: Boolean,
|
loading: Boolean,
|
||||||
disabled: Boolean,
|
disabled: Boolean,
|
||||||
nativeType: String,
|
nativeType: String,
|
||||||
|
@ -76,6 +76,7 @@ Vue.use(Button);
|
|||||||
| disabled | 是否禁用 | `Boolean` | `false` |
|
| disabled | 是否禁用 | `Boolean` | `false` |
|
||||||
| loading | 是否显示为加载状态 | `Boolean` | `false` |
|
| loading | 是否显示为加载状态 | `Boolean` | `false` |
|
||||||
| block | 是否为块级元素 | `Boolean` | `false` |
|
| block | 是否为块级元素 | `Boolean` | `false` |
|
||||||
|
| square | 是否为方形按钮 | `Boolean` | `false` |
|
||||||
|
|
||||||
### Event
|
### Event
|
||||||
|
|
||||||
|
@ -143,4 +143,8 @@
|
|||||||
background-color: $button-disabled-background-color;
|
background-color: $button-disabled-background-color;
|
||||||
border: 1px solid $button-disabled-border-color;
|
border: 1px solid $button-disabled-border-color;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
&--square {
|
||||||
|
border-radius: 0;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user