mirror of
https://gitee.com/vant-contrib/vant.git
synced 2025-04-06 03:57:59 +08:00
docs: improve event param typing
This commit is contained in:
parent
779c83bd67
commit
aceaa2f739
@ -153,7 +153,7 @@ export default {
|
|||||||
|
|
||||||
| Event | Description | Arguments |
|
| Event | Description | Arguments |
|
||||||
|------|------|------|
|
|------|------|------|
|
||||||
| select | Triggered when click option | item, index |
|
| select | Triggered when click option | *action: Action, index: number* |
|
||||||
| cancel | Triggered when cancel click | - |
|
| cancel | Triggered when cancel click | - |
|
||||||
| click-overlay | Triggered when click overlay | - |
|
| click-overlay | Triggered when click overlay | - |
|
||||||
| open | Triggered when open ActionSheet | - |
|
| open | Triggered when open ActionSheet | - |
|
||||||
|
@ -169,7 +169,7 @@ export default {
|
|||||||
|
|
||||||
| 事件名 | 说明 | 回调参数 |
|
| 事件名 | 说明 | 回调参数 |
|
||||||
|------|------|------|
|
|------|------|------|
|
||||||
| select | 选中选项时触发,禁用或加载状态下不会触发 | item: 选项对应的对象, index: 选择对应的索引 |
|
| select | 选中选项时触发,禁用或加载状态下不会触发 | *action: Action, index: number* |
|
||||||
| cancel | 取消按钮点击时触发 | - |
|
| cancel | 取消按钮点击时触发 | - |
|
||||||
| click-overlay | 点击遮罩层时触发 | - |
|
| click-overlay | 点击遮罩层时触发 | - |
|
||||||
| open | 打开菜单时触发 | - |
|
| open | 打开菜单时触发 | - |
|
||||||
|
@ -125,5 +125,5 @@ Vue.use(Button);
|
|||||||
|
|
||||||
| Event | Description | Arguments |
|
| Event | Description | Arguments |
|
||||||
|------|------|------|
|
|------|------|------|
|
||||||
| click | Triggered when click button and not disabled or loading | event: Event |
|
| click | Triggered when click button and not disabled or loading | *event: Event* |
|
||||||
| touchstart | Triggered when touch start | event: TouchEvent |
|
| touchstart | Triggered when touch start | *event: TouchEvent* |
|
||||||
|
@ -148,5 +148,5 @@ Vue.use(Button);
|
|||||||
|
|
||||||
| 事件名 | 说明 | 回调参数 |
|
| 事件名 | 说明 | 回调参数 |
|
||||||
|------|------|------|
|
|------|------|------|
|
||||||
| click | 点击按钮,且按钮状态不为加载或禁用时触发 | event: Event |
|
| click | 点击按钮,且按钮状态不为加载或禁用时触发 | *event: Event* |
|
||||||
| touchstart | 开始触摸按钮时触发 | event: TouchEvent |
|
| touchstart | 开始触摸按钮时触发 | *event: TouchEvent* |
|
||||||
|
@ -249,8 +249,8 @@ Set `poppable` to `false`, the calendar will be displayed directly on the page i
|
|||||||
|
|
||||||
| Event | Description | Arguments |
|
| Event | Description | Arguments |
|
||||||
|------|------|------|
|
|------|------|------|
|
||||||
| select | Triggered when select date | value: Date \| Date[] |
|
| select | Triggered when select date | *value: Date \| Date[]* |
|
||||||
| confirm | Triggered after date selection is complete,if `show-confirm` is` true`, it is triggered after clicking the confirm button | value: Date \| Date[] |
|
| confirm | Triggered after date selection is complete,if `show-confirm` is` true`, it is triggered after clicking the confirm button | *value: Date \| Date[]* |
|
||||||
|
|
||||||
### Slots
|
### Slots
|
||||||
|
|
||||||
|
@ -251,8 +251,8 @@ export default {
|
|||||||
|
|
||||||
| 事件名 | 说明 | 回调参数 |
|
| 事件名 | 说明 | 回调参数 |
|
||||||
|------|------|------|
|
|------|------|------|
|
||||||
| select | 点击任意日期时触发 | value: Date \| Date[] |
|
| select | 点击任意日期时触发 | *value: Date \| Date[]* |
|
||||||
| confirm | 日期选择完成后触发,若`show-confirm`为`true`,则点击确认按钮后触发 | value: Date \| Date[] |
|
| confirm | 日期选择完成后触发,若`show-confirm`为`true`,则点击确认按钮后触发 | *value: Date \| Date[]* |
|
||||||
|
|
||||||
### Slots
|
### Slots
|
||||||
|
|
||||||
|
@ -82,8 +82,8 @@ Use slot to custom content.
|
|||||||
|
|
||||||
| Event | Description | Arguments |
|
| Event | Description | Arguments |
|
||||||
|------|------|------|
|
|------|------|------|
|
||||||
| click | Triggered when clicked | event: Event |
|
| click | Triggered when clicked | *event: Event* |
|
||||||
| click-thumb | Triggered when thumb clicked | event: Event |
|
| click-thumb | Triggered when thumb clicked | *event: Event* |
|
||||||
|
|
||||||
### Slots
|
### Slots
|
||||||
|
|
||||||
|
@ -84,8 +84,8 @@ Vue.use(Card);
|
|||||||
|
|
||||||
| 事件名 | 说明 | 回调参数 |
|
| 事件名 | 说明 | 回调参数 |
|
||||||
|------|------|------|
|
|------|------|------|
|
||||||
| click | 点击时触发 | event: Event |
|
| click | 点击时触发 | *event: Event* |
|
||||||
| click-thumb | 点击自定义图片时触发 | event: Event |
|
| click-thumb | 点击自定义图片时触发 | *event: Event* |
|
||||||
|
|
||||||
### Slots
|
### Slots
|
||||||
|
|
||||||
|
@ -137,7 +137,7 @@ Vue.use(CellGroup);
|
|||||||
|
|
||||||
| Event | Description | Arguments |
|
| Event | Description | Arguments |
|
||||||
|------|------|------|
|
|------|------|------|
|
||||||
| click | Triggered when click cell | event: Event |
|
| click | Triggered when click cell | *event: Event* |
|
||||||
|
|
||||||
### CellGroup Slots
|
### CellGroup Slots
|
||||||
|
|
||||||
|
@ -148,7 +148,7 @@ Vue.use(CellGroup);
|
|||||||
|
|
||||||
| 事件名 | 说明 | 回调参数 |
|
| 事件名 | 说明 | 回调参数 |
|
||||||
|------|------|------|
|
|------|------|------|
|
||||||
| click | 点击单元格时触发 | event: Event |
|
| click | 点击单元格时触发 | *event: Event* |
|
||||||
|
|
||||||
### CellGroup Slots
|
### CellGroup Slots
|
||||||
|
|
||||||
|
@ -112,10 +112,10 @@ Setting `type` to `flex` to enable flex layout
|
|||||||
|
|
||||||
| Event | Description | Arguments |
|
| Event | Description | Arguments |
|
||||||
|------|------|------|
|
|------|------|------|
|
||||||
| click | Triggered when click row | event: Event |
|
| click | Triggered when click row | *event: Event* |
|
||||||
|
|
||||||
### Col Events
|
### Col Events
|
||||||
|
|
||||||
| Event | Description | Arguments |
|
| Event | Description | Arguments |
|
||||||
|------|------|------|
|
|------|------|------|
|
||||||
| click | Triggered when click col | event: Event |
|
| click | Triggered when click col | *event: Event* |
|
||||||
|
@ -115,10 +115,10 @@ Layout 组件提供了`24列栅格`,通过在`Col`上添加`span`属性设置
|
|||||||
|
|
||||||
| 事件名 | 说明 | 回调参数 |
|
| 事件名 | 说明 | 回调参数 |
|
||||||
|------|------|------|
|
|------|------|------|
|
||||||
| click | 点击时触发 | event: Event |
|
| click | 点击时触发 | *event: Event* |
|
||||||
|
|
||||||
### Col Events
|
### Col Events
|
||||||
|
|
||||||
| 事件名 | 说明 | 回调参数 |
|
| 事件名 | 说明 | 回调参数 |
|
||||||
|------|------|------|
|
|------|------|------|
|
||||||
| click | 点击时触发 | event: Event |
|
| click | 点击时触发 | *event: Event* |
|
||||||
|
@ -145,7 +145,7 @@ export default {
|
|||||||
|
|
||||||
| Event | Description | Arguments |
|
| Event | Description | Arguments |
|
||||||
|------|------|------|
|
|------|------|------|
|
||||||
| click | Triggered when clicked | event: Event |
|
| click | Triggered when clicked | *event: Event* |
|
||||||
|
|
||||||
### ContactList Props
|
### ContactList Props
|
||||||
|
|
||||||
|
@ -149,7 +149,7 @@ export default {
|
|||||||
|
|
||||||
| 事件名 | 说明 | 回调参数 |
|
| 事件名 | 说明 | 回调参数 |
|
||||||
|------|------|------|
|
|------|------|------|
|
||||||
| click | 点击时触发 | event: Event |
|
| click | 点击时触发 | *event: Event* |
|
||||||
|
|
||||||
### ContactList Props
|
### ContactList Props
|
||||||
|
|
||||||
|
@ -130,15 +130,15 @@ export default {
|
|||||||
| Event | Description | Arguments |
|
| Event | Description | Arguments |
|
||||||
|------|------|------|
|
|------|------|------|
|
||||||
| finish | Triggered when count down finished | - |
|
| finish | Triggered when count down finished | - |
|
||||||
| change `v2.4.4` | Triggered when count down changed | timeData |
|
| change `v2.4.4` | Triggered when count down changed | *timeData: TimeData* |
|
||||||
|
|
||||||
### Slots
|
### Slots
|
||||||
|
|
||||||
| Name | Description | SlotProps |
|
| Name | Description | SlotProps |
|
||||||
|------|------|------|
|
|------|------|------|
|
||||||
| default | Custom Content | timeData |
|
| default | Custom Content | *timeData: TimeData* |
|
||||||
|
|
||||||
### timeData Structure
|
### TimeData Structure
|
||||||
|
|
||||||
| Name | Description | Type |
|
| Name | Description | Type |
|
||||||
|------|------|------|
|
|------|------|------|
|
||||||
|
@ -140,15 +140,15 @@ export default {
|
|||||||
| 事件名 | 说明 | 回调参数 |
|
| 事件名 | 说明 | 回调参数 |
|
||||||
|------|------|------|
|
|------|------|------|
|
||||||
| finish | 倒计时结束时触发 | - |
|
| finish | 倒计时结束时触发 | - |
|
||||||
| change `v2.4.4` | 倒计时变化时触发 | timeData |
|
| change `v2.4.4` | 倒计时变化时触发 | *timeData: TimeData* |
|
||||||
|
|
||||||
### Slots
|
### Slots
|
||||||
|
|
||||||
| 名称 | 说明 | SlotProps |
|
| 名称 | 说明 | SlotProps |
|
||||||
|------|------|------|
|
|------|------|------|
|
||||||
| default | 自定义内容 | timeData |
|
| default | 自定义内容 | *timeData: TimeData* |
|
||||||
|
|
||||||
### timeData 格式
|
### TimeData 格式
|
||||||
|
|
||||||
| 名称 | 说明 | 类型 |
|
| 名称 | 说明 | 类型 |
|
||||||
|------|------|------|
|
|------|------|------|
|
||||||
|
@ -249,13 +249,13 @@ Field support all native events of input tag
|
|||||||
|
|
||||||
| Event | Description | Parameters |
|
| Event | Description | Parameters |
|
||||||
|------|------|------|
|
|------|------|------|
|
||||||
| input | Triggered when input value changed | value: current value |
|
| input | Triggered when input value changed | *value: string* |
|
||||||
| focus | Triggered when input gets focus | event: Event |
|
| focus | Triggered when input gets focus | *event: Event* |
|
||||||
| blur | Triggered when input loses focus | event: Event |
|
| blur | Triggered when input loses focus | *event: Event* |
|
||||||
| clear | Triggered when click clear icon | event: Event |
|
| clear | Triggered when click clear icon | *event: Event* |
|
||||||
| click | Triggered when click Field | event: Event |
|
| click | Triggered when click Field | *event: Event* |
|
||||||
| click-left-icon | Triggered when click the left icon of Field | event: Event |
|
| click-left-icon | Triggered when click the left icon of Field | *event: Event* |
|
||||||
| click-right-icon | Triggered when click the right icon of Field | event: Event |
|
| click-right-icon | Triggered when click the right icon of Field | *event: Event* |
|
||||||
|
|
||||||
### Methods
|
### Methods
|
||||||
|
|
||||||
|
@ -268,13 +268,13 @@ export default {
|
|||||||
|
|
||||||
| 事件 | 说明 | 回调参数 |
|
| 事件 | 说明 | 回调参数 |
|
||||||
|------|------|------|
|
|------|------|------|
|
||||||
| input | 输入框内容变化时触发 | value: 输入框当前值 |
|
| input | 输入框内容变化时触发 | *value: string (当前输入的值)* |
|
||||||
| focus | 输入框获得焦点时触发 | event: Event |
|
| focus | 输入框获得焦点时触发 | *event: Event* |
|
||||||
| blur | 输入框失去焦点时触发 | event: Event |
|
| blur | 输入框失去焦点时触发 | *event: Event* |
|
||||||
| clear | 点击清除按钮时触发 | event: Event |
|
| clear | 点击清除按钮时触发 | *event: Event* |
|
||||||
| click | 点击时触发 | event: Event |
|
| click | 点击时触发 | *event: Event* |
|
||||||
| click-left-icon | 点击左侧图标时触发 | event: Event |
|
| click-left-icon | 点击左侧图标时触发 | *event: Event* |
|
||||||
| click-right-icon | 点击右侧图标时触发 | event: Event |
|
| click-right-icon | 点击右侧图标时触发 | *event: Event* |
|
||||||
|
|
||||||
### 方法
|
### 方法
|
||||||
|
|
||||||
|
@ -126,7 +126,7 @@ Vue.use(GridItem);
|
|||||||
|
|
||||||
| Event | Description | Arguments |
|
| Event | Description | Arguments |
|
||||||
|------|------|------|
|
|------|------|------|
|
||||||
| click | Triggered when clicked | event: Event |
|
| click | Triggered when clicked | *event: Event* |
|
||||||
|
|
||||||
### GridItem Slots
|
### GridItem Slots
|
||||||
|
|
||||||
|
@ -144,7 +144,7 @@ Vue.use(GridItem);
|
|||||||
|
|
||||||
| 事件名 | 说明 | 回调参数 |
|
| 事件名 | 说明 | 回调参数 |
|
||||||
|------|------|------|
|
|------|------|------|
|
||||||
| click | 点击格子时触发 | event: Event |
|
| click | 点击格子时触发 | *event: Event* |
|
||||||
|
|
||||||
### GridItem Slots
|
### GridItem Slots
|
||||||
|
|
||||||
|
@ -97,4 +97,4 @@ import 'vant/lib/icon/local.css';
|
|||||||
|
|
||||||
| Event | Description | Arguments |
|
| Event | Description | Arguments |
|
||||||
|------|------|------|
|
|------|------|------|
|
||||||
| click | Triggered when click icon | event: Event |
|
| click | Triggered when click icon | *event: Event* |
|
||||||
|
@ -103,4 +103,4 @@ import 'vant/lib/icon/local.css';
|
|||||||
|
|
||||||
| 事件名 | 说明 | 回调参数 |
|
| 事件名 | 说明 | 回调参数 |
|
||||||
|------|------|------|
|
|------|------|------|
|
||||||
| click | 点击图标时触发 | event: Event |
|
| click | 点击图标时触发 | *event: Event* |
|
||||||
|
@ -96,7 +96,7 @@ Vue.use(Lazyload);
|
|||||||
|
|
||||||
| Event | Description | Arguments |
|
| Event | Description | Arguments |
|
||||||
|------|------|------|
|
|------|------|------|
|
||||||
| click | Triggered when click image | event: Event |
|
| click | Triggered when click image | *event: Event* |
|
||||||
| load | Triggered when image loaded | - |
|
| load | Triggered when image loaded | - |
|
||||||
| error | Triggered when image load failed | - |
|
| error | Triggered when image load failed | - |
|
||||||
|
|
||||||
|
@ -128,7 +128,7 @@ Vue.use(Lazyload);
|
|||||||
|
|
||||||
| 事件名 | 说明 | 回调参数 |
|
| 事件名 | 说明 | 回调参数 |
|
||||||
|------|------|------|
|
|------|------|------|
|
||||||
| click | 点击图片时触发 | event: Event |
|
| click | 点击图片时触发 | *event: Event* |
|
||||||
| load | 图片加载完毕时触发 | - |
|
| load | 图片加载完毕时触发 | - |
|
||||||
| error | 图片加载失败时触发 | - |
|
| error | 图片加载失败时触发 | - |
|
||||||
|
|
||||||
|
@ -77,8 +77,8 @@ Vue.use(NoticeBar);
|
|||||||
|
|
||||||
| Event | Description | Arguments |
|
| Event | Description | Arguments |
|
||||||
|------|------|------|
|
|------|------|------|
|
||||||
| click | Triggered when click NoticeBar | event: Event |
|
| click | Triggered when click NoticeBar | *event: Event* |
|
||||||
| close | Triggered when closed | event: Event |
|
| close | Triggered when closed | *event: Event* |
|
||||||
|
|
||||||
### Slots
|
### Slots
|
||||||
|
|
||||||
|
@ -85,8 +85,8 @@ Vue.use(NoticeBar);
|
|||||||
|
|
||||||
| 事件名 | 说明 | 回调参数 |
|
| 事件名 | 说明 | 回调参数 |
|
||||||
|------|------|------|
|
|------|------|------|
|
||||||
| click | 点击通知栏时触发 | event: Event |
|
| click | 点击通知栏时触发 | *event: Event* |
|
||||||
| close | 关闭通知栏时触发 | event: Event |
|
| close | 关闭通知栏时触发 | *event: Event* |
|
||||||
|
|
||||||
### Slots
|
### Slots
|
||||||
|
|
||||||
|
@ -69,7 +69,7 @@ export default {
|
|||||||
|
|
||||||
| Event | Description | Arguments |
|
| Event | Description | Arguments |
|
||||||
|------|------|------|
|
|------|------|------|
|
||||||
| click | Triggered when clicked | event: Event |
|
| click | Triggered when clicked | *event: Event* |
|
||||||
|
|
||||||
### Slots
|
### Slots
|
||||||
|
|
||||||
|
@ -75,7 +75,7 @@ export default {
|
|||||||
|
|
||||||
| 事件名 | 说明 | 回调参数 |
|
| 事件名 | 说明 | 回调参数 |
|
||||||
|------|------|------|
|
|------|------|------|
|
||||||
| click | 点击时触发 | event: Event |
|
| click | 点击时触发 | *event: Event* |
|
||||||
|
|
||||||
### Slots
|
### Slots
|
||||||
|
|
||||||
|
@ -139,7 +139,7 @@ export default {
|
|||||||
|
|
||||||
| Event | Description | Arguments |
|
| Event | Description | Arguments |
|
||||||
|------|------|------|
|
|------|------|------|
|
||||||
| click | Triggered when click Popup | event: Event |
|
| click | Triggered when click Popup | *event: Event* |
|
||||||
| open | Triggered when open Popup | - |
|
| open | Triggered when open Popup | - |
|
||||||
| opened | Triggered when opened Popup | - |
|
| opened | Triggered when opened Popup | - |
|
||||||
| close | Triggered when close Popup | - |
|
| close | Triggered when close Popup | - |
|
||||||
|
@ -150,7 +150,7 @@ export default {
|
|||||||
|
|
||||||
| 事件名 | 说明 | 回调参数 |
|
| 事件名 | 说明 | 回调参数 |
|
||||||
|------|------|------|
|
|------|------|------|
|
||||||
| click | 点击弹出层时触发 | event: Event |
|
| click | 点击弹出层时触发 | *event: Event* |
|
||||||
| open | 打开弹出层时触发 | - |
|
| open | 打开弹出层时触发 | - |
|
||||||
| opened | 打开弹出层且动画结束后触发 | - |
|
| opened | 打开弹出层且动画结束后触发 | - |
|
||||||
| close | 关闭弹出层时触发 | - |
|
| close | 关闭弹出层时触发 | - |
|
||||||
|
@ -135,11 +135,11 @@ Use `action` slot to custom right button, `cancel` event will no longer be trigg
|
|||||||
|
|
||||||
| Event | Description | Arguments |
|
| Event | Description | Arguments |
|
||||||
|------|------|------|
|
|------|------|------|
|
||||||
| search | Triggered when confirm search | value: current value |
|
| search | Triggered when confirm search | *value: string* |
|
||||||
| input | Triggered when input value changed | value: current value |
|
| input | Triggered when input value changed | *value: string* |
|
||||||
| focus | Triggered when input gets focus | event: Event |
|
| focus | Triggered when input gets focus | *event: Event* |
|
||||||
| blur | Triggered when input loses focus | event: Event |
|
| blur | Triggered when input loses focus | *event: Event* |
|
||||||
| clear | Triggered when click clear icon | event: Event |
|
| clear | Triggered when click clear icon | *event: Event* |
|
||||||
| cancel | Triggered when click cancel button | - |
|
| cancel | Triggered when click cancel button | - |
|
||||||
|
|
||||||
### Slots
|
### Slots
|
||||||
|
@ -135,11 +135,11 @@ export default {
|
|||||||
|
|
||||||
| 事件名 | 说明 | 回调参数 |
|
| 事件名 | 说明 | 回调参数 |
|
||||||
|------|------|------|
|
|------|------|------|
|
||||||
| search | 确定搜索时触发 | value: 输入框当前值 |
|
| search | 确定搜索时触发 | *value: string (当前输入的值)* |
|
||||||
| input | 输入框内容变化时触发 | value: 输入框当前值 |
|
| input | 输入框内容变化时触发 | *value: string (当前输入的值)* |
|
||||||
| focus | 输入框获得焦点时触发 | event: Event |
|
| focus | 输入框获得焦点时触发 | *event: Event* |
|
||||||
| blur | 输入框失去焦点时触发 | event: Event |
|
| blur | 输入框失去焦点时触发 | *event: Event* |
|
||||||
| clear | 点击清除按钮后触发 | event: Event |
|
| clear | 点击清除按钮后触发 | *event: Event* |
|
||||||
| cancel | 点击取消按钮时触发 | - |
|
| cancel | 点击取消按钮时触发 | - |
|
||||||
|
|
||||||
### Slots
|
### Slots
|
||||||
|
@ -130,9 +130,9 @@ export default {
|
|||||||
|
|
||||||
| Event | Description | Arguments |
|
| Event | Description | Arguments |
|
||||||
|------|------|------|
|
|------|------|------|
|
||||||
| change | Triggered when value change | value: current value, detail: Detail info, contains name |
|
| change | Triggered when value change | *value: string, detail: { name: string }* |
|
||||||
| overlimit | Triggered when click disabled button | - |
|
| overlimit | Triggered when click disabled button | - |
|
||||||
| plus | Triggered when click plus button | - |
|
| plus | Triggered when click plus button | - |
|
||||||
| minus | Triggered when click minus button | - |
|
| minus | Triggered when click minus button | - |
|
||||||
| focus | Triggered when input focused | event: Event |
|
| focus | Triggered when input focused | *event: Event* |
|
||||||
| blur | Triggered when input blured | event: Event |
|
| blur | Triggered when input blured | *event: Event* |
|
||||||
|
@ -131,7 +131,7 @@ export default {
|
|||||||
|
|
||||||
| 参数 | 说明 | 类型 | 默认值 |
|
| 参数 | 说明 | 类型 | 默认值 |
|
||||||
|------|------|------|------|
|
|------|------|------|------|
|
||||||
| v-model | 当前输入值 | *number \| string* | - |
|
| v-model | 当前输入的值 | *number \| string* | - |
|
||||||
| min | 最小值 | *number \| string* | `1` |
|
| min | 最小值 | *number \| string* | `1` |
|
||||||
| max | 最大值 | *number \| string* | - |
|
| max | 最大值 | *number \| string* | - |
|
||||||
| default-value | 初始值,当 v-model 为空时生效 | *number \| string* | `1` |
|
| default-value | 初始值,当 v-model 为空时生效 | *number \| string* | `1` |
|
||||||
@ -154,9 +154,9 @@ export default {
|
|||||||
|
|
||||||
| 事件名 | 说明 | 回调参数 |
|
| 事件名 | 说明 | 回调参数 |
|
||||||
|------|------|------|
|
|------|------|------|
|
||||||
| change | 当绑定值变化时触发的事件 | value: 当前组件的值, detail: 额外信息,包含 name 的字段 |
|
| change | 当绑定值变化时触发的事件 | *value: string, detail: { name: string }* |
|
||||||
| overlimit | 点击不可用的按钮时触发 | - |
|
| overlimit | 点击不可用的按钮时触发 | - |
|
||||||
| plus | 点击增加按钮时触发 | - |
|
| plus | 点击增加按钮时触发 | - |
|
||||||
| minus | 点击减少按钮时触发 | - |
|
| minus | 点击减少按钮时触发 | - |
|
||||||
| focus | 输入框聚焦时触发 | event: Event |
|
| focus | 输入框聚焦时触发 | *event: Event* |
|
||||||
| blur | 输入框失焦时触发 | event: Event |
|
| blur | 输入框失焦时触发 | *event: Event* |
|
||||||
|
@ -170,7 +170,7 @@ export default {
|
|||||||
|
|
||||||
| Event | Description | Arguments |
|
| Event | Description | Arguments |
|
||||||
|------|------|------|
|
|------|------|------|
|
||||||
| click | Triggered when clicked | event: Event |
|
| click | Triggered when clicked | *event: Event* |
|
||||||
|
|
||||||
### Swipe Methods
|
### Swipe Methods
|
||||||
|
|
||||||
|
@ -176,7 +176,7 @@ export default {
|
|||||||
|
|
||||||
| 事件名 | 说明 | 回调参数 |
|
| 事件名 | 说明 | 回调参数 |
|
||||||
|------|------|------|
|
|------|------|------|
|
||||||
| click | 点击时触发 | event: Event |
|
| click | 点击时触发 | *event: Event* |
|
||||||
|
|
||||||
### Swipe 方法
|
### Swipe 方法
|
||||||
|
|
||||||
|
@ -91,7 +91,7 @@ export default {
|
|||||||
|
|
||||||
| Attribute | Description | Type | 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` |
|
| loading | Whether to show loading icon | *boolean* | `false` |
|
||||||
| disabled | Whether to disable switch | *boolean* | `false` |
|
| disabled | Whether to disable switch | *boolean* | `false` |
|
||||||
| size `v2.2.11` | Size of switch | *number \| string* | `30px` |
|
| size `v2.2.11` | Size of switch | *number \| string* | `30px` |
|
||||||
@ -104,5 +104,5 @@ export default {
|
|||||||
|
|
||||||
| Event | Description | Parameters |
|
| Event | Description | Parameters |
|
||||||
|------|------|------|
|
|------|------|------|
|
||||||
| change | Triggered when check status changed | checked: is switch checked |
|
| change | Triggered when check status changed | *value: any* |
|
||||||
| click `v2.2.11` | Triggered when clicked | event: Event |
|
| click `v2.2.11` | Triggered when clicked | *event: Event* |
|
||||||
|
@ -109,12 +109,12 @@ export default {
|
|||||||
| size `v2.2.11` | 开关尺寸,默认单位为`px` | *number \| string* | `30px` |
|
| size `v2.2.11` | 开关尺寸,默认单位为`px` | *number \| string* | `30px` |
|
||||||
| active-color | 打开时的背景色 | *string* | `#1989fa` |
|
| active-color | 打开时的背景色 | *string* | `#1989fa` |
|
||||||
| inactive-color | 关闭时的背景色 | *string* | `white` |
|
| inactive-color | 关闭时的背景色 | *string* | `white` |
|
||||||
| active-value | 打开时的值 | *any* | `true` |
|
| active-value | 打开时对应的值 | *any* | `true` |
|
||||||
| inactive-value | 关闭时的值 | *any* | `false` |
|
| inactive-value | 关闭时对应的值 | *any* | `false` |
|
||||||
|
|
||||||
### Events
|
### Events
|
||||||
|
|
||||||
| 事件名 | 说明 | 回调参数 |
|
| 事件名 | 说明 | 回调参数 |
|
||||||
|------|------|------|
|
|------|------|------|
|
||||||
| change | 开关状态切换回调 | checked: 是否选中开关 |
|
| change | 开关状态切换时触发 | *value: any* |
|
||||||
| click `v2.2.11` | 点击时触发 | event: Event |
|
| click `v2.2.11` | 点击时触发 | *event: Event* |
|
||||||
|
@ -135,5 +135,5 @@ export default {
|
|||||||
|
|
||||||
| Event | Description | Arguments |
|
| Event | Description | Arguments |
|
||||||
|------|------|------|
|
|------|------|------|
|
||||||
| click | Triggered when clicked | event: Event |
|
| click | Triggered when clicked | *event: Event* |
|
||||||
| close | Triggered when click close icon | - |
|
| close | Triggered when click close icon | - |
|
||||||
|
@ -145,5 +145,5 @@ export default {
|
|||||||
|
|
||||||
| 事件名 | 说明 | 回调参数 |
|
| 事件名 | 说明 | 回调参数 |
|
||||||
|------|------|------|
|
|------|------|------|
|
||||||
| click | 点击时触发 | event: Event |
|
| click | 点击时触发 | *event: Event* |
|
||||||
| close | 关闭标签时触发 | - |
|
| close | 关闭标签时触发 | - |
|
||||||
|
Loading…
x
Reference in New Issue
Block a user