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

View File

@ -9,6 +9,6 @@ export const InputsDateConfig: ConfigType = {
category: ChatCategoryEnum.INPUTS,
categoryName: ChatCategoryEnumName.INPUTS,
package: PackagesCategoryEnum.INFORMATIONS,
chartFrame: ChartFrameEnum.COMMON,
chartFrame: ChartFrameEnum.STATIC,
image: 'inputs_date.png'
}

View File

@ -72,11 +72,6 @@ watch(
immediate: true
}
)
//
useChartDataFetch(props.chartConfig, useChartEditStore, (newData: number | number[]) => {
option.dataset = newData
})
</script>
<style lang="scss" scoped>

View File

@ -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>