Commit 8180b2d15fcf53baf06993643f6f39c377d9c300

Authored by vben
1 parent 699cf6d7

chore: 暂时移除主题切换及暗黑模式切换功能

README.md
... ... @@ -131,7 +131,6 @@ If these plugins are helpful to you, you can give a star support
131 131  
132 132 - [vite-plugin-mock](https://github.com/anncwb/vite-plugin-mock) - Used for local and development environment data mock
133 133 - [vite-plugin-html](https://github.com/anncwb/vite-plugin-html) - Used for html template conversion and compression
134   -- [vite-plugin-theme](https://github.com/anncwb/vite-plugin-theme) - Used for online switching of theme colors and other color-related configurations
135 134 - [vite-plugin-compression](https://github.com/anncwb/vite-plugin-compression) - Used to pack input .gz|.brotil files
136 135 - [vite-plugin-svg-icons](https://github.com/anncwb/vite-plugin-svg-icons) - Used to quickly generate svg sprite
137 136  
... ...
README.zh-CN.md
... ... @@ -141,7 +141,6 @@ pnpm build
141 141  
142 142 - [vite-plugin-mock](https://github.com/anncwb/vite-plugin-mock) - 用于本地及开发环境数据 mock
143 143 - [vite-plugin-html](https://github.com/anncwb/vite-plugin-html) - 用于 html 模版转换及压缩
144   -- [vite-plugin-theme](https://github.com/anncwb/vite-plugin-theme) - 用于在线切换主题色等颜色相关配置
145 144 - [vite-plugin-compression](https://github.com/anncwb/vite-plugin-compression) - 用于打包输出.gz|.brotil 文件
146 145 - [vite-plugin-svg-icons](https://github.com/anncwb/vite-plugin-svg-icons) - 用于快速生成 svg 雪碧图
147 146  
... ...
build/vite/plugin/index.ts
... ... @@ -8,7 +8,6 @@ import { configHtmlPlugin } from './html';
8 8 import { configMockPlugin } from './mock';
9 9 import { configCompressPlugin } from './compress';
10 10 import { configVisualizerConfig } from './visualizer';
11   -import { configThemePlugin } from './theme';
12 11 import { configSvgIconsPlugin } from './svgSprite';
13 12  
14 13 export function createVitePlugins(viteEnv: ViteEnv, isBuild: boolean) {
... ... @@ -44,9 +43,6 @@ export function createVitePlugins(viteEnv: ViteEnv, isBuild: boolean) {
44 43 // rollup-plugin-visualizer
45 44 vitePlugins.push(configVisualizerConfig());
46 45  
47   - // vite-plugin-theme
48   - vitePlugins.push(configThemePlugin(isBuild));
49   -
50 46 // The following plugins only work in the production environment
51 47 if (isBuild) {
52 48 // rollup-plugin-gzip
... ...
build/vite/plugin/theme.ts deleted 100644 → 0
1   -/**
2   - * Vite plugin for website theme color switching
3   - * https://github.com/anncwb/vite-plugin-theme
4   - */
5   -import type { PluginOption } from 'vite';
6   -import path from 'path';
7   -import {
8   - viteThemePlugin,
9   - antdDarkThemePlugin,
10   - mixLighten,
11   - mixDarken,
12   - tinycolor,
13   -} from 'vite-plugin-theme';
14   -import { getThemeColors, generateColors } from '../../config/themeConfig';
15   -import { generateModifyVars } from '../../generate/generateModifyVars';
16   -
17   -export function configThemePlugin(isBuild: boolean): PluginOption[] {
18   - const colors = generateColors({
19   - mixDarken,
20   - mixLighten,
21   - tinycolor,
22   - });
23   - const plugin = [
24   - viteThemePlugin({
25   - resolveSelector: (s) => {
26   - s = s.trim();
27   - switch (s) {
28   - case '.ant-steps-item-process .ant-steps-item-icon > .ant-steps-icon':
29   - return '.ant-steps-item-icon > .ant-steps-icon';
30   - case '.ant-radio-button-wrapper-checked:not(.ant-radio-button-wrapper-disabled)':
31   - case '.ant-radio-button-wrapper-checked:not(.ant-radio-button-wrapper-disabled):hover':
32   - case '.ant-radio-button-wrapper-checked:not(.ant-radio-button-wrapper-disabled):active':
33   - return s;
34   - case '.ant-steps-item-icon > .ant-steps-icon':
35   - return s;
36   - case '.ant-select-item-option-selected:not(.ant-select-item-option-disabled)':
37   - return s;
38   - default:
39   - if (s.indexOf('.ant-btn') >= -1) {
40   - // 按钮被重新定制过,需要过滤掉class防止覆盖
41   - return s;
42   - }
43   - }
44   - return s.startsWith('[data-theme') ? s : `[data-theme] ${s}`;
45   - },
46   - colorVariables: [...getThemeColors(), ...colors],
47   - }),
48   - antdDarkThemePlugin({
49   - preloadFiles: [
50   - path.resolve(process.cwd(), 'node_modules/ant-design-vue/dist/antd.less'),
51   - //path.resolve(process.cwd(), 'node_modules/ant-design-vue/dist/antd.dark.less'),
52   - path.resolve(process.cwd(), 'src/design/index.less'),
53   - ],
54   - filter: (id) => (isBuild ? !id.endsWith('antd.less') : true),
55   - // extractCss: false,
56   - darkModifyVars: {
57   - ...generateModifyVars(true),
58   - 'text-color': '#c9d1d9',
59   - 'primary-1': 'rgb(255 255 255 / 8%)',
60   - 'text-color-base': '#c9d1d9',
61   - 'component-background': '#151515',
62   - 'heading-color': 'rgb(255 255 255 / 65%)',
63   - // black: '#0e1117',
64   - // #8b949e
65   - 'text-color-secondary': '#8b949e',
66   - 'border-color-base': '#303030',
67   - // 'border-color-split': '#30363d',
68   - 'item-active-bg': '#111b26',
69   - 'app-content-background': '#1e1e1e',
70   - 'tree-node-selected-bg': '#11263c',
71   -
72   - 'alert-success-border-color': '#274916',
73   - 'alert-success-bg-color': '#162312',
74   - 'alert-success-icon-color': '#49aa19',
75   - 'alert-info-border-color': '#153450',
76   - 'alert-info-bg-color': '#111b26',
77   - 'alert-info-icon-color': '#177ddc',
78   - 'alert-warning-border-color': '#594214',
79   - 'alert-warning-bg-color': '#2b2111',
80   - 'alert-warning-icon-color': '#d89614',
81   - 'alert-error-border-color': '#58181c',
82   - 'alert-error-bg-color': '#2a1215',
83   - 'alert-error-icon-color': '#a61d24',
84   - },
85   - }),
86   - ];
87   -
88   - return plugin as unknown as PluginOption[];
89   -}
package.json
... ... @@ -173,14 +173,13 @@
173 173 "stylelint-order": "^5.0.0",
174 174 "ts-node": "^10.7.0",
175 175 "typescript": "^4.6.3",
176   - "vite": "^2.9.5",
  176 + "vite": "^4.3.0-beta.1",
177 177 "vite-plugin-compression": "^0.5.1",
178 178 "vite-plugin-html": "^3.2.0",
179 179 "vite-plugin-mkcert": "^1.6.0",
180 180 "vite-plugin-mock": "^2.9.6",
181 181 "vite-plugin-purge-icons": "^0.8.1",
182 182 "vite-plugin-svg-icons": "^2.0.1",
183   - "vite-plugin-theme": "^0.8.6",
184 183 "vite-plugin-windicss": "^1.8.4",
185 184 "vue-eslint-parser": "^8.3.0",
186 185 "vue-tsc": "^1.0.9"
... ...
pnpm-lock.yaml
... ... @@ -190,7 +190,7 @@ importers:
190 190 version: 5.20.0(eslint@8.13.0)(typescript@4.6.3)
191 191 '@vitejs/plugin-vue':
192 192 specifier: ^2.3.1
193   - version: 2.3.1(vite@2.9.5)(vue@3.2.47)
  193 + version: 2.3.1(vite@4.3.0-beta.1)(vue@3.2.47)
194 194 '@vitejs/plugin-vue-jsx':
195 195 specifier: ^1.3.10
196 196 version: 1.3.10
... ... @@ -303,32 +303,29 @@ importers:
303 303 specifier: ^4.6.3
304 304 version: 4.6.3
305 305 vite:
306   - specifier: ^2.9.5
307   - version: 2.9.5(less@4.1.2)(sass@1.57.1)
  306 + specifier: ^4.3.0-beta.1
  307 + version: 4.3.0-beta.1(@types/node@17.0.25)(less@4.1.2)(sass@1.57.1)
308 308 vite-plugin-compression:
309 309 specifier: ^0.5.1
310   - version: 0.5.1(vite@2.9.5)
  310 + version: 0.5.1(vite@4.3.0-beta.1)
311 311 vite-plugin-html:
312 312 specifier: ^3.2.0
313   - version: 3.2.0(vite@2.9.5)
  313 + version: 3.2.0(vite@4.3.0-beta.1)
314 314 vite-plugin-mkcert:
315 315 specifier: ^1.6.0
316 316 version: 1.6.0
317 317 vite-plugin-mock:
318 318 specifier: ^2.9.6
319   - version: 2.9.6(mockjs@1.1.0)(rollup@2.70.2)(vite@2.9.5)
  319 + version: 2.9.6(mockjs@1.1.0)(rollup@2.70.2)(vite@4.3.0-beta.1)
320 320 vite-plugin-purge-icons:
321 321 specifier: ^0.8.1
322   - version: 0.8.1(vite@2.9.5)
  322 + version: 0.8.1(vite@4.3.0-beta.1)
323 323 vite-plugin-svg-icons:
324 324 specifier: ^2.0.1
325   - version: 2.0.1(vite@2.9.5)
326   - vite-plugin-theme:
327   - specifier: ^0.8.6
328   - version: 0.8.6(vite@2.9.5)
  325 + version: 2.0.1(vite@4.3.0-beta.1)
329 326 vite-plugin-windicss:
330 327 specifier: ^1.8.4
331   - version: 1.8.4(vite@2.9.5)
  328 + version: 1.8.4(vite@4.3.0-beta.1)
332 329 vue-eslint-parser:
333 330 specifier: ^8.3.0
334 331 version: 8.3.0(eslint@8.13.0)
... ... @@ -951,15 +948,6 @@ packages:
951 948 dev: true
952 949 optional: true
953 950  
954   - /@esbuild/linux-loong64@0.14.54:
955   - resolution: {integrity: sha512-bZBrLAIX1kpWelV0XemxBZllyRmM6vgFQQG2GdNb+r3Fkp0FOh1NJSvekXDs7jq70k4euu1cryLMfU+mTXlEpw==}
956   - engines: {node: '>=12'}
957   - cpu: [loong64]
958   - os: [linux]
959   - requiresBuild: true
960   - dev: true
961   - optional: true
962   -
963 951 /@esbuild/linux-loong64@0.17.14:
964 952 resolution: {integrity: sha512-vp15H+5NR6hubNgMluqqKza85HcGJgq7t6rMH7O3Y6ApiOWPkvW2AJfNojUQimfTp6OUrACUXfR4hmpcENXoMQ==}
965 953 engines: {node: '>=12'}
... ... @@ -1547,6 +1535,7 @@ packages:
1547 1535  
1548 1536 /@types/node@14.18.42:
1549 1537 resolution: {integrity: sha512-xefu+RBie4xWlK8hwAzGh3npDz/4VhF6icY/shU+zv/1fNn+ZVG7T7CRwe9LId9sAYRPxI+59QBPuKL3WpyGRg==}
  1538 + dev: false
1550 1539  
1551 1540 /@types/node@17.0.25:
1552 1541 resolution: {integrity: sha512-wANk6fBrUwdpY4isjWrKTufkrXdu1D2YHCot2fD/DfWxF5sMrVSA+KN7ydckvaTCh0HiqX9IVl0L5/ZoXg5M7w==}
... ... @@ -1606,10 +1595,6 @@ packages:
1606 1595 '@types/node': 17.0.25
1607 1596 dev: true
1608 1597  
1609   - /@types/tinycolor2@1.4.3:
1610   - resolution: {integrity: sha512-Kf1w9NE5HEgGxCRyIcRXR/ZYtDv0V8FVPtYHwLxl0O+maGX0erE77pQlD0gpP+/KByMZ87mOA79SjifhSB3PjQ==}
1611   - dev: true
1612   -
1613 1598 /@typescript-eslint/eslint-plugin@5.20.0(@typescript-eslint/parser@5.20.0)(eslint@8.13.0)(typescript@4.6.3):
1614 1599 resolution: {integrity: sha512-fapGzoxilCn3sBtC6NtXZX6+P/Hef7VDbyfGqTTpzYydwhlkevB+0vE0EnmHPVTVSy68GUncyJ/2PcrFBeCo5Q==}
1615 1600 engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0}
... ... @@ -1750,14 +1735,14 @@ packages:
1750 1735 - supports-color
1751 1736 dev: true
1752 1737  
1753   - /@vitejs/plugin-vue@2.3.1(vite@2.9.5)(vue@3.2.47):
  1738 + /@vitejs/plugin-vue@2.3.1(vite@4.3.0-beta.1)(vue@3.2.47):
1754 1739 resolution: {integrity: sha512-YNzBt8+jt6bSwpt7LP890U1UcTOIZZxfpE5WOJ638PNxSEKOqAi0+FSKS0nVeukfdZ0Ai/H7AFd6k3hayfGZqQ==}
1755 1740 engines: {node: '>=12.0.0'}
1756 1741 peerDependencies:
1757 1742 vite: ^2.5.10
1758 1743 vue: ^3.2.25
1759 1744 dependencies:
1760   - vite: 2.9.5(less@4.1.2)(sass@1.57.1)
  1745 + vite: 4.3.0-beta.1(@types/node@17.0.25)(less@4.1.2)(sass@1.57.1)
1761 1746 vue: 3.2.47
1762 1747 dev: true
1763 1748  
... ... @@ -3506,160 +3491,12 @@ packages:
3506 3491 is-symbol: 1.0.4
3507 3492 dev: true
3508 3493  
3509   - /esbuild-android-64@0.14.54:
3510   - resolution: {integrity: sha512-Tz2++Aqqz0rJ7kYBfz+iqyE3QMycD4vk7LBRyWaAVFgFtQ/O8EJOnVmTOiDWYZ/uYzB4kvP+bqejYdVKzE5lAQ==}
3511   - engines: {node: '>=12'}
3512   - cpu: [x64]
3513   - os: [android]
3514   - requiresBuild: true
3515   - dev: true
3516   - optional: true
3517   -
3518   - /esbuild-android-arm64@0.14.54:
3519   - resolution: {integrity: sha512-F9E+/QDi9sSkLaClO8SOV6etqPd+5DgJje1F9lOWoNncDdOBL2YF59IhsWATSt0TLZbYCf3pNlTHvVV5VfHdvg==}
3520   - engines: {node: '>=12'}
3521   - cpu: [arm64]
3522   - os: [android]
3523   - requiresBuild: true
3524   - dev: true
3525   - optional: true
3526   -
3527   - /esbuild-darwin-64@0.14.54:
3528   - resolution: {integrity: sha512-jtdKWV3nBviOd5v4hOpkVmpxsBy90CGzebpbO9beiqUYVMBtSc0AL9zGftFuBon7PNDcdvNCEuQqw2x0wP9yug==}
3529   - engines: {node: '>=12'}
3530   - cpu: [x64]
3531   - os: [darwin]
3532   - requiresBuild: true
3533   - dev: true
3534   - optional: true
3535   -
3536   - /esbuild-darwin-arm64@0.14.54:
3537   - resolution: {integrity: sha512-OPafJHD2oUPyvJMrsCvDGkRrVCar5aVyHfWGQzY1dWnzErjrDuSETxwA2HSsyg2jORLY8yBfzc1MIpUkXlctmw==}
3538   - engines: {node: '>=12'}
3539   - cpu: [arm64]
3540   - os: [darwin]
3541   - requiresBuild: true
3542   - dev: true
3543   - optional: true
3544   -
3545   - /esbuild-freebsd-64@0.14.54:
3546   - resolution: {integrity: sha512-OKwd4gmwHqOTp4mOGZKe/XUlbDJ4Q9TjX0hMPIDBUWWu/kwhBAudJdBoxnjNf9ocIB6GN6CPowYpR/hRCbSYAg==}
3547   - engines: {node: '>=12'}
3548   - cpu: [x64]
3549   - os: [freebsd]
3550   - requiresBuild: true
3551   - dev: true
3552   - optional: true
3553   -
3554   - /esbuild-freebsd-arm64@0.14.54:
3555   - resolution: {integrity: sha512-sFwueGr7OvIFiQT6WeG0jRLjkjdqWWSrfbVwZp8iMP+8UHEHRBvlaxL6IuKNDwAozNUmbb8nIMXa7oAOARGs1Q==}
3556   - engines: {node: '>=12'}
3557   - cpu: [arm64]
3558   - os: [freebsd]
3559   - requiresBuild: true
3560   - dev: true
3561   - optional: true
3562   -
3563   - /esbuild-linux-32@0.14.54:
3564   - resolution: {integrity: sha512-1ZuY+JDI//WmklKlBgJnglpUL1owm2OX+8E1syCD6UAxcMM/XoWd76OHSjl/0MR0LisSAXDqgjT3uJqT67O3qw==}
3565   - engines: {node: '>=12'}
3566   - cpu: [ia32]
3567   - os: [linux]
3568   - requiresBuild: true
3569   - dev: true
3570   - optional: true
3571   -
3572   - /esbuild-linux-64@0.14.54:
3573   - resolution: {integrity: sha512-EgjAgH5HwTbtNsTqQOXWApBaPVdDn7XcK+/PtJwZLT1UmpLoznPd8c5CxqsH2dQK3j05YsB3L17T8vE7cp4cCg==}
3574   - engines: {node: '>=12'}
3575   - cpu: [x64]
3576   - os: [linux]
3577   - requiresBuild: true
3578   - dev: true
3579   - optional: true
3580   -
3581   - /esbuild-linux-arm64@0.14.54:
3582   - resolution: {integrity: sha512-WL71L+0Rwv+Gv/HTmxTEmpv0UgmxYa5ftZILVi2QmZBgX3q7+tDeOQNqGtdXSdsL8TQi1vIaVFHUPDe0O0kdig==}
3583   - engines: {node: '>=12'}
3584   - cpu: [arm64]
3585   - os: [linux]
3586   - requiresBuild: true
3587   - dev: true
3588   - optional: true
3589   -
3590   - /esbuild-linux-arm@0.14.54:
3591   - resolution: {integrity: sha512-qqz/SjemQhVMTnvcLGoLOdFpCYbz4v4fUo+TfsWG+1aOu70/80RV6bgNpR2JCrppV2moUQkww+6bWxXRL9YMGw==}
3592   - engines: {node: '>=12'}
3593   - cpu: [arm]
3594   - os: [linux]
3595   - requiresBuild: true
3596   - dev: true
3597   - optional: true
3598   -
3599   - /esbuild-linux-mips64le@0.14.54:
3600   - resolution: {integrity: sha512-qTHGQB8D1etd0u1+sB6p0ikLKRVuCWhYQhAHRPkO+OF3I/iSlTKNNS0Lh2Oc0g0UFGguaFZZiPJdJey3AGpAlw==}
3601   - engines: {node: '>=12'}
3602   - cpu: [mips64el]
3603   - os: [linux]
3604   - requiresBuild: true
3605   - dev: true
3606   - optional: true
3607   -
3608   - /esbuild-linux-ppc64le@0.14.54:
3609   - resolution: {integrity: sha512-j3OMlzHiqwZBDPRCDFKcx595XVfOfOnv68Ax3U4UKZ3MTYQB5Yz3X1mn5GnodEVYzhtZgxEBidLWeIs8FDSfrQ==}
3610   - engines: {node: '>=12'}
3611   - cpu: [ppc64]
3612   - os: [linux]
3613   - requiresBuild: true
3614   - dev: true
3615   - optional: true
3616   -
3617   - /esbuild-linux-riscv64@0.14.54:
3618   - resolution: {integrity: sha512-y7Vt7Wl9dkOGZjxQZnDAqqn+XOqFD7IMWiewY5SPlNlzMX39ocPQlOaoxvT4FllA5viyV26/QzHtvTjVNOxHZg==}
3619   - engines: {node: '>=12'}
3620   - cpu: [riscv64]
3621   - os: [linux]
3622   - requiresBuild: true
3623   - dev: true
3624   - optional: true
3625   -
3626   - /esbuild-linux-s390x@0.14.54:
3627   - resolution: {integrity: sha512-zaHpW9dziAsi7lRcyV4r8dhfG1qBidQWUXweUjnw+lliChJqQr+6XD71K41oEIC3Mx1KStovEmlzm+MkGZHnHA==}
3628   - engines: {node: '>=12'}
3629   - cpu: [s390x]
3630   - os: [linux]
3631   - requiresBuild: true
3632   - dev: true
3633   - optional: true
3634   -
3635   - /esbuild-netbsd-64@0.14.54:
3636   - resolution: {integrity: sha512-PR01lmIMnfJTgeU9VJTDY9ZerDWVFIUzAtJuDHwwceppW7cQWjBBqP48NdeRtoP04/AtO9a7w3viI+PIDr6d+w==}
3637   - engines: {node: '>=12'}
3638   - cpu: [x64]
3639   - os: [netbsd]
3640   - requiresBuild: true
3641   - dev: true
3642   - optional: true
3643   -
3644 3494 /esbuild-node-loader@0.6.5:
3645 3495 resolution: {integrity: sha512-uPP+dllWm38cFvDysdocutN3lfe5pTIbddAHp1ENyLzpHYqE2r+3Wo+pfg9X3p8DFWwzIisft5YkeBIthIcixw==}
3646 3496 dependencies:
3647 3497 esbuild: 0.17.14
3648 3498 dev: true
3649 3499  
3650   - /esbuild-openbsd-64@0.14.54:
3651   - resolution: {integrity: sha512-Qyk7ikT2o7Wu76UsvvDS5q0amJvmRzDyVlL0qf5VLsLchjCa1+IAvd8kTBgUxD7VBUUVgItLkk609ZHUc1oCaw==}
3652   - engines: {node: '>=12'}
3653   - cpu: [x64]
3654   - os: [openbsd]
3655   - requiresBuild: true
3656   - dev: true
3657   - optional: true
3658   -
3659   - /esbuild-plugin-alias@0.1.2:
3660   - resolution: {integrity: sha512-WsX0OJy8IGOsGZV+4oHEU5B6XQUpxOsZN1iSoYf9COTDbY7WXcOwd1oCLYNWUIWCExyGXSghIGq2k7sXBldxwQ==}
3661   - dev: true
3662   -
3663 3500 /esbuild-register@3.4.2(esbuild@0.17.14):
3664 3501 resolution: {integrity: sha512-kG/XyTDyz6+YDuyfB9ZoSIOOmgyFCH+xPRtsCa8W85HLRV5Csp+o3jWVbOSHgSLfyLc5DmP+KFDNwty4mEjC+Q==}
3665 3502 peerDependencies:
... ... @@ -3671,83 +3508,12 @@ packages:
3671 3508 - supports-color
3672 3509 dev: true
3673 3510  
3674   - /esbuild-sunos-64@0.14.54:
3675   - resolution: {integrity: sha512-28GZ24KmMSeKi5ueWzMcco6EBHStL3B6ubM7M51RmPwXQGLe0teBGJocmWhgwccA1GeFXqxzILIxXpHbl9Q/Kw==}
3676   - engines: {node: '>=12'}
3677   - cpu: [x64]
3678   - os: [sunos]
3679   - requiresBuild: true
3680   - dev: true
3681   - optional: true
3682   -
3683   - /esbuild-windows-32@0.14.54:
3684   - resolution: {integrity: sha512-T+rdZW19ql9MjS7pixmZYVObd9G7kcaZo+sETqNH4RCkuuYSuv9AGHUVnPoP9hhuE1WM1ZimHz1CIBHBboLU7w==}
3685   - engines: {node: '>=12'}
3686   - cpu: [ia32]
3687   - os: [win32]
3688   - requiresBuild: true
3689   - dev: true
3690   - optional: true
3691   -
3692   - /esbuild-windows-64@0.14.54:
3693   - resolution: {integrity: sha512-AoHTRBUuYwXtZhjXZbA1pGfTo8cJo3vZIcWGLiUcTNgHpJJMC1rVA44ZereBHMJtotyN71S8Qw0npiCIkW96cQ==}
3694   - engines: {node: '>=12'}
3695   - cpu: [x64]
3696   - os: [win32]
3697   - requiresBuild: true
3698   - dev: true
3699   - optional: true
3700   -
3701   - /esbuild-windows-arm64@0.14.54:
3702   - resolution: {integrity: sha512-M0kuUvXhot1zOISQGXwWn6YtS+Y/1RT9WrVIOywZnJHo3jCDyewAc79aKNQWFCQm+xNHVTq9h8dZKvygoXQQRg==}
3703   - engines: {node: '>=12'}
3704   - cpu: [arm64]
3705   - os: [win32]
3706   - requiresBuild: true
3707   - dev: true
3708   - optional: true
3709   -
3710   - /esbuild@0.11.23:
3711   - resolution: {integrity: sha512-iaiZZ9vUF5wJV8ob1tl+5aJTrwDczlvGP0JoMmnpC2B0ppiMCu8n8gmy5ZTGl5bcG081XBVn+U+jP+mPFm5T5Q==}
3712   - hasBin: true
3713   - requiresBuild: true
3714   - dev: true
3715   -
3716 3511 /esbuild@0.11.3:
3717 3512 resolution: {integrity: sha512-BzVRHcCtFepjS9WcqRjqoIxLqgpK21a8J4Zi4msSGxDxiXVO1IbcqT1KjhdDDnJxKfe7bvzZrvMEX+bVO0Elcw==}
3718 3513 hasBin: true
3719 3514 requiresBuild: true
3720 3515 dev: true
3721 3516  
3722   - /esbuild@0.14.54:
3723   - resolution: {integrity: sha512-Cy9llcy8DvET5uznocPyqL3BFRrFXSVqbgpMJ9Wz8oVjZlh/zUSNbPRbov0VX7VxN2JH1Oa0uNxZ7eLRb62pJA==}
3724   - engines: {node: '>=12'}
3725   - hasBin: true
3726   - requiresBuild: true
3727   - optionalDependencies:
3728   - '@esbuild/linux-loong64': 0.14.54
3729   - esbuild-android-64: 0.14.54
3730   - esbuild-android-arm64: 0.14.54
3731   - esbuild-darwin-64: 0.14.54
3732   - esbuild-darwin-arm64: 0.14.54
3733   - esbuild-freebsd-64: 0.14.54
3734   - esbuild-freebsd-arm64: 0.14.54
3735   - esbuild-linux-32: 0.14.54
3736   - esbuild-linux-64: 0.14.54
3737   - esbuild-linux-arm: 0.14.54
3738   - esbuild-linux-arm64: 0.14.54
3739   - esbuild-linux-mips64le: 0.14.54
3740   - esbuild-linux-ppc64le: 0.14.54
3741   - esbuild-linux-riscv64: 0.14.54
3742   - esbuild-linux-s390x: 0.14.54
3743   - esbuild-netbsd-64: 0.14.54
3744   - esbuild-openbsd-64: 0.14.54
3745   - esbuild-sunos-64: 0.14.54
3746   - esbuild-windows-32: 0.14.54
3747   - esbuild-windows-64: 0.14.54
3748   - esbuild-windows-arm64: 0.14.54
3749   - dev: true
3750   -
3751 3517 /esbuild@0.17.14:
3752 3518 resolution: {integrity: sha512-vOO5XhmVj/1XQR9NQ1UPq6qvMYL7QFJU57J5fKBKBKxp17uDt5PgxFDb4A2nEiXhr1qQs4x0F5+66hVVw4ruNw==}
3753 3519 engines: {node: '>=12'}
... ... @@ -6249,6 +6015,15 @@ packages:
6249 6015 picocolors: 1.0.0
6250 6016 source-map-js: 1.0.2
6251 6017  
  6018 + /postcss@8.4.21:
  6019 + resolution: {integrity: sha512-tP7u/Sn/dVxK2NnruI4H9BG+x+Wxz6oeZ1cJ8P6G/PZY0IKk4k/63TDsQf2kQq3+qoJeLm2kIBUNlZe3zgb4Zg==}
  6020 + engines: {node: ^10 || ^12 || >=14}
  6021 + dependencies:
  6022 + nanoid: 3.3.6
  6023 + picocolors: 1.0.0
  6024 + source-map-js: 1.0.2
  6025 + dev: true
  6026 +
6252 6027 /posthtml-parser@0.2.1:
6253 6028 resolution: {integrity: sha512-nPC53YMqJnc/+1x4fRYFfm81KV2V+G9NZY+hTohpYg64Ay7NemWWcV4UWuy/SgMupqQ3kJ88M/iRfZmSnxT+pw==}
6254 6029 dependencies:
... ... @@ -6596,6 +6371,14 @@ packages:
6596 6371 fsevents: 2.3.2
6597 6372 dev: true
6598 6373  
  6374 + /rollup@3.20.2:
  6375 + resolution: {integrity: sha512-3zwkBQl7Ai7MFYQE0y1MeQ15+9jsi7XxfrqwTb/9EK8D9C9+//EBR4M+CuA1KODRaNbFez/lWxA5vhEGZp4MUg==}
  6376 + engines: {node: '>=14.18.0', npm: '>=8.0.0'}
  6377 + hasBin: true
  6378 + optionalDependencies:
  6379 + fsevents: 2.3.2
  6380 + dev: true
  6381 +
6599 6382 /run-async@2.4.1:
6600 6383 resolution: {integrity: sha512-tvVnVv01b8c1RrA6Ep7JkStj85Guv/YrMcwqYQnwjsAS2cTmmPGBBjAjpCW7RrSodNSoE2/qg9O4bceNvUuDgQ==}
6601 6384 engines: {node: '>=0.12.0'}
... ... @@ -7328,10 +7111,6 @@ packages:
7328 7111 resolution: {integrity: sha512-w89qg7PI8wAdvX60bMDP+bFoD5Dvhm9oLheFp5O4a2QF0cSBGsBX4qZmadPMvVqlLJBBci+WqGGOAPvcDeNSVg==}
7329 7112 dev: true
7330 7113  
7331   - /tinycolor2@1.6.0:
7332   - resolution: {integrity: sha512-XPaBkWQJdsf3pLKJV9p4qN/S+fm2Oj8AIPo1BTUhg5oxkvm9+SVEGFdhyOz7tTdUTfvxMiAs4sp6/eZO2Ew+pw==}
7333   - dev: true
7334   -
7335 7114 /tinymce@5.10.7:
7336 7115 resolution: {integrity: sha512-9UUjaO0R7FxcFo0oxnd1lMs7H+D0Eh+dDVo5hKbVe1a+VB0nit97vOqlinj+YwgoBDt6/DSCUoWqAYlLI8BLYA==}
7337 7116 dev: false
... ... @@ -7668,7 +7447,7 @@ packages:
7668 7447 diff-match-patch: 1.0.5
7669 7448 dev: false
7670 7449  
7671   - /vite-plugin-compression@0.5.1(vite@2.9.5):
  7450 + /vite-plugin-compression@0.5.1(vite@4.3.0-beta.1):
7672 7451 resolution: {integrity: sha512-5QJKBDc+gNYVqL/skgFAP81Yuzo9R+EAf19d+EtsMF/i8kFUpNi3J/H01QD3Oo8zBQn+NzoCIFkpPLynoOzaJg==}
7673 7452 peerDependencies:
7674 7453 vite: '>=2.0.0'
... ... @@ -7676,12 +7455,12 @@ packages:
7676 7455 chalk: 4.1.2
7677 7456 debug: 4.3.4(supports-color@9.3.1)
7678 7457 fs-extra: 10.1.0
7679   - vite: 2.9.5(less@4.1.2)(sass@1.57.1)
  7458 + vite: 4.3.0-beta.1(@types/node@17.0.25)(less@4.1.2)(sass@1.57.1)
7680 7459 transitivePeerDependencies:
7681 7460 - supports-color
7682 7461 dev: true
7683 7462  
7684   - /vite-plugin-html@3.2.0(vite@2.9.5):
  7463 + /vite-plugin-html@3.2.0(vite@4.3.0-beta.1):
7685 7464 resolution: {integrity: sha512-2VLCeDiHmV/BqqNn5h2V+4280KRgQzCFN47cst3WiNK848klESPQnzuC3okH5XHtgwHH/6s1Ho/YV6yIO0pgoQ==}
7686 7465 peerDependencies:
7687 7466 vite: '>=2.0.0'
... ... @@ -7698,7 +7477,7 @@ packages:
7698 7477 html-minifier-terser: 6.1.0
7699 7478 node-html-parser: 5.4.2
7700 7479 pathe: 0.2.0
7701   - vite: 2.9.5(less@4.1.2)(sass@1.57.1)
  7480 + vite: 4.3.0-beta.1(@types/node@17.0.25)(less@4.1.2)(sass@1.57.1)
7702 7481 dev: true
7703 7482  
7704 7483 /vite-plugin-mkcert@1.6.0:
... ... @@ -7713,7 +7492,7 @@ packages:
7713 7492 - supports-color
7714 7493 dev: true
7715 7494  
7716   - /vite-plugin-mock@2.9.6(mockjs@1.1.0)(rollup@2.70.2)(vite@2.9.5):
  7495 + /vite-plugin-mock@2.9.6(mockjs@1.1.0)(rollup@2.70.2)(vite@4.3.0-beta.1):
7717 7496 resolution: {integrity: sha512-/Rm59oPppe/ncbkSrUuAxIQihlI2YcBmnbR4ST1RA2VzM1C0tEQc1KlbQvnUGhXECAGTaQN2JyasiwXP6EtKgg==}
7718 7497 engines: {node: '>=12.0.0'}
7719 7498 peerDependencies:
... ... @@ -7730,13 +7509,13 @@ packages:
7730 7509 fast-glob: 3.2.12
7731 7510 mockjs: 1.1.0
7732 7511 path-to-regexp: 6.2.0
7733   - vite: 2.9.5(less@4.1.2)(sass@1.57.1)
  7512 + vite: 4.3.0-beta.1(@types/node@17.0.25)(less@4.1.2)(sass@1.57.1)
7734 7513 transitivePeerDependencies:
7735 7514 - rollup
7736 7515 - supports-color
7737 7516 dev: true
7738 7517  
7739   - /vite-plugin-purge-icons@0.8.1(vite@2.9.5):
  7518 + /vite-plugin-purge-icons@0.8.1(vite@4.3.0-beta.1):
7740 7519 resolution: {integrity: sha512-H77YDvECkdzwsgYTu6LR5Nx0wey5Hporw+3/hTYTZh7D7YcarS+RsOvpUEgd2XG5fChgCmMBtMfnr2JmrNanSg==}
7741 7520 engines: {node: '>= 12'}
7742 7521 peerDependencies:
... ... @@ -7745,13 +7524,13 @@ packages:
7745 7524 '@purge-icons/core': 0.8.0
7746 7525 '@purge-icons/generated': 0.8.1
7747 7526 rollup-plugin-purge-icons: 0.8.1
7748   - vite: 2.9.5(less@4.1.2)(sass@1.57.1)
  7527 + vite: 4.3.0-beta.1(@types/node@17.0.25)(less@4.1.2)(sass@1.57.1)
7749 7528 transitivePeerDependencies:
7750 7529 - encoding
7751 7530 - supports-color
7752 7531 dev: true
7753 7532  
7754   - /vite-plugin-svg-icons@2.0.1(vite@2.9.5):
  7533 + /vite-plugin-svg-icons@2.0.1(vite@4.3.0-beta.1):
7755 7534 resolution: {integrity: sha512-6ktD+DhV6Rz3VtedYvBKKVA2eXF+sAQVaKkKLDSqGUfnhqXl3bj5PPkVTl3VexfTuZy66PmINi8Q6eFnVfRUmA==}
7756 7535 peerDependencies:
7757 7536 vite: '>=2.0.0'
... ... @@ -7764,30 +7543,12 @@ packages:
7764 7543 pathe: 0.2.0
7765 7544 svg-baker: 1.7.0
7766 7545 svgo: 2.8.0
7767   - vite: 2.9.5(less@4.1.2)(sass@1.57.1)
7768   - transitivePeerDependencies:
7769   - - supports-color
7770   - dev: true
7771   -
7772   - /vite-plugin-theme@0.8.6(vite@2.9.5):
7773   - resolution: {integrity: sha512-GyoP9JjGkF106AawBh1kvw2eQZ/CCPeZKN5p5XhQe1ah1LO7A/6aVGY5gYGWk2qHG9nXpM1IvxjdbMsg94bvYg==}
7774   - peerDependencies:
7775   - vite: '>=2.0.0-beta.49'
7776   - dependencies:
7777   - '@types/node': 14.18.42
7778   - '@types/tinycolor2': 1.4.3
7779   - chalk: 4.1.2
7780   - clean-css: 5.3.2
7781   - debug: 4.3.4(supports-color@9.3.1)
7782   - esbuild: 0.11.23
7783   - esbuild-plugin-alias: 0.1.2
7784   - tinycolor2: 1.6.0
7785   - vite: 2.9.5(less@4.1.2)(sass@1.57.1)
  7546 + vite: 4.3.0-beta.1(@types/node@17.0.25)(less@4.1.2)(sass@1.57.1)
7786 7547 transitivePeerDependencies:
7787 7548 - supports-color
7788 7549 dev: true
7789 7550  
7790   - /vite-plugin-windicss@1.8.4(vite@2.9.5):
  7551 + /vite-plugin-windicss@1.8.4(vite@4.3.0-beta.1):
7791 7552 resolution: {integrity: sha512-LSZAO8BZn3x406GRbYX5t5ONXXJVdqiQtN1qrznLA/Dy5/NzZVhfcrL6N1qEYYO7HsCDT4pLAjTzObvDnM9Y8A==}
7792 7553 peerDependencies:
7793 7554 vite: ^2.0.1
... ... @@ -7795,33 +7556,43 @@ packages:
7795 7556 '@windicss/plugin-utils': 1.8.4
7796 7557 debug: 4.3.4(supports-color@9.3.1)
7797 7558 kolorist: 1.7.0
7798   - vite: 2.9.5(less@4.1.2)(sass@1.57.1)
  7559 + vite: 4.3.0-beta.1(@types/node@17.0.25)(less@4.1.2)(sass@1.57.1)
7799 7560 windicss: 3.5.6
7800 7561 transitivePeerDependencies:
7801 7562 - supports-color
7802 7563 dev: true
7803 7564  
7804   - /vite@2.9.5(less@4.1.2)(sass@1.57.1):
7805   - resolution: {integrity: sha512-dvMN64X2YEQgSXF1lYabKXw3BbN6e+BL67+P3Vy4MacnY+UzT1AfkHiioFSi9+uiDUiaDy7Ax/LQqivk6orilg==}
7806   - engines: {node: '>=12.2.0'}
  7565 + /vite@4.3.0-beta.1(@types/node@17.0.25)(less@4.1.2)(sass@1.57.1):
  7566 + resolution: {integrity: sha512-D4j9bail/S/OopyozlmQv7zPxf0xwe0zgZTkOAT61yD0lCUF29GgarhU6Z2hPEXelQyKGYyPFwUmuUX4tze9sA==}
  7567 + engines: {node: ^14.18.0 || >=16.0.0}
7807 7568 hasBin: true
7808 7569 peerDependencies:
  7570 + '@types/node': '>= 14'
7809 7571 less: '*'
7810 7572 sass: '*'
7811 7573 stylus: '*'
  7574 + sugarss: '*'
  7575 + terser: ^5.4.0
7812 7576 peerDependenciesMeta:
  7577 + '@types/node':
  7578 + optional: true
7813 7579 less:
7814 7580 optional: true
7815 7581 sass:
7816 7582 optional: true
7817 7583 stylus:
7818 7584 optional: true
  7585 + sugarss:
  7586 + optional: true
  7587 + terser:
  7588 + optional: true
7819 7589 dependencies:
7820   - esbuild: 0.14.54
  7590 + '@types/node': 17.0.25
  7591 + esbuild: 0.17.14
7821 7592 less: 4.1.2
7822   - postcss: 8.4.12
  7593 + postcss: 8.4.21
7823 7594 resolve: 1.22.1
7824   - rollup: 2.70.2
  7595 + rollup: 3.20.2
7825 7596 sass: 1.57.1
7826 7597 optionalDependencies:
7827 7598 fsevents: 2.3.2
... ...
src/components/Application/index.ts
... ... @@ -4,7 +4,7 @@ import appLogo from './src/AppLogo.vue';
4 4 import appProvider from './src/AppProvider.vue';
5 5 import appSearch from './src/search/AppSearch.vue';
6 6 import appLocalePicker from './src/AppLocalePicker.vue';
7   -import appDarkModeToggle from './src/AppDarkModeToggle.vue';
  7 +// import appDarkModeToggle from './src/AppDarkModeToggle.vue';
8 8  
9 9 export { useAppProviderContext } from './src/useAppContext';
10 10  
... ... @@ -12,4 +12,4 @@ export const AppLogo = withInstall(appLogo);
12 12 export const AppProvider = withInstall(appProvider);
13 13 export const AppSearch = withInstall(appSearch);
14 14 export const AppLocalePicker = withInstall(appLocalePicker);
15   -export const AppDarkModeToggle = withInstall(appDarkModeToggle);
  15 +// export const AppDarkModeToggle = withInstall(appDarkModeToggle);
... ...
src/layouts/default/setting/SettingDrawer.tsx
... ... @@ -3,14 +3,14 @@ import { BasicDrawer } from '/@/components/Drawer/index';
3 3 import { Divider } from 'ant-design-vue';
4 4 import {
5 5 TypePicker,
6   - ThemeColorPicker,
  6 + // ThemeColorPicker,
7 7 SettingFooter,
8 8 SwitchItem,
9 9 SelectItem,
10 10 InputNumberItem,
11 11 } from './components';
12 12  
13   -import { AppDarkModeToggle } from '/@/components/Application';
  13 +// import { AppDarkModeToggle } from '/@/components/Application';
14 14  
15 15 import { MenuTypeEnum, TriggerEnum } from '/@/enums/menuEnum';
16 16  
... ... @@ -33,11 +33,11 @@ import {
33 33 mixSidebarTriggerOptions,
34 34 } from './enum';
35 35  
36   -import {
37   - HEADER_PRESET_BG_COLOR_LIST,
38   - SIDE_BAR_BG_COLOR_LIST,
39   - APP_PRESET_COLOR_LIST,
40   -} from '/@/settings/designSetting';
  36 +// import {
  37 +// HEADER_PRESET_BG_COLOR_LIST,
  38 +// SIDE_BAR_BG_COLOR_LIST,
  39 +// APP_PRESET_COLOR_LIST,
  40 +// } from '/@/settings/designSetting';
41 41  
42 42 const { t } = useI18n();
43 43  
... ... @@ -55,7 +55,7 @@ export default defineComponent({
55 55 getGrayMode,
56 56 getLockTime,
57 57 getShowDarkModeToggle,
58   - getThemeColor,
  58 + // getThemeColor,
59 59 } = useRootSetting();
60 60  
61 61 const { getOpenPageLoading, getBasicTransition, getEnableTransition, getOpenNProgress } =
... ... @@ -73,7 +73,7 @@ export default defineComponent({
73 73 getTopMenuAlign,
74 74 getAccordion,
75 75 getMenuWidth,
76   - getMenuBgColor,
  76 + // getMenuBgColor,
77 77 getIsTopMenu,
78 78 getSplit,
79 79 getIsMixSidebar,
... ... @@ -85,7 +85,7 @@ export default defineComponent({
85 85 const {
86 86 getShowHeader,
87 87 getFixed: getHeaderFixed,
88   - getHeaderBgColor,
  88 + // getHeaderBgColor,
89 89 getShowSearch,
90 90 } = useHeaderSetting();
91 91  
... ... @@ -113,35 +113,35 @@ export default defineComponent({
113 113 );
114 114 }
115 115  
116   - function renderHeaderTheme() {
117   - return (
118   - <ThemeColorPicker
119   - colorList={HEADER_PRESET_BG_COLOR_LIST}
120   - def={unref(getHeaderBgColor)}
121   - event={HandlerEnum.HEADER_THEME}
122   - />
123   - );
124   - }
125   -
126   - function renderSiderTheme() {
127   - return (
128   - <ThemeColorPicker
129   - colorList={SIDE_BAR_BG_COLOR_LIST}
130   - def={unref(getMenuBgColor)}
131   - event={HandlerEnum.MENU_THEME}
132   - />
133   - );
134   - }
135   -
136   - function renderMainTheme() {
137   - return (
138   - <ThemeColorPicker
139   - colorList={APP_PRESET_COLOR_LIST}
140   - def={unref(getThemeColor)}
141   - event={HandlerEnum.CHANGE_THEME_COLOR}
142   - />
143   - );
144   - }
  116 + // function renderHeaderTheme() {
  117 + // return (
  118 + // <ThemeColorPicker
  119 + // colorList={HEADER_PRESET_BG_COLOR_LIST}
  120 + // def={unref(getHeaderBgColor)}
  121 + // event={HandlerEnum.HEADER_THEME}
  122 + // />
  123 + // );
  124 + // }
  125 +
  126 + // function renderSiderTheme() {
  127 + // return (
  128 + // <ThemeColorPicker
  129 + // colorList={SIDE_BAR_BG_COLOR_LIST}
  130 + // def={unref(getMenuBgColor)}
  131 + // event={HandlerEnum.MENU_THEME}
  132 + // />
  133 + // );
  134 + // }
  135 +
  136 + // function renderMainTheme() {
  137 + // return (
  138 + // <ThemeColorPicker
  139 + // colorList={APP_PRESET_COLOR_LIST}
  140 + // def={unref(getThemeColor)}
  141 + // event={HandlerEnum.CHANGE_THEME_COLOR}
  142 + // />
  143 + // );
  144 + // }
145 145  
146 146 /**
147 147 * @description:
... ... @@ -404,15 +404,15 @@ export default defineComponent({
404 404 class="setting-drawer"
405 405 >
406 406 {unref(getShowDarkModeToggle) && <Divider>{() => t('layout.setting.darkMode')}</Divider>}
407   - {unref(getShowDarkModeToggle) && <AppDarkModeToggle class="mx-auto" />}
  407 + {/* {unref(getShowDarkModeToggle) && <AppDarkModeToggle class="mx-auto" />} */}
408 408 <Divider>{() => t('layout.setting.navMode')}</Divider>
409 409 {renderSidebar()}
410   - <Divider>{() => t('layout.setting.sysTheme')}</Divider>
  410 + {/* <Divider>{() => t('layout.setting.sysTheme')}</Divider>
411 411 {renderMainTheme()}
412 412 <Divider>{() => t('layout.setting.headerTheme')}</Divider>
413 413 {renderHeaderTheme()}
414 414 <Divider>{() => t('layout.setting.sidebarTheme')}</Divider>
415   - {renderSiderTheme()}
  415 + {renderSiderTheme()} */}
416 416 <Divider>{() => t('layout.setting.interfaceFunction')}</Divider>
417 417 {renderFeatures()}
418 418 <Divider>{() => t('layout.setting.interfaceDisplay')}</Divider>
... ...
src/layouts/default/setting/components/SettingFooter.vue
... ... @@ -34,7 +34,6 @@
34 34 import { updateColorWeak } from '/@/logics/theme/updateColorWeak';
35 35 import { updateGrayMode } from '/@/logics/theme/updateGrayMode';
36 36 import defaultSetting from '/@/settings/projectSetting';
37   - import { changeTheme } from '/@/logics/theme';
38 37 import { updateSidebarBgColor } from '/@/logics/theme/updateBackground';
39 38  
40 39 export default defineComponent({
... ... @@ -62,8 +61,7 @@
62 61 function handleResetSetting() {
63 62 try {
64 63 appStore.setProjectConfig(defaultSetting);
65   - const { colorWeak, grayMode, themeColor } = defaultSetting;
66   - changeTheme(themeColor);
  64 + const { colorWeak, grayMode } = defaultSetting;
67 65 updateSidebarBgColor();
68 66 updateColorWeak(colorWeak);
69 67 updateGrayMode(grayMode);
... ...
src/layouts/default/setting/handler.ts
... ... @@ -5,7 +5,6 @@ import { updateGrayMode } from &#39;/@/logics/theme/updateGrayMode&#39;;
5 5  
6 6 import { useAppStore } from '/@/store/modules/app';
7 7 import { ProjectConfig } from '/#/config';
8   -import { changeTheme } from '/@/logics/theme';
9 8 import { updateDarkTheme } from '/@/logics/theme/dark';
10 9 import { useRootSetting } from '/@/hooks/setting/useRootSetting';
11 10  
... ... @@ -43,7 +42,6 @@ export function handler(event: HandlerEnum, value: any): DeepPartial&lt;ProjectConf
43 42 if (getThemeColor.value === value) {
44 43 return {};
45 44 }
46   - changeTheme(value);
47 45  
48 46 return { themeColor: value };
49 47  
... ...
src/logics/initAppConfig.ts
... ... @@ -10,14 +10,12 @@ import { updateHeaderBgColor, updateSidebarBgColor } from &#39;/@/logics/theme/updat
10 10 import { updateColorWeak } from '/@/logics/theme/updateColorWeak';
11 11 import { updateGrayMode } from '/@/logics/theme/updateGrayMode';
12 12 import { updateDarkTheme } from '/@/logics/theme/dark';
13   -import { changeTheme } from '/@/logics/theme';
14 13  
15 14 import { useAppStore } from '/@/store/modules/app';
16 15 import { useLocaleStore } from '/@/store/modules/locale';
17 16  
18 17 import { getCommonStoragePrefix, getStorageShortName } from '/@/utils/env';
19 18  
20   -import { primaryColor } from '../../build/config/themeConfig';
21 19 import { Persistent } from '/@/utils/cache/persistent';
22 20 import { deepMerge } from '/@/utils';
23 21 import { ThemeEnum } from '/@/enums/appEnum';
... ... @@ -32,16 +30,11 @@ export function initAppConfigStore() {
32 30 const {
33 31 colorWeak,
34 32 grayMode,
35   - themeColor,
36 33  
37 34 headerSetting: { bgColor: headerBgColor } = {},
38 35 menuSetting: { bgColor } = {},
39 36 } = projCfg;
40 37 try {
41   - if (themeColor && themeColor !== primaryColor) {
42   - changeTheme(themeColor);
43   - }
44   -
45 38 grayMode && updateGrayMode(grayMode);
46 39 colorWeak && updateColorWeak(colorWeak);
47 40 } catch (error) {
... ...
src/logics/theme/dark.ts
1   -import { darkCssIsReady, loadDarkThemeCss } from 'vite-plugin-theme/es/client';
2 1 import { addClass, hasClass, removeClass } from '/@/utils/domUtils';
3 2  
4 3 export async function updateDarkTheme(mode: string | null = 'light') {
... ... @@ -8,9 +7,6 @@ export async function updateDarkTheme(mode: string | null = &#39;light&#39;) {
8 7 }
9 8 const hasDarkClass = hasClass(htmlRoot, 'dark');
10 9 if (mode === 'dark') {
11   - if (import.meta.env.PROD && !darkCssIsReady) {
12   - await loadDarkThemeCss();
13   - }
14 10 htmlRoot.setAttribute('data-theme', 'dark');
15 11 if (!hasDarkClass) {
16 12 addClass(htmlRoot, 'dark');
... ...
src/logics/theme/index.ts
1   -import { getThemeColors, generateColors } from '../../../build/config/themeConfig';
2   -
3   -import { replaceStyleVariables } from 'vite-plugin-theme/es/client';
4   -import { mixLighten, mixDarken, tinycolor } from 'vite-plugin-theme/es/colorUtils';
5   -
6   -export async function changeTheme(color: string) {
7   - const colors = generateColors({
8   - mixDarken,
9   - mixLighten,
10   - tinycolor,
11   - color,
12   - });
13   -
14   - return await replaceStyleVariables({
15   - colorVariables: [...getThemeColors(color), ...colors],
16   - });
17   -}
  1 +export async function changeTheme(_color: string) {}
... ...
src/views/sys/login/Login.vue
1 1 <template>
2 2 <div :class="prefixCls" class="relative w-full h-full px-4">
3 3 <div class="flex items-center absolute right-4 top-4">
4   - <AppDarkModeToggle class="enter-x mr-2" v-if="!sessionTimeout" />
  4 + <!-- <AppDarkModeToggle class="enter-x mr-2" v-if="!sessionTimeout" /> -->
5 5 <AppLocalePicker
6 6 class="text-white enter-x xl:text-gray-600"
7 7 :show-text="false"
... ... @@ -50,7 +50,7 @@
50 50 <script lang="ts" setup>
51 51 import { computed } from 'vue';
52 52 import { AppLogo } from '/@/components/Application';
53   - import { AppLocalePicker, AppDarkModeToggle } from '/@/components/Application';
  53 + import { AppLocalePicker } from '/@/components/Application';
54 54 import LoginForm from './LoginForm.vue';
55 55 import ForgetPasswordForm from './ForgetPasswordForm.vue';
56 56 import RegisterForm from './RegisterForm.vue';
... ...