mirror of
https://gitee.com/vant-contrib/vant-weapp.git
synced 2025-04-06 03:58:05 +08:00
[improvement] Button: add id prop (#650)
This commit is contained in:
parent
0c4e200d40
commit
8b65086bd4
@ -57,6 +57,7 @@
|
|||||||
|
|
||||||
| 参数 | 说明 | 类型 | 默认值 |
|
| 参数 | 说明 | 类型 | 默认值 |
|
||||||
|-----------|-----------|-----------|-------------|
|
|-----------|-----------|-----------|-------------|
|
||||||
|
| id | 标识符 | `String` | - |
|
||||||
| type | 按钮类型,可选值为 `primary` `warning` `danger` | `String` | `default` |
|
| type | 按钮类型,可选值为 `primary` `warning` `danger` | `String` | `default` |
|
||||||
| size | 按钮尺寸,可选值为 `normal` `large` `small` `mini` | `String` | `normal` |
|
| size | 按钮尺寸,可选值为 `normal` `large` `small` `mini` | `String` | `normal` |
|
||||||
| plain | 是否为朴素按钮 | `Boolean` | `false` |
|
| plain | 是否为朴素按钮 | `Boolean` | `false` |
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
<button
|
<button
|
||||||
class="custom-class van-button {{ classes }}"
|
class="custom-class van-button {{ classes }}"
|
||||||
|
id="{{ id }}"
|
||||||
disabled="{{ disabled }}"
|
disabled="{{ disabled }}"
|
||||||
hover-class="button-hover"
|
hover-class="button-hover"
|
||||||
open-type="{{ openType }}"
|
open-type="{{ openType }}"
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
export const button = Behavior({
|
export const button = Behavior({
|
||||||
properties: {
|
properties: {
|
||||||
|
id: String,
|
||||||
loading: Boolean,
|
loading: Boolean,
|
||||||
openType: String,
|
openType: String,
|
||||||
appParameter: String,
|
appParameter: String,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user