forked from github/dataease
fix: 仪表板样式优化,修复仪表板公共颜色不显示问题
This commit is contained in:
parent
bd11d84240
commit
c12dcb79bb
@ -501,13 +501,17 @@ export default {
|
||||
const customStyleChart = JSON.parse(this.chart.customStyle)
|
||||
const customAttrPanel = JSON.parse(this.canvasStyleData.chart.customAttr)
|
||||
const customStylePanel = JSON.parse(this.canvasStyleData.chart.customStyle)
|
||||
// 组件样式-背景设置
|
||||
customStyleChart.background = customStylePanel.background
|
||||
if (customStyleChart.background) {
|
||||
// 组件样式-背景设置
|
||||
customStyleChart.background = customStylePanel.background
|
||||
}
|
||||
// 图形属性-颜色设置
|
||||
if (this.chart.type.includes('table')) {
|
||||
customAttrChart.color = customAttrPanel.tableColor
|
||||
} else {
|
||||
customAttrChart.color = customAttrPanel.color
|
||||
customAttrChart.color['value'] = customAttrPanel.color['value']
|
||||
customAttrChart.color['colors'] = customAttrPanel.color['colors']
|
||||
customAttrChart.color['alpha'] = customAttrPanel.color['alpha']
|
||||
}
|
||||
this.chart = {
|
||||
...this.chart,
|
||||
|
@ -148,7 +148,7 @@ export function checkViewTitle(opt, id, tile) {
|
||||
const curPanelViewsData = store.state.componentViewsData
|
||||
const curComponentViewNames = []
|
||||
store.state.componentData.forEach(item => {
|
||||
if (item.type === 'view' && item.propValue && item.propValue.viewId) {
|
||||
if (item.type === 'view' && item.propValue && item.propValue.viewId && curPanelViewsData[item.propValue.viewId]) {
|
||||
// 更新时自己的title不加入比较
|
||||
if ((opt === 'update' && id !== item.propValue.viewId) || opt === 'new') {
|
||||
curComponentViewNames.push(curPanelViewsData[item.propValue.viewId].title)
|
||||
|
@ -6,7 +6,7 @@
|
||||
width="400"
|
||||
trigger="click"
|
||||
>
|
||||
<color-selector :source-type="sourceType" :chart="chart" @onColorChange="onColorChange" />
|
||||
<color-selector :chart="chart" :property-inner="propertyInner" @onColorChange="onColorChange" />
|
||||
<el-button slot="reference" size="mini" class="shape-item">{{ $t('chart.color') }}<i class="el-icon-setting el-icon--right" /></el-button>
|
||||
</el-popover>
|
||||
</div>
|
||||
@ -29,6 +29,14 @@ export default {
|
||||
required: false
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
propertyInner: [
|
||||
'value',
|
||||
'alpha'
|
||||
]
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
onColorChange(colorForm) {
|
||||
this.$emit('onColorChange', colorForm)
|
||||
|
Loading…
Reference in New Issue
Block a user