feat separate order creation and contract menus

This commit is contained in:
david
2026-07-29 15:09:54 +08:00
parent 0af4e92c5e
commit 0c94c8033a
5 changed files with 40 additions and 8 deletions

View File

@@ -524,8 +524,13 @@ async function save() {
);
else await resourceApi.create(props.definition.resource, payload);
Message.success('保存成功');
formVisible.value = false;
await load();
if (route.meta.createMode && !editingIdentity.value) {
resetForm();
formVisible.value = true;
} else {
formVisible.value = false;
await load();
}
} catch (error) {
Message.error((error as Error).message);
} finally {
@@ -699,7 +704,7 @@ function searchRelation(resource: string | undefined, keyword: string) {
}
onMounted(async () => {
await load();
if (!route.meta.createMode) await load();
const actionFields = props.definition.detailActions?.flatMap((item) => item.fields ?? []) ?? [];
const relationPaths = new Set(
[...props.definition.fields, ...actionFields]