diff --git a/src/components/ChartItemSetting/GlobalSetting.vue b/src/components/ChartItemSetting/GlobalSetting.vue index b1869955..4aa10c68 100644 --- a/src/components/ChartItemSetting/GlobalSetting.vue +++ b/src/components/ChartItemSetting/GlobalSetting.vue @@ -246,7 +246,7 @@ import { } from '@/components/ChartItemSetting/index' const props = defineProps({ - data: { + optiondata: { type: Object as PropType, required: true }, @@ -258,19 +258,19 @@ const props = defineProps({ }) const title = computed(() => { - return props.data.title + return props.optiondata.title }) const xAxis = computed(() => { - return props.data.xAxis + return props.optiondata.xAxis }) const yAxis = computed(() => { - return props.data.yAxis + return props.optiondata.yAxis }) const legend = computed(() => { - return props.data.legend + return props.optiondata.legend }) diff --git a/src/packages/index.d.ts b/src/packages/index.d.ts index 8b646660..8403bc8d 100644 --- a/src/packages/index.d.ts +++ b/src/packages/index.d.ts @@ -1,4 +1,5 @@ import { Component } from '@/router/types' +import { GlobalThemeJsonType } from '@/settings/chartThemes/index' // 组件配置 export type ConfigType = { @@ -21,7 +22,7 @@ export interface PublicConfigType { export interface CreateComponentType extends PublicConfigType { key: string chartConfig: Omit - option: object + option: GlobalThemeJsonType } // 包分类枚举 diff --git a/src/settings/chartThemes/global.theme.json b/src/settings/chartThemes/global.theme.json index 33e84035..ef3f19ec 100644 --- a/src/settings/chartThemes/global.theme.json +++ b/src/settings/chartThemes/global.theme.json @@ -1,5 +1,6 @@ { "title": { + "show": true, "textStyle": { "color": "#BFBFBF", "fontSize": 18 @@ -10,10 +11,12 @@ } }, "xAxis": { + "show": true, "nameTextStyle": { "color": "#B9B8CE" }, "axisLabel": { + "show": true, "color": "#B9B8CE" }, "position": "bottom", @@ -25,9 +28,11 @@ "onZero": true }, "axisTick": { + "show": true, "length": 5 }, "splitLine": { + "show": true, "lineStyle": { "color": "#484753", "width": 1, @@ -36,14 +41,17 @@ } }, "yAxis": { + "show": true, "nameTextStyle": { "color": "#B9B8CE" }, "axisLabel": { + "show": true, "color": "#B9B8CE" }, "position": "left", "axisLine": { + "show": true, "lineStyle": { "color": "#B9B8CE", "width": 1 @@ -51,9 +59,11 @@ "onZero": true }, "axisTick": { + "show": true, "length": 5 }, "splitLine": { + "show": true, "lineStyle": { "color": "#484753", "width": 1, @@ -62,6 +72,7 @@ } }, "legend": { + "show": true, "top": "5%", "textStyle": { "color": "#B9B8CE" diff --git a/src/views/chart/ContentDetails/components/ChartSetting/index.vue b/src/views/chart/ContentDetails/components/ChartSetting/index.vue index 48ea3add..77aeb70c 100644 --- a/src/views/chart/ContentDetails/components/ChartSetting/index.vue +++ b/src/views/chart/ContentDetails/components/ChartSetting/index.vue @@ -12,7 +12,7 @@ /> - +