update modal可全屏
This commit is contained in:
@@ -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',
|
||||
|
||||
Reference in New Issue
Block a user