允许echart在组件内更换图标类型
This commit is contained in:
@@ -14,6 +14,14 @@ export default {
|
||||
fullscreen: false
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
value(v) {
|
||||
const content = this.editor.get()
|
||||
if (v && content && JSON.stringify(v) != JSON.stringify(content)) {
|
||||
this.editor?.set(v)
|
||||
}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
init() {
|
||||
const {JSONEditor} = window
|
||||
@@ -27,7 +35,7 @@ export default {
|
||||
},
|
||||
}, this.value)
|
||||
} else setTimeout(() => this.init(), 500)
|
||||
const fullscreenBtn = document.querySelector(".fullscreenBtn")
|
||||
const fullscreenBtn = this.$el.querySelector(".fullscreenBtn")
|
||||
if (!fullscreenBtn) {
|
||||
const btn = document.createElement("div")
|
||||
btn.className = "fullscreenBtn el-icon-full-screen"
|
||||
|
||||
Reference in New Issue
Block a user