forked from github/dataease
Merge pull request #4543 from dataease/pr@dev@fix_filter-title
fix(仪表板): 修复切换主题色过滤组件表头位置也变化的问题
This commit is contained in:
commit
6efedf6651
@ -381,7 +381,10 @@ export function adaptCurThemeCommonStyle(component) {
|
||||
if (isFilterComponent(component.component)) {
|
||||
const filterStyle = store.state.canvasStyleData.chartInfo.filterStyle
|
||||
for (const styleKey in filterStyle) {
|
||||
Vue.set(component.style, styleKey, filterStyle[styleKey])
|
||||
// 位置属性不修改
|
||||
if (styleKey !== 'horizontal' && styleKey !== 'vertical') {
|
||||
Vue.set(component.style, styleKey, filterStyle[styleKey])
|
||||
}
|
||||
}
|
||||
} else if (isTabComponent(component.component)) {
|
||||
const tabStyle = store.state.canvasStyleData.chartInfo.tabStyle
|
||||
|
@ -19,12 +19,14 @@
|
||||
<el-radio-group
|
||||
v-model="styleInfo.horizontal"
|
||||
size="mini"
|
||||
@change="styleChange"
|
||||
>
|
||||
<el-radio-button label="left">{{ $t('chart.text_pos_left') }}</el-radio-button>
|
||||
<el-radio-button
|
||||
:disabled="styleInfo.vertical === 'center' && elementType !== 'de-select-grid'"
|
||||
label="center"
|
||||
>{{ $t('chart.text_pos_center') }}</el-radio-button>
|
||||
>{{ $t('chart.text_pos_center') }}
|
||||
</el-radio-button>
|
||||
<el-radio-button label="right">{{ $t('chart.text_pos_right') }}</el-radio-button>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
@ -36,12 +38,14 @@
|
||||
<el-radio-group
|
||||
v-model="styleInfo.vertical"
|
||||
size="mini"
|
||||
@change="styleChange"
|
||||
>
|
||||
<el-radio-button label="top">{{ $t('chart.text_pos_top') }}</el-radio-button>
|
||||
<el-radio-button
|
||||
:disabled="styleInfo.horizontal === 'center'"
|
||||
label="center"
|
||||
>{{ $t('chart.text_pos_center') }}</el-radio-button>
|
||||
>{{ $t('chart.text_pos_center') }}
|
||||
</el-radio-button>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
|
||||
@ -73,6 +77,12 @@ export default {
|
||||
type: String,
|
||||
default: ''
|
||||
}
|
||||
},
|
||||
|
||||
methods: {
|
||||
styleChange() {
|
||||
this.$store.commit('canvasChange')
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user