|
@@ -11,6 +11,7 @@ import { ICompKeys, Layout } from "../../typings";
|
|
|
import CompSave from "../../components/CompSave";
|
|
|
import { getKeyThenIncreaseKey } from "ant-design-vue/lib/message";
|
|
|
import { cloneObj, createObj, history } from "../../objects/DesignTemp/factory";
|
|
|
+import { DesignTemp } from "../../objects/DesignTemp";
|
|
|
|
|
|
const ctrlState = {
|
|
|
selected: [] as string[],
|
|
@@ -1110,20 +1111,20 @@ export const editActions = EditorModule.action({
|
|
|
const frameData = await this.https.getDesignDetail(record._id, {
|
|
|
isSys: true,
|
|
|
});
|
|
|
- const { compMap, content, desc, thumbnail, title, _id } = frameData.result;
|
|
|
+ const result = new DesignTemp(frameData.result);
|
|
|
+ const { _id, ...rest } = result;
|
|
|
|
|
|
const designData = {
|
|
|
- _id: ctrl.designData._id,
|
|
|
+ ...ctrl.designData,
|
|
|
version: ctrl.designData.version,
|
|
|
- compMap,
|
|
|
- content,
|
|
|
- desc,
|
|
|
- thumbnail,
|
|
|
- title,
|
|
|
+ ...rest,
|
|
|
};
|
|
|
|
|
|
this.controls.editorCtrl.clickPickComp("root");
|
|
|
ctrl.setDesignData(designData);
|
|
|
+ setTimeout(() => {
|
|
|
+ this.controls.editorCtrl.autoInScreen();
|
|
|
+ }, 0);
|
|
|
|
|
|
ctrl.state.setDesignId(_id as string);
|
|
|
},
|