Commit d329c858ebe7a47906c4b615a2747ce7e8fae446
Merge branch 'fix/data-board-trend-icon' into 'main_dev'
fix: 修复数据看板组件历史趋势被隐藏 See merge request yunteng/thingskit-front!681
Showing
1 changed file
with
3 additions
and
1 deletions
@@ -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() { |