refator: 将脑图整体布局保存在浏览器端
This commit is contained in:
parent
c8c9c4460c
commit
ee0a41fa02
|
@ -50,7 +50,7 @@
|
|||
"vue-float-action-button": "^0.6.6",
|
||||
"vue-i18n": "^8.15.3",
|
||||
"vue-jsonpath-picker": "^1.1.5",
|
||||
"vue-minder-editor-plus": "^1.0.23",
|
||||
"vue-minder-editor-plus": "^1.0.24",
|
||||
"vue-papa-parse": "^2.0.0",
|
||||
"vue-pdf": "^4.2.0",
|
||||
"vue-router": "^3.1.3",
|
||||
|
|
|
@ -11,7 +11,9 @@
|
|||
:tag-edit-check="tagEditCheck"
|
||||
:priority-disable-check="priorityDisableCheck"
|
||||
:distinct-tags="distinctTags"
|
||||
:default-mold="minderModel"
|
||||
@afterMount="$emit('afterMount')"
|
||||
@moldChange="handleMoldChange"
|
||||
@save="save"
|
||||
/>
|
||||
</div>
|
||||
|
@ -25,6 +27,7 @@ export default {
|
|||
name: "MsModuleMinder",
|
||||
components: {MsFullScreenButton},
|
||||
props: {
|
||||
minderKey: String,
|
||||
treeNodes: {
|
||||
type: Array,
|
||||
default() {
|
||||
|
@ -98,7 +101,23 @@ export default {
|
|||
})
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
minderModel() {
|
||||
if (this.minderKey) {
|
||||
let model = localStorage.getItem(this.minderKey + 'minderModel');
|
||||
if (model) {
|
||||
return Number.parseInt(model);
|
||||
}
|
||||
}
|
||||
return 3;
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
handleMoldChange(index) {
|
||||
if (this.minderKey) {
|
||||
localStorage.setItem(this.minderKey + 'minderModel', index);
|
||||
}
|
||||
},
|
||||
save(data) {
|
||||
this.$emit('save', data)
|
||||
},
|
||||
|
|
|
@ -4,6 +4,7 @@
|
|||
:tree-nodes="treeNodes"
|
||||
:data-map="dataMap"
|
||||
:tags="tags"
|
||||
minder-key="testCase"
|
||||
:select-node="selectNode"
|
||||
:distinct-tags="tags"
|
||||
:tag-edit-check="tagEditCheck()"
|
||||
|
|
|
@ -5,6 +5,7 @@
|
|||
:data-map="dataMap"
|
||||
:tags="tags"
|
||||
:tag-enable="true"
|
||||
minder-key="testPlan"
|
||||
:select-node="selectNode"
|
||||
:distinct-tags="[...tags, this.$t('test_track.plan.plan_status_prepare')]"
|
||||
@afterMount="handleAfterMount"
|
||||
|
|
|
@ -5,6 +5,7 @@
|
|||
:data-map="dataMap"
|
||||
:tags="tags"
|
||||
:tag-enable="true"
|
||||
minder-key="testReview"
|
||||
:select-node="selectNode"
|
||||
:distinct-tags="[...tags, $t('test_track.plan.plan_status_prepare')]"
|
||||
@afterMount="handleAfterMount"
|
||||
|
|
Loading…
Reference in New Issue