From 71438db6e1d78fc2c388f6b3bdfb70265bce95a1 Mon Sep 17 00:00:00 2001
From: wangjiahao <1522128093@qq.com>
Date: Mon, 15 Nov 2021 11:53:42 +0800
Subject: [PATCH] =?UTF-8?q?refactor:=E7=BB=84=E4=BB=B6=E8=B0=83=E8=89=B2?=
=?UTF-8?q?=E6=9D=BF=E4=BC=98=E5=8C=96?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../src/components/canvas/components/TextAttr.vue | 12 +++++++++---
frontend/src/views/chart/chart/chart.js | 4 ++--
.../SubjectSetting/PanelStyle/BackgroundSelector.vue | 9 ++++++---
3 files changed, 17 insertions(+), 8 deletions(-)
diff --git a/frontend/src/components/canvas/components/TextAttr.vue b/frontend/src/components/canvas/components/TextAttr.vue
index 4e62e5080b..67e040e3f5 100644
--- a/frontend/src/components/canvas/components/TextAttr.vue
+++ b/frontend/src/components/canvas/components/TextAttr.vue
@@ -108,7 +108,7 @@
-
+
@@ -127,7 +127,7 @@
-
+
@@ -157,6 +157,7 @@ import { mapState } from 'vuex'
import Hyperlinks from '@/components/canvas/components/Editor/Hyperlinks'
import VideoLinks from '@/components/canvas/components/Editor/VideoLinks'
import DateFormat from '@/components/canvas/components/Editor/DateFormat'
+import { COLOR_PANEL } from '@/views/chart/chart/chart'
export default {
components: { Hyperlinks, DateFormat, VideoLinks },
@@ -172,6 +173,7 @@ export default {
},
data() {
return {
+ predefineColors: COLOR_PANEL,
showMain: true,
innerOpacity: 0,
textAlignOptions: [
@@ -431,4 +433,8 @@ export default {
padding: 5px!important;
width: 30px!important;
}
+
+ ::v-deep .el-color-dropdown__link-btn {
+ display: inline!important;
+ }
diff --git a/frontend/src/views/chart/chart/chart.js b/frontend/src/views/chart/chart/chart.js
index 043268e780..37d6d23114 100644
--- a/frontend/src/views/chart/chart/chart.js
+++ b/frontend/src/views/chart/chart/chart.js
@@ -864,6 +864,6 @@ export const COLOR_PANEL = [
'#1e90ff',
'#c71585',
'#999999',
- '#00008b',
- '#000000'
+ '#000000',
+ '#FFFFFF'
]
diff --git a/frontend/src/views/panel/SubjectSetting/PanelStyle/BackgroundSelector.vue b/frontend/src/views/panel/SubjectSetting/PanelStyle/BackgroundSelector.vue
index d62f269595..4818ff5f4a 100644
--- a/frontend/src/views/panel/SubjectSetting/PanelStyle/BackgroundSelector.vue
+++ b/frontend/src/views/panel/SubjectSetting/PanelStyle/BackgroundSelector.vue
@@ -12,7 +12,7 @@
{{ $t('chart.color') }}
-
+
@@ -50,6 +50,7 @@
import { mapState } from 'vuex'
import { deepCopy } from '@/components/canvas/utils/utils'
+import { COLOR_PANEL } from '@/views/chart/chart/chart'
export default {
name: 'BackgroundSelector',
@@ -59,7 +60,9 @@ export default {
dialogImageUrl: '',
dialogVisible: false,
uploadDisabled: false,
- panel: null
+ panel: null,
+ predefineColors: COLOR_PANEL
+
}
},
computed: mapState([
@@ -80,7 +83,7 @@ export default {
const canvasStyleData = deepCopy(this.canvasStyleData)
canvasStyleData.panel = this.panel
this.$store.commit('setCanvasStyle', canvasStyleData)
- this.$store.commit('recordSnapshot','commitStyle')
+ this.$store.commit('recordSnapshot', 'commitStyle')
},
onChangeType() {
this.commitStyle()