From 9d541d5ac3d780f478814a129fe949a3a25b3413 Mon Sep 17 00:00:00 2001 From: MTrun <1262327911@qq.com> Date: Tue, 8 Feb 2022 19:39:57 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E6=94=B9=E5=85=A8=E5=B1=80?= =?UTF-8?q?=E9=85=8D=E7=BD=AE=E5=B1=95=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Charts/Bars/BarCommon/config.ts | 2 +- .../Charts/Bars/BarCrossrange/config.ts | 2 +- .../Charts/Lines/LineCommon/config.ts | 2 +- .../Charts/Pies/PieCommon/config.ts | 2 +- src/packages/{utils => public}/chart.ts | 0 src/packages/public/index.ts | 2 + .../{utils => public}/publicConfig.ts | 0 src/packages/utils/index.ts | 2 - src/plugins/icon.ts | 11 +++- .../components/ChartSysSetting/index.ts | 3 ++ .../components/ChartSysSetting/index.vue | 15 ++++++ .../components/ChartTheme/index.vue | 53 +++++++++---------- .../components/CanvasPage/index.vue | 48 +++++++++++++++-- src/views/chart/ContentDetails/index.vue | 8 +-- src/views/chart/hooks/useContextMenu.hook.ts | 2 +- 15 files changed, 108 insertions(+), 44 deletions(-) rename src/packages/{utils => public}/chart.ts (100%) create mode 100644 src/packages/public/index.ts rename src/packages/{utils => public}/publicConfig.ts (100%) delete mode 100644 src/packages/utils/index.ts create mode 100644 src/views/chart/ContentDetails/components/CanvasPage/components/ChartSysSetting/index.ts create mode 100644 src/views/chart/ContentDetails/components/CanvasPage/components/ChartSysSetting/index.vue diff --git a/src/packages/components/Charts/Bars/BarCommon/config.ts b/src/packages/components/Charts/Bars/BarCommon/config.ts index d1eec9f9..58abf30e 100644 --- a/src/packages/components/Charts/Bars/BarCommon/config.ts +++ b/src/packages/components/Charts/Bars/BarCommon/config.ts @@ -1,4 +1,4 @@ -import { echartOptionProfixHandle, publicConfig } from '@/packages/utils' +import { echartOptionProfixHandle, publicConfig } from '@/packages/public' import { BarCommonConfig } from './index' import { ConfigType, CreateComponentType } from '@/packages/index.d' import omit from 'lodash/omit' diff --git a/src/packages/components/Charts/Bars/BarCrossrange/config.ts b/src/packages/components/Charts/Bars/BarCrossrange/config.ts index b3ea2cda..317a209b 100644 --- a/src/packages/components/Charts/Bars/BarCrossrange/config.ts +++ b/src/packages/components/Charts/Bars/BarCrossrange/config.ts @@ -1,4 +1,4 @@ -import { echartOptionProfixHandle, publicConfig } from '@/packages/utils' +import { echartOptionProfixHandle, publicConfig } from '@/packages/public' import { BarCrossrangefig } from './index' import { ConfigType, CreateComponentType } from '@/packages/index.d' import omit from 'lodash/omit' diff --git a/src/packages/components/Charts/Lines/LineCommon/config.ts b/src/packages/components/Charts/Lines/LineCommon/config.ts index 430c607e..33877106 100644 --- a/src/packages/components/Charts/Lines/LineCommon/config.ts +++ b/src/packages/components/Charts/Lines/LineCommon/config.ts @@ -1,4 +1,4 @@ -import { echartOptionProfixHandle, publicConfig } from '@/packages/utils' +import { echartOptionProfixHandle, publicConfig } from '@/packages/public' import { LineCommonConfig } from './index' import { ConfigType, CreateComponentType } from '@/packages/index.d' import omit from 'lodash/omit' diff --git a/src/packages/components/Charts/Pies/PieCommon/config.ts b/src/packages/components/Charts/Pies/PieCommon/config.ts index 32dae1d4..c3edac24 100644 --- a/src/packages/components/Charts/Pies/PieCommon/config.ts +++ b/src/packages/components/Charts/Pies/PieCommon/config.ts @@ -1,4 +1,4 @@ -import { echartOptionProfixHandle, publicConfig } from '@/packages/utils' +import { echartOptionProfixHandle, publicConfig } from '@/packages/public' import { PieCommonConfig } from './index' import { ConfigType, CreateComponentType } from '@/packages/index.d' import omit from 'lodash/omit' diff --git a/src/packages/utils/chart.ts b/src/packages/public/chart.ts similarity index 100% rename from src/packages/utils/chart.ts rename to src/packages/public/chart.ts diff --git a/src/packages/public/index.ts b/src/packages/public/index.ts new file mode 100644 index 00000000..f6810cf5 --- /dev/null +++ b/src/packages/public/index.ts @@ -0,0 +1,2 @@ +export * from '@/packages/public/chart' +export * from '@/packages/public/publicConfig' diff --git a/src/packages/utils/publicConfig.ts b/src/packages/public/publicConfig.ts similarity index 100% rename from src/packages/utils/publicConfig.ts rename to src/packages/public/publicConfig.ts diff --git a/src/packages/utils/index.ts b/src/packages/utils/index.ts deleted file mode 100644 index d32ad0d3..00000000 --- a/src/packages/utils/index.ts +++ /dev/null @@ -1,2 +0,0 @@ -export * from '@/packages/utils/chart' -export * from '@/packages/utils/publicConfig' diff --git a/src/plugins/icon.ts b/src/plugins/icon.ts index 51ded250..e9add1eb 100644 --- a/src/plugins/icon.ts +++ b/src/plugins/icon.ts @@ -43,7 +43,8 @@ import { ClipboardOutline as ClipboardOutlineIcon, BrowsersOutline as BrowsersOutlineIcon, Cut as CutIcon, - Square as SquareIcon + Square as SquareIcon, + ColorPalette as ColorPaletteIcon, } from '@vicons/ionicons5' import { @@ -59,6 +60,7 @@ import { DownToBottom as DownToBottomIcon, StackedMove as StackedMoveIcon, PaintBrush as PaintBrushIcon, + ComposerEdit as ZAxisIcon, } from '@vicons/carbon' const ionicons5 = { @@ -150,7 +152,10 @@ const ionicons5 = { // 剪贴 CutIcon, // 正方形 - SquareIcon + SquareIcon, + // 色彩选择 + ColorPaletteIcon, + ZAxisIcon } const carbon = { @@ -178,6 +183,8 @@ const carbon = { StackedMoveIcon, // 清空剪切板(刷子) PaintBrushIcon, + // 坐标轴 + ZAxisIcon } // https://www.xicons.org/#/ 还有很多 diff --git a/src/views/chart/ContentDetails/components/CanvasPage/components/ChartSysSetting/index.ts b/src/views/chart/ContentDetails/components/CanvasPage/components/ChartSysSetting/index.ts new file mode 100644 index 00000000..2c3c996e --- /dev/null +++ b/src/views/chart/ContentDetails/components/CanvasPage/components/ChartSysSetting/index.ts @@ -0,0 +1,3 @@ +import ChartSysSetting from './index.vue' + +export { ChartSysSetting } diff --git a/src/views/chart/ContentDetails/components/CanvasPage/components/ChartSysSetting/index.vue b/src/views/chart/ContentDetails/components/CanvasPage/components/ChartSysSetting/index.vue new file mode 100644 index 00000000..1330d6df --- /dev/null +++ b/src/views/chart/ContentDetails/components/CanvasPage/components/ChartSysSetting/index.vue @@ -0,0 +1,15 @@ + + + 图表全局设置 + + + + + + diff --git a/src/views/chart/ContentDetails/components/CanvasPage/components/ChartTheme/index.vue b/src/views/chart/ContentDetails/components/CanvasPage/components/ChartTheme/index.vue index d02d1c1d..be282e08 100644 --- a/src/views/chart/ContentDetails/components/CanvasPage/components/ChartTheme/index.vue +++ b/src/views/chart/ContentDetails/components/CanvasPage/components/ChartTheme/index.vue @@ -1,33 +1,29 @@ - - - - - {{ chartColorsName[key] }} - - - - - - + + + {{ chartColorsName[key] }} + + + + @@ -67,6 +63,7 @@ const selectTheme = (theme: string) => { diff --git a/src/views/chart/ContentDetails/index.vue b/src/views/chart/ContentDetails/index.vue index 1c46f31c..e82d9945 100644 --- a/src/views/chart/ContentDetails/index.vue +++ b/src/views/chart/ContentDetails/index.vue @@ -124,16 +124,16 @@ watch(getDetails, newData => { }) // 页面设置 -const globalTabList = reactive([ +const globalTabList = [ { key: 'pageSetting', title: '页面配置', icon: DesktopOutlineIcon, render: CanvasPage } -]) +] -const canvasTabList = shallowRef([ +const canvasTabList = [ { key: 'ChartSetting', title: '定制', @@ -146,7 +146,7 @@ const canvasTabList = shallowRef([ icon: FlashIcon, render: ChartBehind } -]) +]