Merge pull request #9113 from dataease/pr@dev-v2@fix_label

fix(仪表板): 修复批量设置指标卡颜色未生效问题
This commit is contained in:
王嘉豪 2024-04-15 18:57:03 +08:00 committed by GitHub
commit e05bf51218
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
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)
}