fix: 脑图点击保存整体布局发生变化
This commit is contained in:
parent
963d4df7da
commit
c12aecfa6f
|
@ -11,7 +11,7 @@
|
||||||
:tag-edit-check="tagEditCheck"
|
:tag-edit-check="tagEditCheck"
|
||||||
:priority-disable-check="priorityDisableCheck"
|
:priority-disable-check="priorityDisableCheck"
|
||||||
:distinct-tags="distinctTags"
|
:distinct-tags="distinctTags"
|
||||||
:default-mold="minderModel"
|
:default-mold="defaultMode"
|
||||||
@afterMount="$emit('afterMount')"
|
@afterMount="$emit('afterMount')"
|
||||||
@moldChange="handleMoldChange"
|
@moldChange="handleMoldChange"
|
||||||
@save="save"
|
@save="save"
|
||||||
|
@ -83,12 +83,22 @@ export default {
|
||||||
},
|
},
|
||||||
isActive: true,
|
isActive: true,
|
||||||
isFullScreen: false,
|
isFullScreen: false,
|
||||||
height: ''
|
height: '',
|
||||||
|
defaultMode: 3
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
this.height = document.body.clientHeight - 340;
|
this.height = document.body.clientHeight - 340;
|
||||||
},
|
},
|
||||||
|
mounted() {
|
||||||
|
this.defaultMode = 3;
|
||||||
|
if (this.minderKey) {
|
||||||
|
let model = localStorage.getItem(this.minderKey + 'minderModel');
|
||||||
|
if (model) {
|
||||||
|
this.defaultMode = Number.parseInt(model);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
watch: {
|
watch: {
|
||||||
dataMap() {
|
dataMap() {
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
|
@ -101,22 +111,12 @@ export default {
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
computed: {
|
|
||||||
minderModel() {
|
|
||||||
if (this.minderKey) {
|
|
||||||
let model = localStorage.getItem(this.minderKey + 'minderModel');
|
|
||||||
if (model) {
|
|
||||||
return Number.parseInt(model);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return 3;
|
|
||||||
}
|
|
||||||
},
|
|
||||||
methods: {
|
methods: {
|
||||||
handleMoldChange(index) {
|
handleMoldChange(index) {
|
||||||
if (this.minderKey) {
|
if (this.minderKey) {
|
||||||
localStorage.setItem(this.minderKey + 'minderModel', index);
|
localStorage.setItem(this.minderKey + 'minderModel', index);
|
||||||
}
|
}
|
||||||
|
this.defaultMode = index;
|
||||||
},
|
},
|
||||||
save(data) {
|
save(data) {
|
||||||
this.$emit('save', data)
|
this.$emit('save', data)
|
||||||
|
|
Loading…
Reference in New Issue