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