Merge pull request #1562 from dataease/pr@dev@feat-mobile-reset

refactor: 仪表板间隙设置优化
This commit is contained in:
王嘉豪 2021-12-30 11:48:57 +08:00 committed by GitHub
commit 6a56fe9b84
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 6 additions and 2 deletions

View File

@ -535,7 +535,7 @@ export default {
return this.$store.state.curComponent return this.$store.state.curComponent
}, },
curGap() { curGap() {
return this.element.auxiliaryMatrix && this.element.type !== 'custom' ? this.componentGap : 0 return (this.canvasStyleData.panel.gap === 'yes' && this.element.auxiliaryMatrix && this.element.type !== 'custom') ? this.componentGap : 0
}, },
...mapState([ ...mapState([
'editor', 'editor',

View File

@ -85,7 +85,7 @@ export default {
return (this.curComponent && this.config === this.curComponent) && !this.previewVisible return (this.curComponent && this.config === this.curComponent) && !this.previewVisible
}, },
curGap() { curGap() {
return this.config.auxiliaryMatrix ? this.componentGap : 0 return (this.canvasStyleData.panel.gap === 'yes' && this.config.auxiliaryMatrix) ? this.componentGap : 0
}, },
...mapState([ ...mapState([
'mobileLayoutStatus', 'mobileLayoutStatus',

View File

@ -261,6 +261,10 @@ export default {
if (!this.preCanvasPanel || this.preCanvasPanel.resultCount !== newVal.panel.resultCount || this.preCanvasPanel.resultMode !== newVal.panel.resultMode) { if (!this.preCanvasPanel || this.preCanvasPanel.resultCount !== newVal.panel.resultCount || this.preCanvasPanel.resultMode !== newVal.panel.resultMode) {
this.getData(this.element.propValue.viewId, false) this.getData(this.element.propValue.viewId, false)
} }
// gap
if (this.preCanvasPanel && this.preCanvasPanel.gap !== newVal.panel.gap) {
this.$refs[this.element.propValue.id].chartResize()
}
this.preCanvasPanel = deepCopy(newVal.panel) this.preCanvasPanel = deepCopy(newVal.panel)
}, },
deep: true deep: true