perf: 完善系统管理-部门管理页面

This commit is contained in:
xiaoxian521
2023-05-11 15:11:58 +08:00
parent 47f951312e
commit a71bf0befb
13 changed files with 576 additions and 179 deletions

View File

@@ -22,7 +22,7 @@ const footerButtons = computed(() => {
const done = () =>
closeDialog(options, index, { command: "cancel" });
if (options?.beforeCancel && isFunction(options?.beforeCancel)) {
options.beforeCancel(done);
options.beforeCancel(done, { options, index });
} else {
done();
}
@@ -37,7 +37,7 @@ const footerButtons = computed(() => {
const done = () =>
closeDialog(options, index, { command: "sure" });
if (options?.beforeSure && isFunction(options?.beforeSure)) {
options.beforeSure(done);
options.beforeSure(done, { options, index });
} else {
done();
}

View File

@@ -190,9 +190,27 @@ interface DialogOptions extends DialogProps {
index: number;
}) => void;
/** 点击底部取消按钮的回调,会暂停 `Dialog` 的关闭. 回调函数内执行 `done` 参数方法的时候才是真正关闭对话框的时候 */
beforeCancel?: (done: Function) => void;
beforeCancel?: (
done: Function,
{
options,
index
}: {
options: DialogOptions;
index: number;
}
) => void;
/** 点击底部确定按钮的回调,会暂停 `Dialog` 的关闭. 回调函数内执行 `done` 参数方法的时候才是真正关闭对话框的时候 */
beforeSure?: (done: Function) => void;
beforeSure?: (
done: Function,
{
options,
index
}: {
options: DialogOptions;
index: number;
}
) => void;
}
export type { EventType, ArgsType, DialogProps, ButtonProps, DialogOptions };