mirror of
https://github.com/youzan/vant.git
synced 2025-10-18 17:51:54 +00:00
[Improvement] Area: add change event (#1019)
This commit is contained in:
@@ -55,6 +55,7 @@ Set `columns-num` with 2, you'll have a 2 level picker.
|
||||
|-----------|-----------|-----------|
|
||||
| confirm | triggers when clicking the confirm button | an array |
|
||||
| cancel | triggers when clicking the cancel button | - |
|
||||
| change | Triggered when current option changed | Picker instance, current values,column index |
|
||||
|
||||
### Data Structure
|
||||
|
||||
|
@@ -145,7 +145,7 @@ Picker events will pass different parameters according to the columns are single
|
||||
|-----------|-----------|-----------|
|
||||
| confirm | Triggered when click confirm button | Single column:current value,current index<br>Multiple columns:current values,current indexes |
|
||||
| cancel | Triggered when click cancel button | Single column:current value,current index<br>Multiple columns:current values,current indexes |
|
||||
| change | Triggered when current option changed | Single column:current value,current index<br>Multiple columns:current values,column index |
|
||||
| change | Triggered when current option changed | Single column:Picker instance, current value,current index<br>Multiple columns:Picker instance, current values,column index |
|
||||
|
||||
|
||||
### Data struct of columns
|
||||
|
@@ -53,6 +53,7 @@ Vue.use(Area);
|
||||
| --- | --- | --- |
|
||||
| confirm | 点击右上方完成按钮 | 一个数组参数,具体格式看下方数据格式章节 |
|
||||
| cancel | 点击取消按钮时 | - |
|
||||
| change | 选项改变时触发 | Picker 实例,所有列选中值,当前列对应的索引 |
|
||||
|
||||
### 数据格式
|
||||
|
||||
|
@@ -147,7 +147,7 @@ Picker 组件的事件会根据 columns 是单列或多列返回不同的参数
|
||||
|-----------|-----------|-----------|
|
||||
| confirm | 点击完成按钮时触发 | 单列:选中值,选中值对应的索引<br>多列:所有列选中值,所有列选中值对应的索引 |
|
||||
| cancel | 点击取消按钮时触发 | 单列:选中值,选中值对应的索引<br>多列:所有列选中值,所有列选中值对应的索引 |
|
||||
| change | 选项改变时触发 | 单列:选中值,选中值对应的索引<br>多列:所有列选中值,当前列对应的索引 |
|
||||
| change | 选项改变时触发 | 单列:Picker 实例,选中值,选中值对应的索引<br>多列:Picker 实例,所有列选中值,当前列对应的索引 |
|
||||
|
||||
|
||||
### Columns 数据结构
|
||||
|
Reference in New Issue
Block a user