From f83c1a5d507f5bb2882cf799e91eccc604cfeed5 Mon Sep 17 00:00:00 2001 From: wkj <278599135@qq.com> Date: Tue, 31 Oct 2023 17:45:21 +0800 Subject: [PATCH] =?UTF-8?q?feat=20=E6=A8=A1=E7=89=88=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- config/mp/env.js | 3 +- config/web/env.js | 3 +- template/src/config/styles/web/theme.less | 194 ---------------------- template/web/src/App.less | 1 - 4 files changed, 2 insertions(+), 199 deletions(-) delete mode 100644 template/src/config/styles/web/theme.less diff --git a/config/mp/env.js b/config/mp/env.js index 6cef528..f598c77 100644 --- a/config/mp/env.js +++ b/config/mp/env.js @@ -56,13 +56,12 @@ function getClientEnvironment() { // Useful for determining whether we’re running in production mode. // Most importantly, it switches React into the correct mode. NODE_ENV: process.env.NODE_ENV || 'development', - // process.env.OAK_PLATFORM: wechatMp | wechatPublic | web | node + // process.env.OAK_PLATFORM: wechatMp | web | node OAK_PLATFORM: 'wechatMp', } ); // Stringify all values so we can feed into webpack DefinePlugin const stringified = { - __DEV__: raw.NODE_ENV === 'development', 'process.env': Object.keys(raw).reduce((env, key) => { env[key] = JSON.stringify(raw[key]); return env; diff --git a/config/web/env.js b/config/web/env.js index 246c7c2..131e6a4 100644 --- a/config/web/env.js +++ b/config/web/env.js @@ -88,13 +88,12 @@ function getClientEnvironment(publicUrl) { // Whether or not react-refresh is enabled. // It is defined here so it is available in the webpackHotDevClient. FAST_REFRESH: process.env.FAST_REFRESH !== 'false', - // process.env.OAK_PLATFORM: wechatMp | wechatPublic | web | node + // process.env.OAK_PLATFORM: wechatMp | web | node OAK_PLATFORM: 'web', } ); // Stringify all values so we can feed into webpack DefinePlugin const stringified = { - __DEV__: raw.NODE_ENV === 'development', 'process.env': Object.keys(raw).reduce((env, key) => { env[key] = JSON.stringify(raw[key]); return env; diff --git a/template/src/config/styles/web/theme.less b/template/src/config/styles/web/theme.less deleted file mode 100644 index d48bb46..0000000 --- a/template/src/config/styles/web/theme.less +++ /dev/null @@ -1,194 +0,0 @@ -:root[theme-color=cyan] { - --td-brand-color: #0594fa; - --td-brand-color-1: #d7eefe; - --td-brand-color-2: #aeddfd; - --td-brand-color-3: #84cafd; - --td-brand-color-4: #58b8fc; - --td-brand-color-5: #29a4fb; - --td-brand-color-6: #0594fa; - --td-brand-color-7: #29a4fb; - --td-brand-color-8: #0594fa; - --td-brand-color-9: #0378df; - --td-brand-color-10: #01409b; -} - -:root[theme-color=green] { - --td-brand-color-1: #e8f8f2; - --td-brand-color-2: #bcebdc; - --td-brand-color-3: #85dbbe; - --td-brand-color-4: #48c79c; - --td-brand-color-5: #00a870; - --td-brand-color-6: #078d5c; - --td-brand-color-7: #067945; - --td-brand-color-8: #00a870; - --td-brand-color-9: #044f2a; - --td-brand-color-10: #033017; -} - -:root[theme-color=yellow] { - --td-brand-color: #ebb105; - --td-brand-color-1: #fde9ab; - --td-brand-color-2: #fbd152; - --td-brand-color-3: #ebb105; - --td-brand-color-4: #dda204; - --td-brand-color-5: #ca8d03; - --td-brand-color-6: #b67803; - --td-brand-color-7: #fbd152; - --td-brand-color-8: #ebb105; - --td-brand-color-9: #dda204; - --td-brand-color-10: #603100; -} - -:root[theme-color=orange] { - --td-brand-color-1: #fce5d7; - --td-brand-color-2: #f8cdaf; - --td-brand-color-3: #f4b285; - --td-brand-color-4: #f19659; - --td-brand-color-5: #ed7b2f; - --td-brand-color-6: #e75510; - --td-brand-color-7: #f19659; - --td-brand-color-8: #ed7b2f; - --td-brand-color-9: #e75510; - --td-brand-color-10: #7f0a02; - --td-brand-color: #ed7b2f; -} - -:root[theme-color=red] { - --td-brand-color: #e34d59; - --td-brand-color-1: #fbe5e7; - --td-brand-color-2: #f7ccd0; - --td-brand-color-3: #f3b2b8; - --td-brand-color-4: #ef989f; - --td-brand-color-5: #ea7b84; - --td-brand-color-6: #e34d59; - --td-brand-color-7: #ea7b84; - --td-brand-color-8: #e34d59; - --td-brand-color-9: #e42c3a; - --td-brand-color-10: #8d0309; -} - -:root[theme-color=pink] { - --td-brand-color: #ed49b4; - --td-brand-color-1: #fce5f4; - --td-brand-color-2: #facae9; - --td-brand-color-3: #f7aede; - --td-brand-color-4: #f491d2; - --td-brand-color-5: #f172c5; - --td-brand-color-6: #ed49b4; - --td-brand-color-7: #f172c5; - --td-brand-color-8: #ed49b4; - --td-brand-color-9: #e80f9d; - --td-brand-color-10: #8f025e; -} - -:root[theme-color=purple] { - --td-brand-color: #834ec2; - --td-brand-color-1: #eee6f7; - --td-brand-color-2: #ddceee; - --td-brand-color-3: #ccb6e6; - --td-brand-color-4: #bb9edc; - --td-brand-color-5: #ab87d5; - --td-brand-color-6: #9a6fce; - --td-brand-color-7: #9a6fce; - --td-brand-color-8: #834ec2; - --td-brand-color-9: #783ac3; - --td-brand-color-10: #4c1397; -} - -:root[theme-color=cyan][theme-mode=dark] { - --td-brand-color: #29a4fb; - --td-brand-color-1: #01409b; - --td-brand-color-2: #0152b3; - --td-brand-color-3: #0264ca; - --td-brand-color-4: #0378df; - --td-brand-color-5: #0594fa; - --td-brand-color-6: #29a4fb; - --td-brand-color-7: #0594fa; - --td-brand-color-8: #29a4fb; - --td-brand-color-9: #58b8fc; - --td-brand-color-10: #d7eefe; -} - -:root[theme-color=green][theme-mode=dark] { - --td-brand-color: #03a56f; - --td-brand-color-1: #024b15; - --td-brand-color-2: #03965c; - --td-brand-color-3: #03a56f; - --td-brand-color-4: #04c383; - --td-brand-color-5: #03965c; - --td-brand-color-6: #03a56f; - --td-brand-color-7: #04c383; - --td-brand-color-8: #03a56f; - --td-brand-color-9: #05eb9f; - --td-brand-color-10: #91fdd9; -} - -:root[theme-color=yellow][theme-mode=dark] { - --td-brand-color: #ca8d03; - --td-brand-color-1: #603100; - --td-brand-color-2: #764101; - --td-brand-color-3: #8c5201; - --td-brand-color-4: #a16502; - --td-brand-color-5: #b67803; - --td-brand-color-6: #ca8d03; - --td-brand-color-7: #764101; - --td-brand-color-8: #ca8d03; - --td-brand-color-9: #a16502; - --td-brand-color-10: #fde9ab; -} - -:root[theme-color=orange][theme-mode=dark] { - --td-brand-color: #ed7b2f; - --td-brand-color-1: #692204; - --td-brand-color-2: #873105; - --td-brand-color-3: #a24006; - --td-brand-color-4: #c25110; - --td-brand-color-5: #d66724; - --td-brand-color-6: #ed8139; - --td-brand-color-7: #ff9852; - --td-brand-color-8: #ed7b2f; - --td-brand-color-9: #ed7b2f; - --td-brand-color-10: #fce5d7; -} - -:root[theme-color=red][theme-mode=dark] { - --td-brand-color: #fb6e77; - --td-brand-color-1: #4f3335; - --td-brand-color-2: #960627; - --td-brand-color-3: #b01c37; - --td-brand-color-4: #c9384a; - --td-brand-color-5: #e35661; - --td-brand-color-6: #fb6e77; - --td-brand-color-7: #ff9195; - --td-brand-color-8: #fb6e77; - --td-brand-color-9: #ffd6d8; - --td-brand-color-10: #fff2f2; -} - -root[theme-color=pink][theme-mode=dark] { - --td-brand-color: #ff70cf; - --td-brand-color-1: #5b374f; - --td-brand-color-2: #9b066d; - --td-brand-color-3: #bc088a; - --td-brand-color-4: #d435a0; - --td-brand-color-5: #ed53b7; - --td-brand-color-6: #ff70cf; - --td-brand-color-7: #ff99e4; - --td-brand-color-8: #ff70cf; - --td-brand-color-9: #ffdbfd; - --td-brand-color-10: #fff2ff; -} - -root[theme-color=purple][theme-mode=dark] { - --td-brand-color: #ab87d5; - --td-brand-color-1: #4c1397; - --td-brand-color-2: #6325b0; - --td-brand-color-3: #783ac3; - --td-brand-color-4: #834ec2; - --td-brand-color-5: #9a6fce; - --td-brand-color-6: #ab87d5; - --td-brand-color-7: #ab87d5; - --td-brand-color-8: #ab87d5; - --td-brand-color-9: #ccb6e6; - --td-brand-color-10: #eee6f7; -} \ No newline at end of file diff --git a/template/web/src/App.less b/template/web/src/App.less index 80df660..77472d6 100644 --- a/template/web/src/App.less +++ b/template/web/src/App.less @@ -1,2 +1 @@ @import '@project/config/styles/web/index.less'; // 少量公共样式 -@import '@project/config/styles/web/theme.less'; \ No newline at end of file