docs: improve event param typing
This commit is contained in:
@@ -91,7 +91,7 @@ export default {
|
||||
|
||||
| Attribute | Description | Type | Default |
|
||||
|------|------|------|------|
|
||||
| v-model | Check status of Switch | *any* | `false` |
|
||||
| v-model | Check status of Switch | *ActiveValue \| InactiveValue* | `false` |
|
||||
| loading | Whether to show loading icon | *boolean* | `false` |
|
||||
| disabled | Whether to disable switch | *boolean* | `false` |
|
||||
| size `v2.2.11` | Size of switch | *number \| string* | `30px` |
|
||||
@@ -104,5 +104,5 @@ export default {
|
||||
|
||||
| Event | Description | Parameters |
|
||||
|------|------|------|
|
||||
| change | Triggered when check status changed | checked: is switch checked |
|
||||
| click `v2.2.11` | Triggered when clicked | event: Event |
|
||||
| change | Triggered when check status changed | *value: any* |
|
||||
| click `v2.2.11` | Triggered when clicked | *event: Event* |
|
||||
|
||||
@@ -109,12 +109,12 @@ export default {
|
||||
| size `v2.2.11` | 开关尺寸,默认单位为`px` | *number \| string* | `30px` |
|
||||
| active-color | 打开时的背景色 | *string* | `#1989fa` |
|
||||
| inactive-color | 关闭时的背景色 | *string* | `white` |
|
||||
| active-value | 打开时的值 | *any* | `true` |
|
||||
| inactive-value | 关闭时的值 | *any* | `false` |
|
||||
| active-value | 打开时对应的值 | *any* | `true` |
|
||||
| inactive-value | 关闭时对应的值 | *any* | `false` |
|
||||
|
||||
### Events
|
||||
|
||||
| 事件名 | 说明 | 回调参数 |
|
||||
|------|------|------|
|
||||
| change | 开关状态切换回调 | checked: 是否选中开关 |
|
||||
| click `v2.2.11` | 点击时触发 | event: Event |
|
||||
| change | 开关状态切换时触发 | *value: any* |
|
||||
| click `v2.2.11` | 点击时触发 | *event: Event* |
|
||||
|
||||
Reference in New Issue
Block a user