瀏覽代碼

feat: 新增样式按需引入

MTrun 3 年之前
父節點
當前提交
3745e2afcd

+ 0 - 3
src/views/chart/ContentDetails/components/CanvasPage/components/ChartSysSetting/index.ts

@@ -1,3 +0,0 @@
-import ChartSysSetting from './index.vue'
-
-export { ChartSysSetting }

+ 0 - 0
src/views/chart/ContentDetails/components/CanvasPage/components/ChartSysSetting/index.vue → src/views/chart/ContentDetails/components/CanvasPage/components/ChartThemSetting/index.vue


+ 0 - 3
src/views/chart/ContentDetails/components/CanvasPage/components/ChartTheme/index.ts

@@ -1,3 +0,0 @@
-import ChartTheme from './index.vue'
-
-export { ChartTheme }

+ 0 - 0
src/views/chart/ContentDetails/components/CanvasPage/components/ChartTheme/index.vue → src/views/chart/ContentDetails/components/CanvasPage/components/ChartThemeColor/index.vue


+ 6 - 5
src/views/chart/ContentDetails/components/CanvasPage/index.vue

@@ -124,9 +124,7 @@ import { backgroundImageSize } from '@/settings/designSetting'
 import { useChartEditStoreStore } from '@/store/modules/chartEditStore/chartEditStore'
 import { EditCanvasConfigEnum } from '@/store/modules/chartEditStore/chartEditStore.d'
 import { UploadCustomRequestOptions } from 'naive-ui'
-import { ChartTheme } from './components/ChartTheme/index'
-import { ChartSysSetting } from './components/ChartSysSetting/index'
-import { fileToUrl } from '@/utils'
+import { fileToUrl, loadAsyncComponent } from '@/utils'
 import { icon } from '@/plugins'
 
 const { ColorPaletteIcon } = icon.ionicons5
@@ -138,19 +136,22 @@ const canvasConfig = chartEditStoreStore.getEditCanvasConfig
 const uploadFileListRef = ref()
 const switchSelectColorLoading = ref(false)
 
+const ChartThemeColor = loadAsyncComponent(() => import('./components/ChartThemeColor/index.vue'))
+const ChartThemSetting = loadAsyncComponent(() => import('./components/ChartThemSetting/index.vue'))
+
 // 页面设置
 const globalTabList = [
   {
     key: 'ChartTheme',
     title: '主题颜色',
     icon: ColorPaletteIcon,
-    render: ChartTheme
+    render: ChartThemeColor
   },
   {
     key: 'ChartSysSetting',
     title: '全局图表',
     icon: ZAxisIcon,
-    render: ChartSysSetting
+    render: ChartThemSetting
   }
 ]