mirror of
https://gitee.com/vant-contrib/vant.git
synced 2025-04-06 03:57:59 +08:00
docs: update docs for params related to Picker events (#12619)
This commit is contained in:
parent
892d0186dc
commit
034a3ae31f
@ -188,9 +188,9 @@ export default {
|
||||
|
||||
| Event | Description | Arguments |
|
||||
| --- | --- | --- |
|
||||
| confirm | Emitted when the confirm button is clicked | _{ selectedValues, selectedOptions }_ |
|
||||
| cancel | Emitted when the cancel button is clicked | _{ selectedValues, selectedOptions }_ |
|
||||
| change | Emitted when current option is changed | _{ selectedValues, selectedOptions, columnIndex }_ |
|
||||
| confirm | Emitted when the confirm button is clicked | _{ selectedValues, selectedOptions, selectedIndexes }_ |
|
||||
| cancel | Emitted when the cancel button is clicked | _{ selectedValues, selectedOptions, selectedIndexes }_ |
|
||||
| change | Emitted when current option is changed | _{ selectedValues, selectedOptions, selectedIndexes, columnIndex }_ |
|
||||
|
||||
### Slots
|
||||
|
||||
|
@ -194,9 +194,9 @@ export default {
|
||||
|
||||
| 事件名 | 说明 | 回调参数 |
|
||||
| --- | --- | --- |
|
||||
| confirm | 点击完成按钮时触发 | _{ selectedValues, selectedOptions }_ |
|
||||
| cancel | 点击取消按钮时触发 | _{ selectedValues, selectedOptions }_ |
|
||||
| change | 选项改变时触发 | _{ selectedValues, selectedOptions, columnIndex }_ |
|
||||
| confirm | 点击完成按钮时触发 | _{ selectedValues, selectedOptions, selectedIndexes }_ |
|
||||
| cancel | 点击取消按钮时触发 | _{ selectedValues, selectedOptions, selectedIndexes }_ |
|
||||
| change | 选项改变时触发 | _{ selectedValues, selectedOptions, selectedIndexes, columnIndex }_ |
|
||||
|
||||
### Slots
|
||||
|
||||
|
@ -267,9 +267,9 @@ export default {
|
||||
|
||||
| Event | Description | Arguments |
|
||||
| --- | --- | --- |
|
||||
| confirm | Emitted when the confirm button is clicked | _{ selectedValues, selectedOptions }_ |
|
||||
| cancel | Emitted when the cancel button is clicked | _{ selectedValues, selectedOptions }_ |
|
||||
| change | Emitted when current option is changed | _{ selectedValues, selectedOptions, columnIndex }_ |
|
||||
| confirm | Emitted when the confirm button is clicked | _{ selectedValues, selectedOptions, selectedIndexes }_ |
|
||||
| cancel | Emitted when the cancel button is clicked | _{ selectedValues, selectedOptions, selectedIndexes }_ |
|
||||
| change | Emitted when current option is changed | _{ selectedValues, selectedOptions, selectedIndexes, columnIndex }_ |
|
||||
|
||||
### Slots
|
||||
|
||||
|
@ -268,9 +268,9 @@ export default {
|
||||
|
||||
| 事件名 | 说明 | 回调参数 |
|
||||
| --- | --- | --- |
|
||||
| confirm | 点击完成按钮时触发 | _{ selectedValues, selectedOptions }_ |
|
||||
| cancel | 点击取消按钮时触发 | _{ selectedValues, selectedOptions }_ |
|
||||
| change | 选项改变时触发 | _{ selectedValues, selectedOptions, columnIndex }_ |
|
||||
| confirm | 点击完成按钮时触发 | _{ selectedValues, selectedOptions, selectedIndexes }_ |
|
||||
| cancel | 点击取消按钮时触发 | _{ selectedValues, selectedOptions, selectedIndexes }_ |
|
||||
| change | 选项改变时触发 | _{ selectedValues, selectedOptions, selectedIndexes, columnIndex }_ |
|
||||
|
||||
### Slots
|
||||
|
||||
|
@ -122,18 +122,18 @@ test('should filter options when using filter prop to filter a time range', asyn
|
||||
});
|
||||
|
||||
const picker = wrapper.findComponent(Picker);
|
||||
let columns = picker.props('columns');
|
||||
let columns = picker.props('columns')!;
|
||||
expect(columns[0].length).toEqual(11);
|
||||
expect(columns[1].length).toEqual(20);
|
||||
expect(columns[0][0].value).toEqual('08');
|
||||
expect(columns[1][0].value).toEqual('40');
|
||||
|
||||
await wrapper.setProps({ modelValue: ['09', '00'] });
|
||||
columns = picker.props('columns');
|
||||
columns = picker.props('columns')!;
|
||||
expect(columns[1].length).toEqual(60);
|
||||
|
||||
await wrapper.setProps({ modelValue: ['18', '00'] });
|
||||
columns = picker.props('columns');
|
||||
columns = picker.props('columns')!;
|
||||
expect(columns[1].length).toEqual(21);
|
||||
expect(columns[1][20].value).toEqual('20');
|
||||
});
|
||||
|
Loading…
x
Reference in New Issue
Block a user