diff --git a/frontend/src/views/chart/components/component-style/LegendSelector.vue b/frontend/src/views/chart/components/component-style/LegendSelector.vue index c5efed7e8d..476c4b5590 100644 --- a/frontend/src/views/chart/components/component-style/LegendSelector.vue +++ b/frontend/src/views/chart/components/component-style/LegendSelector.vue @@ -2,15 +2,16 @@
- - {{ $t('chart.show') }} - + + + - {{ $t('chart.legend') }} + + {{ $t('chart.legend') }} + +
@@ -80,7 +89,8 @@ export default { { name: this.$t('chart.line_symbol_roundRect'), value: 'roundRect' }, { name: this.$t('chart.line_symbol_triangle'), value: 'triangle' }, { name: this.$t('chart.line_symbol_diamond'), value: 'diamond' } - ] + ], + isSetting: false } }, watch: { @@ -116,6 +126,9 @@ export default { this.fontSize = arr }, changeLegendStyle() { + if (!this.legendForm.show) { + this.isSetting = false + } this.$emit('onLegendChange', this.legendForm) } } @@ -147,4 +160,10 @@ export default { .el-form-item{ margin-bottom: 6px; } + +.switch-style{ + position: absolute; + right: 10px; + margin-top: -4px; +} diff --git a/frontend/src/views/chart/components/component-style/TitleSelector.vue b/frontend/src/views/chart/components/component-style/TitleSelector.vue index 2b4424daf4..67938b87ea 100644 --- a/frontend/src/views/chart/components/component-style/TitleSelector.vue +++ b/frontend/src/views/chart/components/component-style/TitleSelector.vue @@ -2,14 +2,24 @@
- - {{ $t('chart.show') }} + + + + + @@ -39,7 +49,15 @@ - {{ $t('chart.title') }} + + {{ $t('chart.title') }} + +
@@ -59,7 +77,8 @@ export default { data() { return { titleForm: JSON.parse(JSON.stringify(DEFAULT_TITLE_STYLE)), - fontSize: [] + fontSize: [], + isSetting: false } }, watch: { @@ -76,13 +95,11 @@ export default { if (customStyle.text) { this.titleForm = customStyle.text } + this.titleForm.title = this.chart.title } } } }, - created() { - console.log(JSON.stringify(this.chart)) - }, mounted() { this.init() }, @@ -98,6 +115,9 @@ export default { this.fontSize = arr }, changeTitleStyle() { + if (!this.titleForm.show) { + this.isSetting = false + } this.$emit('onTextChange', this.titleForm) } } @@ -129,4 +149,10 @@ export default { .el-form-item{ margin-bottom: 6px; } + +.switch-style{ + position: absolute; + right: 10px; + margin-top: -4px; +} diff --git a/frontend/src/views/chart/components/component-style/XAxisSelector.vue b/frontend/src/views/chart/components/component-style/XAxisSelector.vue index c967201f7d..637f2355c6 100644 --- a/frontend/src/views/chart/components/component-style/XAxisSelector.vue +++ b/frontend/src/views/chart/components/component-style/XAxisSelector.vue @@ -2,15 +2,16 @@
- - {{ $t('chart.show') }} - + + + {{ $t('chart.text_pos_top') }} @@ -24,12 +25,20 @@ - + - {{ $t('chart.xAxis') }} + + {{ $t('chart.xAxis') }} + +
@@ -48,7 +57,8 @@ export default { }, data() { return { - axisForm: JSON.parse(JSON.stringify(DEFAULT_XAXIS_STYLE)) + axisForm: JSON.parse(JSON.stringify(DEFAULT_XAXIS_STYLE)), + isSetting: false } }, watch: { @@ -73,6 +83,9 @@ export default { }, methods: { changeXAxisStyle() { + if (!this.axisForm.show) { + this.isSetting = false + } this.$emit('onChangeXAxisForm', this.axisForm) } } @@ -104,4 +117,10 @@ export default { .el-form-item{ margin-bottom: 6px; } + +.switch-style{ + position: absolute; + right: 10px; + margin-top: -4px; +} diff --git a/frontend/src/views/chart/components/component-style/YAxisSelector.vue b/frontend/src/views/chart/components/component-style/YAxisSelector.vue index 8bfed38fa1..a986e78d86 100644 --- a/frontend/src/views/chart/components/component-style/YAxisSelector.vue +++ b/frontend/src/views/chart/components/component-style/YAxisSelector.vue @@ -2,15 +2,16 @@
- - {{ $t('chart.show') }} - + + + {{ $t('chart.text_pos_left') }} @@ -24,12 +25,20 @@ - + - {{ $t('chart.yAxis') }} + + {{ $t('chart.yAxis') }} + +
@@ -48,7 +57,8 @@ export default { }, data() { return { - axisForm: JSON.parse(JSON.stringify(DEFAULT_YAXIS_STYLE)) + axisForm: JSON.parse(JSON.stringify(DEFAULT_YAXIS_STYLE)), + isSetting: false } }, watch: { @@ -73,6 +83,9 @@ export default { }, methods: { changeYAxisStyle() { + if (!this.axisForm.show) { + this.isSetting = false + } this.$emit('onChangeYAxisForm', this.axisForm) } } @@ -104,4 +117,10 @@ export default { .el-form-item{ margin-bottom: 6px; } + +.switch-style{ + position: absolute; + right: 10px; + margin-top: -4px; +} diff --git a/frontend/src/views/chart/components/shape-attr/LabelSelector.vue b/frontend/src/views/chart/components/shape-attr/LabelSelector.vue index e9289037dc..b72b29c882 100644 --- a/frontend/src/views/chart/components/shape-attr/LabelSelector.vue +++ b/frontend/src/views/chart/components/shape-attr/LabelSelector.vue @@ -2,15 +2,16 @@
- - {{ $t('chart.show') }} - + + + @@ -67,7 +68,15 @@ - {{ $t('chart.label') }} + + {{ $t('chart.label') }} + +
@@ -87,7 +96,8 @@ export default { data() { return { labelForm: JSON.parse(JSON.stringify(DEFAULT_LABEL)), - fontSize: [] + fontSize: [], + isSetting: false } }, watch: { @@ -123,6 +133,9 @@ export default { this.fontSize = arr }, changeLabelAttr() { + if (!this.labelForm.show) { + this.isSetting = false + } this.$emit('onLabelChange', this.labelForm) } } @@ -154,4 +167,10 @@ export default { .el-form-item{ margin-bottom: 6px; } + + .switch-style{ + position: absolute; + right: 10px; + margin-top: -4px; + } diff --git a/frontend/src/views/chart/components/shape-attr/TooltipSelector.vue b/frontend/src/views/chart/components/shape-attr/TooltipSelector.vue index 148a28aeb4..b509b7012f 100644 --- a/frontend/src/views/chart/components/shape-attr/TooltipSelector.vue +++ b/frontend/src/views/chart/components/shape-attr/TooltipSelector.vue @@ -2,15 +2,16 @@
- - {{ $t('chart.show') }} - + + + {{ $t('chart.tooltip_item') }} @@ -54,7 +55,15 @@ - {{ $t('chart.tooltip') }} + + {{ $t('chart.tooltip') }} + +
@@ -74,7 +83,8 @@ export default { data() { return { tooltipForm: JSON.parse(JSON.stringify(DEFAULT_TOOLTIP)), - fontSize: [] + fontSize: [], + isSetting: false } }, watch: { @@ -110,6 +120,9 @@ export default { this.fontSize = arr }, changeTooltipAttr() { + if (!this.tooltipForm.show) { + this.isSetting = false + } this.$emit('onTooltipChange', this.tooltipForm) } } @@ -141,4 +154,10 @@ export default { .el-form-item{ margin-bottom: 6px; } + +.switch-style{ + position: absolute; + right: 10px; + margin-top: -4px; +} diff --git a/frontend/src/views/chart/view/ChartEdit.vue b/frontend/src/views/chart/view/ChartEdit.vue index 4f48f557c8..5ae3dced7d 100644 --- a/frontend/src/views/chart/view/ChartEdit.vue +++ b/frontend/src/views/chart/view/ChartEdit.vue @@ -73,23 +73,23 @@ -
- - {{ $t('chart.title') }} - {{ $t('chart.confirm') }} - - - - - - -
+ + + + + + + + + + + + + + + + +
{{ $t('chart.chart_type') }} @@ -736,6 +736,7 @@ export default { onTextChange(val) { this.view.customStyle.text = val + this.view.title = val.title this.save() },