Commit d329c858ebe7a47906c4b615a2747ce7e8fae446

Authored by xp.Huang
2 parents 3dff7011 e0e4c9cb

Merge branch 'fix/data-board-trend-icon' into 'main_dev'

fix: 修复数据看板组件历史趋势被隐藏

See merge request yunteng/thingskit-front!681
@@ -18,6 +18,7 @@ @@ -18,6 +18,7 @@
18 import { DataComponentRecord } from '/@/api/dataBoard/model'; 18 import { DataComponentRecord } from '/@/api/dataBoard/model';
19 import { computed } from 'vue'; 19 import { computed } from 'vue';
20 import { useGetComponentConfig } from '../../../packages/hook/useGetComponetConfig'; 20 import { useGetComponentConfig } from '../../../packages/hook/useGetComponetConfig';
  21 + import { isBoolean } from '/@/utils/is';
21 22
22 const props = defineProps<{ 23 const props = defineProps<{
23 sourceInfo: WidgetDataType; 24 sourceInfo: WidgetDataType;
@@ -83,7 +84,8 @@ @@ -83,7 +84,8 @@
83 const hasTrendQueryIcon = computed(() => { 84 const hasTrendQueryIcon = computed(() => {
84 const frontId = props.sourceInfo.frontId; 85 const frontId = props.sourceInfo.frontId;
85 const config = useGetComponentConfig(frontId); 86 const config = useGetComponentConfig(frontId);
86 - return !!config.persetOption?.trendQuery; 87 + const flag = config.persetOption?.trendQuery;
  88 + return isBoolean(flag) ? flag : true;
87 }); 89 });
88 90
89 async function handleCopy() { 91 async function handleCopy() {