From f2ac1b6a6c95723d8a361bb7447b2e8a1d793461 Mon Sep 17 00:00:00 2001 From: junjie Date: Thu, 22 Jul 2021 18:20:44 +0800 Subject: [PATCH] =?UTF-8?q?refactor:=20=E8=A7=86=E5=9B=BE=E6=A0=B7?= =?UTF-8?q?=E5=BC=8F=E7=95=8C=E9=9D=A2=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../BackgroundColorSelector.vue | 54 ++- .../component-style/LegendSelector.vue | 181 +++++--- .../component-style/SplitSelector.vue | 151 ++++--- .../component-style/TitleSelector.vue | 175 +++++--- .../component-style/XAxisSelector.vue | 226 ++++++---- .../component-style/YAxisSelector.vue | 226 ++++++---- .../components/shape-attr/ColorSelector.vue | 146 ++++--- .../components/shape-attr/LabelSelector.vue | 219 ++++++---- .../components/shape-attr/SizeSelector.vue | 410 ++++++++++++------ .../components/shape-attr/TooltipSelector.vue | 185 +++++--- frontend/src/views/chart/view/ChartEdit.vue | 107 +++-- 11 files changed, 1363 insertions(+), 717 deletions(-) diff --git a/frontend/src/views/chart/components/component-style/BackgroundColorSelector.vue b/frontend/src/views/chart/components/component-style/BackgroundColorSelector.vue index 92bb45d204..7e76673d54 100644 --- a/frontend/src/views/chart/components/component-style/BackgroundColorSelector.vue +++ b/frontend/src/views/chart/components/component-style/BackgroundColorSelector.vue @@ -1,25 +1,35 @@ @@ -100,4 +110,8 @@ export default { .el-form-item{ margin-bottom: 6px; } +.color-picker-style{ + cursor: pointer; + z-index: 1003; +} diff --git a/frontend/src/views/chart/components/component-style/LegendSelector.vue b/frontend/src/views/chart/components/component-style/LegendSelector.vue index d515035912..0146a20c2f 100644 --- a/frontend/src/views/chart/components/component-style/LegendSelector.vue +++ b/frontend/src/views/chart/components/component-style/LegendSelector.vue @@ -1,70 +1,117 @@ @@ -171,4 +218,8 @@ export default { right: 10px; margin-top: -4px; } +.color-picker-style{ + cursor: pointer; + z-index: 1003; +} diff --git a/frontend/src/views/chart/components/component-style/SplitSelector.vue b/frontend/src/views/chart/components/component-style/SplitSelector.vue index 51cb426320..3c98871534 100644 --- a/frontend/src/views/chart/components/component-style/SplitSelector.vue +++ b/frontend/src/views/chart/components/component-style/SplitSelector.vue @@ -1,58 +1,99 @@ @@ -156,4 +197,8 @@ export default { right: 10px; margin-top: -4px; } + .color-picker-style{ + cursor: pointer; + z-index: 1003; + } diff --git a/frontend/src/views/chart/components/component-style/TitleSelector.vue b/frontend/src/views/chart/components/component-style/TitleSelector.vue index 5851a92787..626654f877 100644 --- a/frontend/src/views/chart/components/component-style/TitleSelector.vue +++ b/frontend/src/views/chart/components/component-style/TitleSelector.vue @@ -1,68 +1,113 @@ @@ -170,4 +215,8 @@ export default { right: 10px; margin-top: -4px; } +.color-picker-style{ + cursor: pointer; + z-index: 1003; +} diff --git a/frontend/src/views/chart/components/component-style/XAxisSelector.vue b/frontend/src/views/chart/components/component-style/XAxisSelector.vue index 65d88477f8..7aa89a59f8 100644 --- a/frontend/src/views/chart/components/component-style/XAxisSelector.vue +++ b/frontend/src/views/chart/components/component-style/XAxisSelector.vue @@ -1,89 +1,155 @@ @@ -191,4 +257,8 @@ export default { right: 10px; margin-top: -4px; } + .color-picker-style{ + cursor: pointer; + z-index: 1003; + } diff --git a/frontend/src/views/chart/components/component-style/YAxisSelector.vue b/frontend/src/views/chart/components/component-style/YAxisSelector.vue index fd5765705f..d2aa8b1791 100644 --- a/frontend/src/views/chart/components/component-style/YAxisSelector.vue +++ b/frontend/src/views/chart/components/component-style/YAxisSelector.vue @@ -1,89 +1,155 @@ @@ -191,4 +257,8 @@ export default { right: 10px; margin-top: -4px; } + .color-picker-style{ + cursor: pointer; + z-index: 1003; + } diff --git a/frontend/src/views/chart/components/shape-attr/ColorSelector.vue b/frontend/src/views/chart/components/shape-attr/ColorSelector.vue index 1baffa05a0..bc7a5b2629 100644 --- a/frontend/src/views/chart/components/shape-attr/ColorSelector.vue +++ b/frontend/src/views/chart/components/shape-attr/ColorSelector.vue @@ -1,57 +1,99 @@ @@ -226,4 +268,8 @@ export default { .el-form-item{ margin-bottom: 6px; } + .color-picker-style{ + cursor: pointer; + z-index: 1003; + } diff --git a/frontend/src/views/chart/components/shape-attr/LabelSelector.vue b/frontend/src/views/chart/components/shape-attr/LabelSelector.vue index 0b164606bc..e6d17816f8 100644 --- a/frontend/src/views/chart/components/shape-attr/LabelSelector.vue +++ b/frontend/src/views/chart/components/shape-attr/LabelSelector.vue @@ -1,84 +1,145 @@ @@ -189,4 +250,8 @@ export default { right: 10px; margin-top: -4px; } + .color-picker-style{ + cursor: pointer; + z-index: 1003; + } diff --git a/frontend/src/views/chart/components/shape-attr/SizeSelector.vue b/frontend/src/views/chart/components/shape-attr/SizeSelector.vue index b3d714eb4c..1a542be9f6 100644 --- a/frontend/src/views/chart/components/shape-attr/SizeSelector.vue +++ b/frontend/src/views/chart/components/shape-attr/SizeSelector.vue @@ -1,151 +1,285 @@ diff --git a/frontend/src/views/chart/components/shape-attr/TooltipSelector.vue b/frontend/src/views/chart/components/shape-attr/TooltipSelector.vue index 6160b55a01..02088808d3 100644 --- a/frontend/src/views/chart/components/shape-attr/TooltipSelector.vue +++ b/frontend/src/views/chart/components/shape-attr/TooltipSelector.vue @@ -1,72 +1,121 @@ @@ -165,4 +214,8 @@ export default { right: 10px; margin-top: -4px; } +.color-picker-style{ + cursor: pointer; + z-index: 1003; +} diff --git a/frontend/src/views/chart/view/ChartEdit.vue b/frontend/src/views/chart/view/ChartEdit.vue index b953a6fb1e..5265fc7905 100644 --- a/frontend/src/views/chart/view/ChartEdit.vue +++ b/frontend/src/views/chart/view/ChartEdit.vue @@ -330,37 +330,73 @@ -
- - {{ $t('chart.style_priority') }} - - - {{ $t('chart.chart') }} - {{ $t('chart.dashboard') }} - + +
+ + {{ $t('chart.style_priority') }} + + + {{ $t('chart.chart') }} + {{ $t('chart.dashboard') }} + + - - - {{ $t('chart.shape_attr') }} - - - - + {{ $t('chart.shape_attr') }} + + + + + + + + + + + + + + + + + + + + - - - {{ $t('chart.module_style') }} - - - - - - + {{ $t('chart.module_style') }} + + + + + + + + + + + + + + + + + + + + + + + + + + + + - -
+
+
@@ -610,7 +646,9 @@ export default { editDsField: false, changeDsTitle: '', filterItem: {}, - places: [] + places: [], + attrActiveNames: [], + styleActiveNames: [] } }, computed: { @@ -1452,14 +1490,25 @@ export default { .attr-selector{ width:100%; - height: 32px; - margin:0 0 6px 0; + height: 100%; + margin:6px 0; padding:0 4px; display: flex; align-items: center; background-color: white } + .style-collapse>>>.el-collapse-item__content { + padding-bottom: 0!important; + } + .style-collapse>>>.el-collapse-item__header { + height: 34px; + line-height: 34px; + padding: 0 0 0 6px; + font-size: 12px; + font-weight: 400; + } + .disabled-none-cursor{ cursor: not-allowed; pointer-events:none;