mirror of
https://gitee.com/dromara/go-view.git
synced 2024-12-02 03:38:27 +08:00
feat: 修改时间组件为静态组件
This commit is contained in:
parent
f3bfdeaccd
commit
1130deab48
@ -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'
|
||||
}
|
||||
|
@ -72,11 +72,6 @@ watch(
|
||||
immediate: true
|
||||
}
|
||||
)
|
||||
|
||||
// 预览更新
|
||||
useChartDataFetch(props.chartConfig, useChartEditStore, (newData: number | number[]) => {
|
||||
option.dataset = newData
|
||||
})
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
|
@ -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>
|
||||
|
Loading…
Reference in New Issue
Block a user