fix: add sub model

This commit is contained in:
gchust 2025-06-24 12:18:48 +08:00
parent 20dd8ce576
commit 3b48e2a2c0
2 changed files with 3 additions and 3 deletions

View File

@ -12,6 +12,7 @@ import { FlowModel } from '../../models';
import { ModelConstructor } from '../../types'; import { ModelConstructor } from '../../types';
import { withFlowDesignMode } from '../common/withFlowDesignMode'; import { withFlowDesignMode } from '../common/withFlowDesignMode';
import LazyDropdown, { Item, ItemsType } from './LazyDropdown'; import LazyDropdown, { Item, ItemsType } from './LazyDropdown';
import _ from 'lodash';
export interface AddSubModelContext { export interface AddSubModelContext {
model: FlowModel; model: FlowModel;
@ -273,7 +274,7 @@ const AddSubModelButtonCore = function AddSubModelButton({
try { try {
addedModel = model.flowEngine.createModel({ addedModel = model.flowEngine.createModel({
...createOpts, ..._.cloneDeep(createOpts),
parentId: model.uid, parentId: model.uid,
subKey: subModelKey, subKey: subModelKey,
subType: subModelType, subType: subModelType,

View File

@ -140,8 +140,7 @@
"@nocobase/plugin-workflow-sql", "@nocobase/plugin-workflow-sql",
"@nocobase/plugin-workflow-notification", "@nocobase/plugin-workflow-notification",
"@nocobase/plugin-theme-editor", "@nocobase/plugin-theme-editor",
"@nocobase/plugin-block-template", "@nocobase/plugin-block-template"
"@nocobase/plugin-block-lowcode"
], ],
"repository": { "repository": {
"type": "git", "type": "git",