yujialong 1 year ago
parent d83017600f
commit 34b2318a5b
  1. 3
      src/mixins/page/index.js

@ -71,15 +71,14 @@ export default {
this.id = json.id this.id = json.id
const str = json[json.state ? 'theEditedJson' : 'jsonBeforeEditing'] const str = json[json.state ? 'theEditedJson' : 'jsonBeforeEditing']
const list = JSON.parse(str) const list = JSON.parse(str)
this.originModules = str // 原始json,用以页面离开的时候判断是否需要提示保存
list.map((e, i) => { list.map((e, i) => {
console.log("🚀 ~ file: index.js:77 ~ list.map ~ e:", e, this.modules[i])
if (this.modules[i].forms) e.forms = this.modules[i].forms if (this.modules[i].forms) e.forms = this.modules[i].forms
if (this.withOriginForm.includes(e.type) && !e.originForm) { if (this.withOriginForm.includes(e.type) && !e.originForm) {
e.originForm = modules[i].originForm e.originForm = modules[i].originForm
} }
}) })
this.originModules = JSON.stringify(list) // 原始json,用以页面离开的时候判断是否需要提示保存
this.modules = list this.modules = list
console.log("🚀 ~ file: index.js:85 ~ this.$post ~ list:", list) console.log("🚀 ~ file: index.js:85 ~ this.$post ~ list:", list)
} }

Loading…
Cancel
Save