fix(仪表板): 修复编辑过滤组件确定后组件样式会使用仪表板样式问题

This commit is contained in:
wangjiahao 2022-07-05 16:12:10 +08:00
parent 7b663e7676
commit 0625fe4954
3 changed files with 9 additions and 5 deletions

View File

@ -198,7 +198,7 @@ export default {
}, },
edit() { edit() {
if (this.curComponent.type === 'custom') { if (this.curComponent.type === 'custom') {
bus.$emit('component-dialog-edit') bus.$emit('component-dialog-edit', 'update')
} else if (this.curComponent.type === 'v-text' || this.curComponent.type === 'de-rich-text' || this.curComponent.type === 'rect-shape') { } else if (this.curComponent.type === 'v-text' || this.curComponent.type === 'de-rich-text' || this.curComponent.type === 'rect-shape') {
bus.$emit('component-dialog-style') bus.$emit('component-dialog-style')
} else { bus.$emit('change_panel_right_draw', true) } } else { bus.$emit('change_panel_right_draw', true) }

View File

@ -71,7 +71,7 @@ export default {
methods: { methods: {
edit() { edit() {
if (this.curComponent.type === 'custom') { if (this.curComponent.type === 'custom') {
bus.$emit('component-dialog-edit') bus.$emit('component-dialog-edit', 'update')
} else if (this.curComponent.type === 'v-text' || this.curComponent.type === 'de-rich-text' || this.curComponent.type === 'rect-shape') { } else if (this.curComponent.type === 'v-text' || this.curComponent.type === 'de-rich-text' || this.curComponent.type === 'rect-shape') {
bus.$emit('component-dialog-style') bus.$emit('component-dialog-style')
} else { bus.$emit('change_panel_right_draw', true) } } else { bus.$emit('change_panel_right_draw', true) }

View File

@ -450,7 +450,8 @@ export default {
enableSureButton: false, enableSureButton: false,
filterFromDrag: false, filterFromDrag: false,
activeToolsName: 'view', activeToolsName: 'view',
rightDrawOpen: false rightDrawOpen: false,
editType: null
} }
}, },
@ -891,7 +892,9 @@ export default {
}, },
sureFilter() { sureFilter() {
this.currentFilterCom = this.$refs['filter-setting-' + this.currentFilterCom.id].getElementInfo() this.currentFilterCom = this.$refs['filter-setting-' + this.currentFilterCom.id].getElementInfo()
adaptCurThemeCommonStyle(this.currentFilterCom) if (this.editType !== 'update') {
adaptCurThemeCommonStyle(this.currentFilterCom)
}
this.$store.commit('setComponentWithId', this.currentFilterCom) this.$store.commit('setComponentWithId', this.currentFilterCom)
this.$store.commit('recordSnapshot', 'sureFilter') this.$store.commit('recordSnapshot', 'sureFilter')
this.$store.commit('setCurComponent', { component: this.currentFilterCom, index: this.curComponentIndex }) this.$store.commit('setCurComponent', { component: this.currentFilterCom, index: this.curComponentIndex })
@ -902,7 +905,8 @@ export default {
this.currentFilterCom = component this.currentFilterCom = component
this.$forceUpdate() this.$forceUpdate()
}, },
editDialog() { editDialog(editType) {
this.editType = editType
if (this.curComponent && this.curComponent.serviceName) { if (this.curComponent && this.curComponent.serviceName) {
const serviceName = this.curComponent.serviceName const serviceName = this.curComponent.serviceName
this.currentWidget = ApplicationContext.getService(serviceName) this.currentWidget = ApplicationContext.getService(serviceName)