mirror of
https://gitee.com/vant-contrib/vant.git
synced 2025-04-05 19:41:42 +08:00
types(Area): fix missing onCancel typing (#9217)
This commit is contained in:
parent
e2a1d1ef32
commit
ac2940a365
@ -77,7 +77,7 @@ export default defineComponent({
|
||||
|
||||
props,
|
||||
|
||||
emits: ['change', 'confirm'],
|
||||
emits: ['change', 'confirm', 'cancel'],
|
||||
|
||||
setup(props, { emit, slots }) {
|
||||
const pickerRef = ref<ComponentInstance>();
|
||||
@ -293,6 +293,8 @@ export default defineComponent({
|
||||
emit('confirm', parseValues(values), index);
|
||||
};
|
||||
|
||||
const onCancel = () => emit('cancel');
|
||||
|
||||
onMounted(setValues);
|
||||
|
||||
watch(
|
||||
@ -323,6 +325,7 @@ export default defineComponent({
|
||||
columns={columns}
|
||||
columnsFieldNames={{ text: 'name' }}
|
||||
onChange={onChange}
|
||||
onCancel={onCancel}
|
||||
onConfirm={onConfirm}
|
||||
{...pick(props, INHERIT_PROPS)}
|
||||
/>
|
||||
|
@ -122,8 +122,8 @@ export default {
|
||||
|
||||
| 事件 | 说明 | 回调参数 |
|
||||
| ------- | ------------------ | ------------------------------ |
|
||||
| confirm | 点击右上方完成按钮 | _result: ConfirmResult_ |
|
||||
| cancel | 点击取消按钮时 | - |
|
||||
| confirm | 点击完成按钮时触发 | _result: ConfirmResult_ |
|
||||
| cancel | 点击取消按钮时触发 | - |
|
||||
| change | 选项改变时触发 | 所有列选中值,当前列对应的索引 |
|
||||
|
||||
### ConfirmResult 格式
|
||||
|
Loading…
x
Reference in New Issue
Block a user