update modal可全屏

This commit is contained in:
赵霄
2023-10-08 16:48:57 +08:00
parent 20b2604ff8
commit 893e1450af
51 changed files with 169 additions and 105 deletions
+16 -3
View File
@@ -90,21 +90,32 @@ export default {
data () {
return {
data: {},
graph: null
graph: null,
loadEnd: false
}
},
watch: {
mapData: {
handler () {
this.data = JSON.parse(JSON.stringify(this.mapData))
this.$nextTick(() => {
if (this.loadEnd) {
this.initMindMap()
})
}
},
deep: true,
immediate: true
},
loadEnd () {
if (this.loadEnd) {
this.initMindMap()
}
}
},
mounted () {
this.$nextTick(() => {
this.loadEnd = true
})
},
methods: {
initMindMap () {
G6.registerNode('tree-node', {
@@ -194,6 +205,8 @@ export default {
}, 'single-shape')
this.graph = new G6.TreeGraph({
container: this.domId,
width: document.getElementById(this.domId).clientWidth,
height: document.getElementById(this.domId).clientHeight,
modes: {
default: [{
type: 'collapse-expand',