feat separate order creation and contract menus
This commit is contained in:
@@ -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]
|
||||
|
||||
Reference in New Issue
Block a user