forked from github/dataease
fix(仪表板): 修复因富文本视图导致的进入编辑状态的仪表板,初始保存按钮状态不对的问题
This commit is contained in:
parent
9c5904e1bf
commit
06052ea48e
@ -66,6 +66,7 @@ export default {
|
|||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
initReady: false,
|
||||||
editShow: true,
|
editShow: true,
|
||||||
canEdit: false,
|
canEdit: false,
|
||||||
// 初始化配置
|
// 初始化配置
|
||||||
@ -115,19 +116,23 @@ export default {
|
|||||||
if (this.canEdit) {
|
if (this.canEdit) {
|
||||||
this.element.propValue.textValue = newValue
|
this.element.propValue.textValue = newValue
|
||||||
}
|
}
|
||||||
this.$store.commit('canvasChange')
|
this.initReady||this.$store.commit('canvasChange')
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
bus.$on('fieldSelect-' + this.element.propValue.viewId, this.fieldSelect)
|
this.viewInit()
|
||||||
tinymce.init({})
|
|
||||||
this.myValue = this.assignment(this.element.propValue.textValue)
|
|
||||||
bus.$on('initCurFields-' + this.element.id, this.initCurFieldsChange)
|
|
||||||
},
|
},
|
||||||
beforeDestroy() {
|
beforeDestroy() {
|
||||||
bus.$off('fieldSelect-' + this.element.propValue.viewId)
|
bus.$off('fieldSelect-' + this.element.propValue.viewId)
|
||||||
},
|
},
|
||||||
methods: {
|
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() {
|
initCurFieldsChange() {
|
||||||
if (!this.canEdit) {
|
if (!this.canEdit) {
|
||||||
this.myValue = this.assignment(this.element.propValue.textValue)
|
this.myValue = this.assignment(this.element.propValue.textValue)
|
||||||
|
Loading…
Reference in New Issue
Block a user