chore: 调整触发时机
This commit is contained in:
parent
4a8ca67500
commit
07e9483c91
@ -120,6 +120,13 @@ const [BasicDrawer, drawerApi] = useVbenDrawer({
|
|||||||
onConfirm: handleConfirm,
|
onConfirm: handleConfirm,
|
||||||
async onOpenChange(isOpen) {
|
async onOpenChange(isOpen) {
|
||||||
if (!isOpen) {
|
if (!isOpen) {
|
||||||
|
// 需要重置岗位选择
|
||||||
|
formApi.updateSchema([
|
||||||
|
{
|
||||||
|
componentProps: { options: [], placeholder: '请先选择部门' },
|
||||||
|
fieldName: 'postIds',
|
||||||
|
},
|
||||||
|
]);
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
drawerApi.drawerLoading(true);
|
drawerApi.drawerLoading(true);
|
||||||
@ -187,13 +194,6 @@ async function handleConfirm() {
|
|||||||
async function handleCancel() {
|
async function handleCancel() {
|
||||||
drawerApi.close();
|
drawerApi.close();
|
||||||
await formApi.resetForm();
|
await formApi.resetForm();
|
||||||
// 需要重置岗位选择
|
|
||||||
formApi.updateSchema([
|
|
||||||
{
|
|
||||||
componentProps: { options: [], placeholder: '请先选择部门' },
|
|
||||||
fieldName: 'postIds',
|
|
||||||
},
|
|
||||||
]);
|
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user