feat: 修改时间组件为静态组件

This commit is contained in:
奔跑的面条
2023-03-16 10:18:37 +08:00
parent f3bfdeaccd
commit 1130deab48
3 changed files with 7 additions and 8 deletions
@@ -16,9 +16,10 @@
import { computed } from 'vue'
import { loadAsyncComponent } from '@/utils'
import { SettingItemBox } from '@/components/Pages/ChartItemSetting'
import { RequestDataTypeEnum } from '@/enums/httpEnum'
import { ChartFrameEnum } from '@/packages/index.d'
import { useTargetData } from '../hooks/useTargetData.hook'
import { SelectCreateDataType, SelectCreateDataEnum } from './index.d'
import { RequestDataTypeEnum } from '@/enums/httpEnum'
const ChartDataStatic = loadAsyncComponent(() => import('./components/ChartDataStatic/index.vue'))
const ChartDataAjax = loadAsyncComponent(() => import('./components/ChartDataAjax/index.vue'))
@@ -44,6 +45,9 @@ const selectOptions: SelectCreateDataType[] = [
// 无数据源
const isNotData = computed(() => {
return typeof targetData.value?.option?.dataset === 'undefined'
return (
targetData.value.chartConfig?.chartFrame === ChartFrameEnum.STATIC ||
typeof targetData.value?.option?.dataset === 'undefined'
)
})
</script>