feat: 新增全局样式设置

This commit is contained in:
MTrun
2022-02-21 19:45:11 +08:00
parent f91b1d7f8a
commit b980c79ab4
11 changed files with 162 additions and 61 deletions
@@ -34,7 +34,8 @@ import { EditCanvasConfigEnum } from '@/store/modules/chartEditStore/chartEditSt
import {
chartColors,
chartColorsName,
chartColorsshow
chartColorsshow,
ChartColorsNameType
} from '@/settings/chartThemes/index'
import { useDesignStore } from '@/store/modules/designStore/designStore'
import cloneDeep from 'lodash/cloneDeep'
@@ -48,7 +49,7 @@ const designStore = useDesignStore()
const themeColor = ref(designStore.getAppTheme)
const selectName = computed(() => {
return chartEditStoreStore.getEditCanvasConfig.chartTheme
return chartEditStoreStore.getEditCanvasConfig.chartThemeColor
})
// 获取用来展示的色号
@@ -56,8 +57,9 @@ const fetchShowColors = (colors: Array<string>) => {
return cloneDeep(colors).splice(0, 6)
}
const selectTheme = (theme: string) => {
chartEditStoreStore.setEditCanvasConfig(EditCanvasConfigEnum.CHART_THEME, theme)
// 设置主体色(在 ContentEdit > List 中进行注入)
const selectTheme = (theme: ChartColorsNameType) => {
chartEditStoreStore.setEditCanvasConfig(EditCanvasConfigEnum.CHART_THEME_COLOR, theme)
}
</script>
@@ -142,7 +142,7 @@ const switchSelectColorLoading = ref(false)
const globalTabList = [
{
key: 'ChartTheme',
title: '主题',
title: '主题颜色',
icon: ColorPaletteIcon,
render: ChartTheme
},