feat: 新增样式按需引入

This commit is contained in:
MTrun 2022-02-21 21:30:35 +08:00
parent f06aafd14e
commit a3b26ff247
5 changed files with 6 additions and 11 deletions

View File

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

View File

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

View File

@ -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
}
]