Merge pull request #3237 from dataease/pr@dev@refactor_grid-button

fix(仪表板): 修复辅助网格开启按钮状态显示问题
This commit is contained in:
taojinlong 2022-09-28 15:52:17 +08:00 committed by GitHub
commit a52e75b18c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 11 additions and 0 deletions

View File

@ -193,6 +193,7 @@ export default {
])
},
created() {
eventBus.$on('editPanelInitReady', this.editPanelInit)
eventBus.$on('preview', this.preview)
eventBus.$on('save', this.save)
eventBus.$on('clearCanvas', this.clearCanvas)
@ -205,10 +206,14 @@ export default {
eventBus.$off('preview', this.preview)
eventBus.$off('save', this.save)
eventBus.$off('clearCanvas', this.clearCanvas)
eventBus.$off('editPanelInitReady', this.editPanelInit)
clearInterval(this.timer)
this.timer = null
},
methods: {
editPanelInit(){
this.showGridSwitch = this.canvasStyleData.aidedDesign.showGrid
},
close() {
//
this.$store.commit('initCanvasBase')

View File

@ -1,6 +1,7 @@
import { sin, cos } from '@/components/canvas/utils/translate'
import store from '@/store'
import Vue from 'vue'
export const LIGHT_THEME_COLOR_MAIN = '#000000'
export const LIGHT_THEME_COLOR_SLAVE1 = '#CCCCCC'
export const LIGHT_THEME_PANEL_BACKGROUND = '#F1F3F5'
@ -35,6 +36,9 @@ export function getStyle(style, filter = []) {
if (key === 'backgroundColor') {
result[key] = colorRgb(style[key], style.opacity)
}
if (key === 'fontSize' && result[key] < 12) {
result[key] = 12
}
if (needUnit.includes(key)) {
result[key] += 'px'
}

View File

@ -429,6 +429,7 @@ import ChartStyleBatchSet from '@/views/chart/view/ChartStyleBatchSet'
import Multiplexing from '@/views/panel/ViewSelect/multiplexing'
import { listenGlobalKeyDown } from '@/components/canvas/utils/shortcutKey'
import { adaptCurThemeCommonStyle } from '@/components/canvas/utils/style'
import eventBus from '@/components/canvas/utils/eventBus'
export default {
name: 'PanelEdit',
components: {
@ -794,6 +795,7 @@ export default {
} else {
_this.$store.commit('refreshSaveStatus')
}
eventBus.$emit('editPanelInitReady')
}, 500)
})
},