From f194dc39955e3602a10216fbd51026ddad328bdd Mon Sep 17 00:00:00 2001 From: huanghao1412 Date: Mon, 18 Mar 2024 19:21:44 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E7=94=B1=E7=88=B6=E7=BA=A7=E6=8E=A7?= =?UTF-8?q?=E5=88=B6=E4=B8=BB=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/App.vue | 42 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) diff --git a/src/App.vue b/src/App.vue index 91673fdc..029253c6 100644 --- a/src/App.vue +++ b/src/App.vue @@ -23,6 +23,8 @@ import { useRouterStore } from '@/store/modules/routerStore/routerStore' import { useOriginStore } from '@/store/modules/originStore/originStore' import { useGetMessageByParent } from '@/utils/utils' import router from '@/router' +import {useDesignStore} from "@/store/modules/designStore/designStore"; +import { AppThemeColorType } from '@/store/modules/designStore/designStore.d' const {getMessageByParent} = useGetMessageByParent() @@ -41,6 +43,46 @@ const originStore = useOriginStore() getMessageByParent('getStore', (e) => { if(e.data.type === 'getStore' && e.data.page === 'customLargeScreen') { originStore.setOriginStore(e.data.data, false) + let map: { [k: string]: AppThemeColorType } = { + blueTheme: { + "CMYK": [75, 41, 0, 0], + "RGB": [65,150,255], + "hex": "#4196ff", + "name": "天蓝", + "pinyin": "tianlan" + }, + greenTheme: { + "CMYK": [100, 0, 3, 17], + "RGB": [0,212,206], + "hex": "#00d4ce", + "name": "墨绿", + "pinyin": "molv" + }, + simpleTheme: { + "CMYK": [0, 82, 70, 35], + "RGB": [167,30,50], + "hex": "#a71e32", + "name": "简约", + "pinyin": "jianyue" + }, + whiteOrangeTheme: { + "CMYK": [0, 50, 100, 7], + "RGB": [238,119,0], + "hex": "#EE7700", + "name": "白橙", + "pinyin": "baicheng" + }, + lightSkyBlueTheme: { + "CMYK": [99, 11, 0, 5], + "RGB": [3,216,243], + "hex": "#03D8F3", + "name": "亮天蓝色", + "pinyin": "liangtianlanse" + }, + } + let theme = e.data.data.app.theme as string + const designStore = useDesignStore() + designStore.setAppColor(map[theme]) } })