From c12dcb79bba117e8f0306751cd45532c2e454aa5 Mon Sep 17 00:00:00 2001
From: wangjiahao <1522128093@qq.com>
Date: Mon, 30 May 2022 13:12:52 +0800
Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BB=AA=E8=A1=A8=E6=9D=BF=E6=A0=B7?=
=?UTF-8?q?=E5=BC=8F=E4=BC=98=E5=8C=96=EF=BC=8C=E4=BF=AE=E5=A4=8D=E4=BB=AA?=
=?UTF-8?q?=E8=A1=A8=E6=9D=BF=E5=85=AC=E5=85=B1=E9=A2=9C=E8=89=B2=E4=B8=8D?=
=?UTF-8?q?=E6=98=BE=E7=A4=BA=E9=97=AE=E9=A2=98?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../components/canvas/custom-component/UserView.vue | 10 +++++++---
frontend/src/components/canvas/utils/utils.js | 2 +-
.../SubjectSetting/PanelStyle/PanelColorSelector.vue | 10 +++++++++-
3 files changed, 17 insertions(+), 5 deletions(-)
diff --git a/frontend/src/components/canvas/custom-component/UserView.vue b/frontend/src/components/canvas/custom-component/UserView.vue
index e0643d2f80..01935289c4 100644
--- a/frontend/src/components/canvas/custom-component/UserView.vue
+++ b/frontend/src/components/canvas/custom-component/UserView.vue
@@ -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,
diff --git a/frontend/src/components/canvas/utils/utils.js b/frontend/src/components/canvas/utils/utils.js
index fcf325d86f..5872783eed 100644
--- a/frontend/src/components/canvas/utils/utils.js
+++ b/frontend/src/components/canvas/utils/utils.js
@@ -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)
diff --git a/frontend/src/views/panel/SubjectSetting/PanelStyle/PanelColorSelector.vue b/frontend/src/views/panel/SubjectSetting/PanelStyle/PanelColorSelector.vue
index 79c710b340..b14dfee476 100644
--- a/frontend/src/views/panel/SubjectSetting/PanelStyle/PanelColorSelector.vue
+++ b/frontend/src/views/panel/SubjectSetting/PanelStyle/PanelColorSelector.vue
@@ -6,7 +6,7 @@
width="400"
trigger="click"
>
-
+
{{ $t('chart.color') }}
@@ -29,6 +29,14 @@ export default {
required: false
}
},
+ data() {
+ return {
+ propertyInner: [
+ 'value',
+ 'alpha'
+ ]
+ }
+ },
methods: {
onColorChange(colorForm) {
this.$emit('onColorChange', colorForm)