Merge pull request #8275 from dataease/pr@dev-v2@fix_indicator_name

fix(视图): 指标卡名称修改不生效 #8122
This commit is contained in:
wisonic-s 2024-03-01 16:19:19 +08:00 committed by GitHub
commit 2998043986
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -1,6 +1,6 @@
<script setup lang="ts">
import { getData } from '@/api/chart'
import { ref, reactive, shallowRef, computed, CSSProperties, toRefs } from 'vue'
import { ref, reactive, shallowRef, computed, CSSProperties, toRefs, PropType } from 'vue'
import { dvMainStoreWithOut } from '@/store/modules/data-visualization/dvMain'
import { customAttrTrans, customStyleTrans, recursionTransObj } from '@/utils/canvasStyle'
import { deepCopy } from '@/utils/utils'
@ -16,7 +16,7 @@ import { hexColorToRGBA } from '@/views/chart/components/js/util'
const props = defineProps({
view: {
type: Object,
type: Object as PropType<ChartObj>,
default() {
return {
propValue: null
@ -64,7 +64,11 @@ const resultObject = computed(() => {
})
const resultName = computed(() => {
return resultObject.value?.name
if (view.value?.yAxis?.length) {
const axis = view.value.yAxis[0]
return axis.chartShowName ? axis.chartShowName : axis.name
}
return undefined
})
const result = computed(() => {