fix(仪表板): 修复批量设置指标卡颜色未生效问题

This commit is contained in:
wangjiahao 2024-04-15 18:56:22 +08:00
parent 7acb8b09ef
commit 8848747c66
2 changed files with 8 additions and 2 deletions

View File

@ -13,6 +13,7 @@ import {
} from '@/views/chart/components/editor/util/chart'
import { valueFormatter } from '@/views/chart/components/js/formatter'
import { hexColorToRGBA } from '@/views/chart/components/js/util'
import { storeToRefs } from 'pinia'
const props = defineProps({
view: {
@ -43,6 +44,8 @@ const { view, scale, terminal } = toRefs(props)
const dvMainStore = dvMainStoreWithOut()
const { batchOptStatus } = storeToRefs(dvMainStore)
const errMsg = ref('')
const isError = ref(false)
const state = reactive({
@ -267,7 +270,11 @@ const renderChart = async view => {
indicatorColor.value = customAttr.indicator.color
let suffixColor = customAttr.indicator.suffixColor
if (customAttr.basicStyle && customAttr.basicStyle.alpha !== undefined) {
if (
customAttr.basicStyle &&
customAttr.basicStyle.alpha !== undefined &&
!batchOptStatus.value
) {
indicatorColor.value = hexColorToRGBA(
customAttr.basicStyle.colors[0],
customAttr.basicStyle.alpha

View File

@ -58,7 +58,6 @@ const fontSizeList = computed(() => {
})
const changeLabelTitleStyleStyle = prop => {
console.log('changeLabelTitleStyleStyle===' + prop)
emit('onIndicatorChange', state.indicatorValueForm, prop)
}