diff --git a/src/packages/components/Decorates/Decorates/Decorates03/config.ts b/src/packages/components/Decorates/Decorates/Decorates03/config.ts index 169688f1..3baa8a48 100644 --- a/src/packages/components/Decorates/Decorates/Decorates03/config.ts +++ b/src/packages/components/Decorates/Decorates/Decorates03/config.ts @@ -4,7 +4,6 @@ import { Decorates03Config } from './index' import cloneDeep from 'lodash/cloneDeep' export const option = { - dataset: '装饰-03', textColor: '#fff', textSize: 24, colors: ['#1dc1f5', '#1dc1f5'], diff --git a/src/views/chart/ContentConfigurations/components/ChartData/components/ChartDataMatchingAndShow/index.vue b/src/views/chart/ContentConfigurations/components/ChartData/components/ChartDataMatchingAndShow/index.vue index 97d2c560..1025a3e0 100644 --- a/src/views/chart/ContentConfigurations/components/ChartData/components/ChartDataMatchingAndShow/index.vue +++ b/src/views/chart/ContentConfigurations/components/ChartData/components/ChartDataMatchingAndShow/index.vue @@ -164,21 +164,23 @@ const dimensionsAndSourceHandle = () => { watch( () => targetData.value?.option?.dataset, ( - newData: { + newData?: { source: any dimensions: any } | null ) => { - if (newData && isObject(newData)) { - // 只有 Echarts 数据才有对应的格式 + if (newData && targetData?.value?.chartConfig?.chartFrame === ChartFrameEnum.ECHARTS) { + // 只有 DataSet 数据才有对应的格式 source.value = newData if (isCharts.value) { dimensions.value = newData.dimensions dimensionsAndSource.value = dimensionsAndSourceHandle() } - } else { + } else if (newData !== undefined && newData !== null) { dimensionsAndSource.value = null source.value = newData + } else { + source.value = '此组件无数据源' } }, { diff --git a/src/views/chart/ContentConfigurations/components/ChartData/index.vue b/src/views/chart/ContentConfigurations/components/ChartData/index.vue index 20569814..19720a70 100644 --- a/src/views/chart/ContentConfigurations/components/ChartData/index.vue +++ b/src/views/chart/ContentConfigurations/components/ChartData/index.vue @@ -1,16 +1,11 @@ \ No newline at end of file + +// 无数据源 +const isNotData = computed(() => { + return typeof targetData.value?.option?.dataset === 'undefined' +}) +