|
@@ -78,7 +78,7 @@ import { getCardHeadModel } from "../../../../card/elementModel";
|
|
import TopicElementPreview from "../../../../card/components/TopicElementPreview";
|
|
import TopicElementPreview from "../../../../card/components/TopicElementPreview";
|
|
import CardView from "../../../../card/components/CardView.vue";
|
|
import CardView from "../../../../card/components/CardView.vue";
|
|
import CardHeadSample from "../../../../card/elements/card-head/CardHead";
|
|
import CardHeadSample from "../../../../card/elements/card-head/CardHead";
|
|
-import { objTypeOf } from "@/plugins/utils";
|
|
|
|
|
|
+import { deepCopy, objTypeOf } from "@/plugins/utils";
|
|
// ceshi
|
|
// ceshi
|
|
// import paperData from "./paper.json";
|
|
// import paperData from "./paper.json";
|
|
|
|
|
|
@@ -102,6 +102,7 @@ export default {
|
|
modalIsShow: false,
|
|
modalIsShow: false,
|
|
paperInfo: {},
|
|
paperInfo: {},
|
|
answers: {},
|
|
answers: {},
|
|
|
|
+ cachePages: [],
|
|
};
|
|
};
|
|
},
|
|
},
|
|
computed: {
|
|
computed: {
|
|
@@ -184,6 +185,8 @@ export default {
|
|
|
|
|
|
this.$nextTick(() => {
|
|
this.$nextTick(() => {
|
|
this.rebuildPages();
|
|
this.rebuildPages();
|
|
|
|
+ this.cachePages = deepCopy(this.pages);
|
|
|
|
+ console.log(this.cachePages);
|
|
this.updatePageField();
|
|
this.updatePageField();
|
|
|
|
|
|
this.$nextTick(() => {
|
|
this.$nextTick(() => {
|
|
@@ -339,7 +342,7 @@ export default {
|
|
async buildData() {
|
|
async buildData() {
|
|
const model = this.$refs.CardView.getPageModel({
|
|
const model = this.$refs.CardView.getPageModel({
|
|
cardConfig: this.cardConfig,
|
|
cardConfig: this.cardConfig,
|
|
- pages: this.pages,
|
|
|
|
|
|
+ pages: this.cachePages,
|
|
answers: this.answers,
|
|
answers: this.answers,
|
|
});
|
|
});
|
|
const htmlContent = this.$refs.CardView.getPreviewTemp(
|
|
const htmlContent = this.$refs.CardView.getPreviewTemp(
|
|
@@ -367,6 +370,7 @@ export default {
|
|
},
|
|
},
|
|
emitResult(data) {
|
|
emitResult(data) {
|
|
// console.log(data);
|
|
// console.log(data);
|
|
|
|
+ this.initState();
|
|
this.loading = false;
|
|
this.loading = false;
|
|
this.$emit("confirm", data);
|
|
this.$emit("confirm", data);
|
|
this.cancel();
|
|
this.cancel();
|