fix(仪表板): 修复因富文本视图导致的进入编辑状态的仪表板,初始保存按钮状态不对的问题

This commit is contained in:
wangjiahao 2022-08-18 13:54:56 +08:00
parent 9c5904e1bf
commit 06052ea48e

View File

@ -66,6 +66,7 @@ export default {
},
data() {
return {
initReady: false,
editShow: true,
canEdit: false,
//
@ -115,19 +116,23 @@ export default {
if (this.canEdit) {
this.element.propValue.textValue = newValue
}
this.$store.commit('canvasChange')
this.initReady||this.$store.commit('canvasChange')
}
},
mounted() {
bus.$on('fieldSelect-' + this.element.propValue.viewId, this.fieldSelect)
tinymce.init({})
this.myValue = this.assignment(this.element.propValue.textValue)
bus.$on('initCurFields-' + this.element.id, this.initCurFieldsChange)
this.viewInit()
},
beforeDestroy() {
bus.$off('fieldSelect-' + this.element.propValue.viewId)
},
methods: {
viewInit(){
bus.$on('fieldSelect-' + this.element.propValue.viewId, this.fieldSelect)
tinymce.init({})
this.myValue = this.assignment(this.element.propValue.textValue)
bus.$on('initCurFields-' + this.element.id, this.initCurFieldsChange)
this.initReady=true
},
initCurFieldsChange() {
if (!this.canEdit) {
this.myValue = this.assignment(this.element.propValue.textValue)