diff --git a/core/core-frontend/src/views/chart/components/editor/editor-style/ChartStyleBatchSet.vue b/core/core-frontend/src/views/chart/components/editor/editor-style/ChartStyleBatchSet.vue index aff9c85345..53705370db 100644 --- a/core/core-frontend/src/views/chart/components/editor/editor-style/ChartStyleBatchSet.vue +++ b/core/core-frontend/src/views/chart/components/editor/editor-style/ChartStyleBatchSet.vue @@ -80,11 +80,11 @@ const onChangeYAxisForm = (val, prop) => { } const onIndicatorChange = (val, prop) => { - batchOptChange('customAttr', 'indicator', val, prop) + batchOptChange('customAttr', 'indicator', val.indicatorValue, prop) } const onIndicatorNameChange = (val, prop) => { - batchOptChange('customAttr', 'indicatorName', val, prop) + batchOptChange('customAttr', 'indicatorName', val.indicatorName, prop) } const onChangeMiscStyleForm = (val, prop) => { diff --git a/core/core-frontend/src/views/chart/components/editor/editor-style/components/IndicatorNameSelector.vue b/core/core-frontend/src/views/chart/components/editor/editor-style/components/IndicatorNameSelector.vue index e1996c19ca..6ed34677a4 100644 --- a/core/core-frontend/src/views/chart/components/editor/editor-style/components/IndicatorNameSelector.vue +++ b/core/core-frontend/src/views/chart/components/editor/editor-style/components/IndicatorNameSelector.vue @@ -12,9 +12,12 @@ import { cloneDeep, defaultsDeep } from 'lodash-es' import { ElIcon } from 'element-plus-secondary' import Icon from '@/components/icon-custom/src/Icon.vue' import { hexColorToRGBA } from '@/views/chart/components/js/util' +import { dvMainStoreWithOut } from '@/store/modules/data-visualization/dvMain' +import { storeToRefs } from 'pinia' const { t } = useI18n() - +const dvMainStore = dvMainStoreWithOut() +const { batchOptStatus } = storeToRefs(dvMainStore) const props = defineProps({ chart: { type: Object, @@ -92,7 +95,9 @@ onMounted(() => { watch( () => props.chart?.customAttr?.indicatorName, () => { - init() + if (!batchOptStatus.value) { + init() + } }, { deep: true } ) diff --git a/core/core-frontend/src/views/chart/components/editor/editor-style/components/IndicatorValueSelector.vue b/core/core-frontend/src/views/chart/components/editor/editor-style/components/IndicatorValueSelector.vue index b5cccfde6c..bc5a6c5d1a 100644 --- a/core/core-frontend/src/views/chart/components/editor/editor-style/components/IndicatorValueSelector.vue +++ b/core/core-frontend/src/views/chart/components/editor/editor-style/components/IndicatorValueSelector.vue @@ -12,6 +12,10 @@ import { cloneDeep, defaultsDeep } from 'lodash-es' import { ElIcon, ElInput } from 'element-plus-secondary' import Icon from '@/components/icon-custom/src/Icon.vue' import { hexColorToRGBA } from '@/views/chart/components/js/util' +import { storeToRefs } from 'pinia' +import { dvMainStoreWithOut } from '@/store/modules/data-visualization/dvMain' +const dvMainStore = dvMainStoreWithOut() +const { batchOptStatus } = storeToRefs(dvMainStore) const { t } = useI18n() @@ -53,7 +57,8 @@ const fontSizeList = computed(() => { return arr }) -const changeTitleStyle = prop => { +const changeLabelTitleStyleStyle = prop => { + console.log('changeLabelTitleStyleStyle===' + prop) emit('onIndicatorChange', state.indicatorValueForm, prop) } @@ -95,7 +100,9 @@ onMounted(() => { watch( () => props.chart?.customAttr?.indicator, () => { - init() + if (!batchOptStatus.value) { + init() + } }, { deep: true } ) @@ -125,7 +132,7 @@ defineExpose({ getFormData }) :effect="themes" v-model="state.indicatorValueForm.fontFamily" :placeholder="t('chart.font_family')" - @change="changeTitleStyle('fontFamily')" + @change="changeLabelTitleStyleStyle('fontFamily')" > @@ -156,7 +163,7 @@ defineExpose({ getFormData }) v-model="state.indicatorValueForm.fontSize" :placeholder="t('chart.text_fontsize')" size="small" - @change="changeTitleStyle('fontSize')" + @change="changeLabelTitleStyleStyle('fontSize')" >