Commit 26adbc92be1c8ce5ce6f93302fb806058ef087cf

Authored by Vben
1 parent 9a21b8b6

fix: fix dark theme refreshing flashing white screen

CHANGELOG.zh_CN.md
  1 +## Wip
  2 +
  3 +### 🐛 Bug Fixes
  4 +
  5 +- 修复黑暗主题刷新闪烁的白屏
  6 +
1 7 ## 2.3.0 (2021-04-10)
2 8  
3 9 ## (破坏性更新) Breaking changes
... ...
package.json
... ... @@ -43,7 +43,7 @@
43 43 "mockjs": "^1.1.0",
44 44 "nprogress": "^0.2.0",
45 45 "path-to-regexp": "^6.2.0",
46   - "pinia": "^2.0.0-alpha.12",
  46 + "pinia": "2.0.0-alpha.13",
47 47 "print-js": "^1.6.0",
48 48 "qrcode": "^1.4.4",
49 49 "sortablejs": "^1.13.0",
... ... @@ -58,10 +58,10 @@
58 58 "devDependencies": {
59 59 "@commitlint/cli": "^12.1.1",
60 60 "@commitlint/config-conventional": "^12.1.1",
61   - "@iconify/json": "^1.1.327",
  61 + "@iconify/json": "^1.1.328",
62 62 "@purge-icons/generated": "^0.7.0",
63 63 "@types/crypto-js": "^4.0.1",
64   - "@types/fs-extra": "^9.0.10",
  64 + "@types/fs-extra": "^9.0.11",
65 65 "@types/inquirer": "^7.3.1",
66 66 "@types/lodash-es": "^4.17.4",
67 67 "@types/mockjs": "^1.0.3",
... ... @@ -84,7 +84,7 @@
84 84 "eslint-config-prettier": "^8.1.0",
85 85 "eslint-define-config": "^1.0.7",
86 86 "eslint-plugin-prettier": "^3.3.1",
87   - "eslint-plugin-vue": "^7.8.0",
  87 + "eslint-plugin-vue": "^7.9.0",
88 88 "esno": "^0.5.0",
89 89 "fs-extra": "^9.1.0",
90 90 "http-server": "^0.12.3",
... ... @@ -93,11 +93,11 @@
93 93 "is-ci": "^3.0.0",
94 94 "less": "^4.1.1",
95 95 "lint-staged": "^10.5.4",
96   - "postcss": "^8.2.9",
  96 + "postcss": "^8.2.10",
97 97 "prettier": "^2.2.1",
98 98 "pretty-quick": "^3.1.0",
99 99 "rimraf": "^3.0.2",
100   - "rollup-plugin-visualizer": "5.3.0",
  100 + "rollup-plugin-visualizer": "5.3.4",
101 101 "stylelint": "^13.12.0",
102 102 "stylelint-config-prettier": "^8.0.2",
103 103 "stylelint-config-standard": "^21.0.0",
... ... @@ -113,15 +113,15 @@
113 113 "vite-plugin-pwa": "^0.7.0",
114 114 "vite-plugin-style-import": "^0.9.2",
115 115 "vite-plugin-svg-icons": "^0.4.1",
116   - "vite-plugin-theme": "^0.6.5",
117   - "vite-plugin-windicss": "0.13.2",
  116 + "vite-plugin-theme": "^0.7.0",
  117 + "vite-plugin-windicss": "0.14.0",
118 118 "vue-eslint-parser": "^7.6.0"
119 119 },
120 120 "resolutions": {
121 121 "//": "Used to install imagemin dependencies, because imagemin may not be installed in China.If it is abroad, you can delete it",
122 122 "bin-wrapper": "npm:bin-wrapper-china",
123 123 "rollup": "^2.45.1",
124   - "esbuild": "^0.11.7"
  124 + "esbuild": "^0.11.9"
125 125 },
126 126 "repository": {
127 127 "type": "git",
... ...
src/App.vue
... ... @@ -11,8 +11,6 @@
11 11 import { ConfigProvider } from 'ant-design-vue';
12 12 import { AppProvider } from '/@/components/Application';
13 13  
14   - import { initAppConfigStore } from '/@/logics/initAppConfig';
15   -
16 14 import { useLockPage } from '/@/hooks/web/useLockPage';
17 15 import { useTitle } from '/@/hooks/web/useTitle';
18 16 import { useLocale } from '/@/locales/useLocale';
... ... @@ -21,9 +19,6 @@
21 19 name: 'App',
22 20 components: { ConfigProvider, AppProvider },
23 21 setup() {
24   - // Initialize vuex internal system configuration
25   - initAppConfigStore();
26   -
27 22 useTitle();
28 23  
29 24 // support Multi-language
... ...
src/main.ts
1 1 import '/@/design/index.less';
2   -import '@virtual/windi.css';
  2 +import 'virtual:windi.css';
3 3  
4 4 import { createApp } from 'vue';
5 5 import App from './App.vue';
6   -
  6 +import { initAppConfigStore } from '/@/logics/initAppConfig';
7 7 import router, { setupRouter } from '/@/router';
8 8 import { setupRouterGuard } from '/@/router/guard';
9 9 import { setupStore } from '/@/store';
... ... @@ -29,6 +29,9 @@ if (import.meta.env.DEV) {
29 29 // Configure vuex store
30 30 setupStore(app);
31 31  
  32 + // Initialize vuex internal system configuration
  33 + initAppConfigStore();
  34 +
32 35 // Register global components
33 36 registerGlobComp(app);
34 37  
... ...
yarn.lock
... ... @@ -1108,10 +1108,10 @@
1108 1108 dependencies:
1109 1109 cross-fetch "^3.0.6"
1110 1110  
1111   -"@iconify/json@^1.1.327":
1112   - version "1.1.327"
1113   - resolved "https://registry.npmjs.org/@iconify/json/-/json-1.1.327.tgz#78d021a7f730c01863e56ee5b4c0eaf4ca69db43"
1114   - integrity sha512-S4Zw/5yqQaGpkYe8ubB+0PRXQl5UZOdsYhvShzI2FSqOjwjhpPG4X6DUTH6WD8oGkCpRa/B7tK9asYefjCax7w==
  1111 +"@iconify/json@^1.1.328":
  1112 + version "1.1.328"
  1113 + resolved "https://registry.npmjs.org/@iconify/json/-/json-1.1.328.tgz#2fba6768ae3f148c315f205a94409e86dbf07cca"
  1114 + integrity sha512-/dVvFNpktwCx2A3aA+/fLJ88jXTAh42VZE79FzaaY5CmgmHjvenpSOP1p1oy2m3XM8VtsDBoNM+RKFIIOYL2bg==
1115 1115  
1116 1116 "@intlify/core-base@9.0.0":
1117 1117 version "9.0.0"
... ... @@ -1298,10 +1298,10 @@
1298 1298 resolved "https://registry.npmjs.org/@types/estree/-/estree-0.0.39.tgz#e177e699ee1b8c22d23174caaa7422644389509f"
1299 1299 integrity sha512-EYNwp3bU+98cpU4lAWYYL7Zz+2gryWH1qbdDTidVd6hkiR6weksdbMadyXKXNPEkQFhXM+hVO9ZygomHXp+AIw==
1300 1300  
1301   -"@types/fs-extra@^9.0.10":
1302   - version "9.0.10"
1303   - resolved "https://registry.npmjs.org/@types/fs-extra/-/fs-extra-9.0.10.tgz#8023a72e3d06cf54929ea47ec7634e47f33f4046"
1304   - integrity sha512-O9T2LLkRDiTlalOBdjEkcnT0MRdT2+wglCl7pJUJ3mkWkR8hX4K+5bg2raQNJcLv4V8zGuTXe7Ud3wSqkTyuyQ==
  1301 +"@types/fs-extra@^9.0.11":
  1302 + version "9.0.11"
  1303 + resolved "https://registry.npmjs.org/@types/fs-extra/-/fs-extra-9.0.11.tgz#8cc99e103499eab9f347dbc6ca4e99fb8d2c2b87"
  1304 + integrity sha512-mZsifGG4QeQ7hlkhO56u7zt/ycBgGxSVsFI/6lGTU34VtwkiqrrSDgw0+ygs8kFGWcXnFQWMrzF2h7TtDFNixA==
1305 1305 dependencies:
1306 1306 "@types/node" "*"
1307 1307  
... ... @@ -1696,18 +1696,18 @@
1696 1696 dependencies:
1697 1697 vue-demi latest
1698 1698  
1699   -"@windicss/plugin-utils@0.13.2":
1700   - version "0.13.2"
1701   - resolved "https://registry.npmjs.org/@windicss/plugin-utils/-/plugin-utils-0.13.2.tgz#8df77495f38002edb9a92503a7a9dab99c773c1b"
1702   - integrity sha512-ZnHIPhyHSCYmkc3dcytSkTq3fchzCIvNsiptzP5twtK1Q7aWRNrOpPDywer64goWOBYHJIgCp8GFgzFSden3jw==
  1699 +"@windicss/plugin-utils@0.14.0":
  1700 + version "0.14.0"
  1701 + resolved "https://registry.npmjs.org/@windicss/plugin-utils/-/plugin-utils-0.14.0.tgz#ca5459e81d38fbe3c1eac0574ffdc8dba06961a4"
  1702 + integrity sha512-PnXKrCX7dl3tQPkfc2RGOQCqzS+3ApTLelGhr0c1kbHgz+EjaS+pK9vhhQm/8xgzyJLyreYUuQEEAvvPtBRBEQ==
1703 1703 dependencies:
1704 1704 debug "^4.3.2"
1705 1705 fast-glob "^3.2.5"
1706 1706 magic-string "^0.25.7"
1707   - micromatch "^4.0.2"
  1707 + micromatch "^4.0.4"
1708 1708 pirates "^4.0.1"
1709 1709 sucrase "^3.17.1"
1710   - windicss "^2.5.12"
  1710 + windicss "^2.5.14"
1711 1711  
1712 1712 "@zxcvbn-ts/core@^0.3.0":
1713 1713 version "0.3.0"
... ... @@ -3596,10 +3596,10 @@ esbuild-register@^2.2.0:
3596 3596 esbuild "^0.11.5"
3597 3597 jsonc-parser "^3.0.0"
3598 3598  
3599   -esbuild@^0.11.4, esbuild@^0.11.5, esbuild@^0.11.6, esbuild@^0.11.7, esbuild@^0.9.2, esbuild@^0.9.3:
3600   - version "0.11.7"
3601   - resolved "https://registry.npmjs.org/esbuild/-/esbuild-0.11.7.tgz#c32ee844d3b0db489e62ea0ad028e109f6f205c7"
3602   - integrity sha512-rY+jA0TiCFVLcvxUbbp+yQ9EEBXDsfIU4rsY7RKJEsx/fjjRFjyGnamRCBwUZQspK37G9We6xAkX7IibGA24AA==
  3599 +esbuild@^0.11.4, esbuild@^0.11.5, esbuild@^0.11.6, esbuild@^0.11.9, esbuild@^0.9.2, esbuild@^0.9.3:
  3600 + version "0.11.9"
  3601 + resolved "https://registry.npmjs.org/esbuild/-/esbuild-0.11.9.tgz#408bf4fb5ae9abc2f27d56b62e19aab697687975"
  3602 + integrity sha512-qP7w/oWjJBIh9x+H37DbpkMtmSnLm63VDyA06+vkJJEHlVR7QSDiPAaka7mtMQZHoBn87irUx5rDxbXMKaf8xw==
3603 3603  
3604 3604 escalade@^3.1.1:
3605 3605 version "3.1.1"
... ... @@ -3633,10 +3633,10 @@ eslint-plugin-prettier@^3.3.1:
3633 3633 dependencies:
3634 3634 prettier-linter-helpers "^1.0.0"
3635 3635  
3636   -eslint-plugin-vue@^7.8.0:
3637   - version "7.8.0"
3638   - resolved "https://registry.npmjs.org/eslint-plugin-vue/-/eslint-plugin-vue-7.8.0.tgz#cb0e85d65b65fa8d15e783fbb03c049d2c4cfdae"
3639   - integrity sha512-OGrnPz+PuYL2HmVyBHxm4mRjxW2kfFCQE6Hw9G6qOHs/Pcu0srOlCCW0FMa8SLzIEqxl8WuKoBSPcMnrjUG2vw==
  3636 +eslint-plugin-vue@^7.9.0:
  3637 + version "7.9.0"
  3638 + resolved "https://registry.npmjs.org/eslint-plugin-vue/-/eslint-plugin-vue-7.9.0.tgz#f8e83a2a908f4c43fc8304f5401d4ff671f3d560"
  3639 + integrity sha512-2Q0qQp5+5h+pZvJKCbG1/jCRUYrdgAz5BYKGyTlp2NU8mx09u3Hp7PsH6d5qef6ojuPoCXMnrbbDxeoplihrSw==
3640 3640 dependencies:
3641 3641 eslint-utils "^2.1.0"
3642 3642 natural-compare "^1.4.0"
... ... @@ -6102,6 +6102,14 @@ micromatch@^4.0.2:
6102 6102 braces "^3.0.1"
6103 6103 picomatch "^2.2.1"
6104 6104  
  6105 +micromatch@^4.0.4:
  6106 + version "4.0.4"
  6107 + resolved "https://registry.npmjs.org/micromatch/-/micromatch-4.0.4.tgz#896d519dfe9db25fce94ceb7a500919bf881ebf9"
  6108 + integrity sha512-pRmzw/XUcwXGpD9aI9q/0XOwLNygjETJ8y0ao0wdqprrzDa4YnxLcz7fQRZr8voh8V10kGhABbNcHVk5wHgWwg==
  6109 + dependencies:
  6110 + braces "^3.0.1"
  6111 + picomatch "^2.2.3"
  6112 +
6105 6113 mime-db@^1.28.0:
6106 6114 version "1.47.0"
6107 6115 resolved "https://registry.npmjs.org/mime-db/-/mime-db-1.47.0.tgz#8cb313e59965d3c05cfbf898915a267af46a335c"
... ... @@ -6858,6 +6866,11 @@ picomatch@^2.0.4, picomatch@^2.2.1, picomatch@^2.2.2:
6858 6866 resolved "https://registry.npmjs.org/picomatch/-/picomatch-2.2.2.tgz#21f333e9b6b8eaff02468f5146ea406d345f4dad"
6859 6867 integrity sha512-q0M/9eZHzmr0AulXyPwNfZjtwZ/RBZlbN3K3CErVrk50T2ASYI7Bye0EvekFY3IP1Nt2DHu0re+V2ZHIpMkuWg==
6860 6868  
  6869 +picomatch@^2.2.3:
  6870 + version "2.2.3"
  6871 + resolved "https://registry.npmjs.org/picomatch/-/picomatch-2.2.3.tgz#465547f359ccc206d3c48e46a1bcb89bf7ee619d"
  6872 + integrity sha512-KpELjfwcCDUb9PeigTs2mBJzXUPzAuP2oPcA989He8Rte0+YUAjw1JVedDhuTKPkHjSYzMN3npC9luThGYEKdg==
  6873 +
6861 6874 pify@^2.0.0, pify@^2.2.0, pify@^2.3.0:
6862 6875 version "2.3.0"
6863 6876 resolved "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz#ed141a6ac043a849ea588498e7dca8b15330e90c"
... ... @@ -6873,10 +6886,10 @@ pify@^4.0.1:
6873 6886 resolved "https://registry.npmjs.org/pify/-/pify-4.0.1.tgz#4b2cd25c50d598735c50292224fd8c6df41e3231"
6874 6887 integrity sha512-uB80kBFb/tfd68bVleG9T5GGsGPjJrLAUpR5PZIrhBnIaRTQRjqdJSsIKkOP6OAIFbj7GOrcudc5pNjZ+geV2g==
6875 6888  
6876   -pinia@^2.0.0-alpha.12:
6877   - version "2.0.0-alpha.12"
6878   - resolved "https://registry.npmjs.org/pinia/-/pinia-2.0.0-alpha.12.tgz#690e9a7b4c176bb9d95fe0dc8ec4ab8847b09493"
6879   - integrity sha512-qmcDpuoAwxQKAVp7/cOkXFYDaja+vyXMWR6kvdyzeJcGGMvZf1HQ2xFhUSW5lf1eW5IiQP0cBRdF3ZDyVa+JIQ==
  6889 +pinia@2.0.0-alpha.13:
  6890 + version "2.0.0-alpha.13"
  6891 + resolved "https://registry.npmjs.org/pinia/-/pinia-2.0.0-alpha.13.tgz#d48e6efec11d38201e20770bc02b168e2157a9f7"
  6892 + integrity sha512-3r9fpUi5Uai48vjeTXzcHAvlDjYvx/9mNtWiO5QyWy4zqfn7YjvOiBCHXH9r1jwo4LakZzG/ppr5i6sr/63fYQ==
6880 6893  
6881 6894 pinkie-promise@^2.0.0:
6882 6895 version "2.0.1"
... ... @@ -7075,7 +7088,7 @@ postcss@^7.0.0, postcss@^7.0.14, postcss@^7.0.17, postcss@^7.0.2, postcss@^7.0.2
7075 7088 source-map "^0.6.1"
7076 7089 supports-color "^6.1.0"
7077 7090  
7078   -postcss@^8.1.10, postcss@^8.2.1, postcss@^8.2.9:
  7091 +postcss@^8.1.10, postcss@^8.2.1:
7079 7092 version "8.2.9"
7080 7093 resolved "https://registry.npmjs.org/postcss/-/postcss-8.2.9.tgz#fd95ff37b5cee55c409b3fdd237296ab4096fba3"
7081 7094 integrity sha512-b+TmuIL4jGtCHtoLi+G/PisuIl9avxs8IZMSmlABRwNz5RLUUACrC+ws81dcomz1nRezm5YPdXiMEzBEKgYn+Q==
... ... @@ -7084,6 +7097,15 @@ postcss@^8.1.10, postcss@^8.2.1, postcss@^8.2.9:
7084 7097 nanoid "^3.1.22"
7085 7098 source-map "^0.6.1"
7086 7099  
  7100 +postcss@^8.2.10:
  7101 + version "8.2.10"
  7102 + resolved "https://registry.npmjs.org/postcss/-/postcss-8.2.10.tgz#ca7a042aa8aff494b334d0ff3e9e77079f6f702b"
  7103 + integrity sha512-b/h7CPV7QEdrqIxtAf2j31U5ef05uBDuvoXv6L51Q4rcS1jdlXAVKJv+atCFdUXYl9dyTHGyoMzIepwowRJjFw==
  7104 + dependencies:
  7105 + colorette "^1.2.2"
  7106 + nanoid "^3.1.22"
  7107 + source-map "^0.6.1"
  7108 +
7087 7109 posthtml-parser@^0.2.0, posthtml-parser@^0.2.1:
7088 7110 version "0.2.1"
7089 7111 resolved "https://registry.npmjs.org/posthtml-parser/-/posthtml-parser-0.2.1.tgz#35d530de386740c2ba24ff2eb2faf39ccdf271dd"
... ... @@ -7617,10 +7639,10 @@ rollup-plugin-terser@^7.0.0:
7617 7639 serialize-javascript "^4.0.0"
7618 7640 terser "^5.0.0"
7619 7641  
7620   -rollup-plugin-visualizer@5.3.0:
7621   - version "5.3.0"
7622   - resolved "https://registry.npmjs.org/rollup-plugin-visualizer/-/rollup-plugin-visualizer-5.3.0.tgz#2aafea2626f430a5eb84cf4a42b2f01948a4681b"
7623   - integrity sha512-beMaHDF1BgqYLY7URjSzawzQP/sBi+1cnInwXOsUdkWy84VZNQRXanitfmdz0lkSKupkE/KtiU61qbedAU5Kfg==
  7642 +rollup-plugin-visualizer@5.3.4:
  7643 + version "5.3.4"
  7644 + resolved "https://registry.npmjs.org/rollup-plugin-visualizer/-/rollup-plugin-visualizer-5.3.4.tgz#216300acca6e31b139be92eed98280c5662a5818"
  7645 + integrity sha512-n3wYwKrZ3nhYJj8apzFuxmiu4y+ygDNJYLqQCOxludg3Pnhkql9WYc8iupgsMI+jGREA0dFsfDlzDAKcmXZIMQ==
7624 7646 dependencies:
7625 7647 nanoid "^3.1.22"
7626 7648 open "^7.4.2"
... ... @@ -9112,10 +9134,10 @@ vite-plugin-svg-icons@^0.4.1:
9112 9134 svg-baker "1.7.0"
9113 9135 svgo "^2.3.0"
9114 9136  
9115   -vite-plugin-theme@^0.6.4:
9116   - version "0.6.4"
9117   - resolved "https://registry.npmjs.org/vite-plugin-theme/-/vite-plugin-theme-0.6.4.tgz#51376c328d708aa30ce56031ff4d7dd02cca613f"
9118   - integrity sha512-GoXSDHjmDNU2R6bmuyr67VqI5dekGSejNMzlGTivMOmNl516464ATmV5NtoCDNiPJ1QYYnMRjZSQNfZ/Fxl7Qg==
  9137 +vite-plugin-theme@^0.7.0:
  9138 + version "0.7.0"
  9139 + resolved "https://registry.npmjs.org/vite-plugin-theme/-/vite-plugin-theme-0.7.0.tgz#287fb37de9edc612c9731b6fa84ee78a123d061d"
  9140 + integrity sha512-D7lQdQM7z0EGAPXIEFMTMNVRvdTTNl5pvksVjhHZb8VfQwTbIfYZuBnRDP1mRMuQH04oipBAAMJl3isn9j3jNg==
9119 9141 dependencies:
9120 9142 "@types/node" "^14.14.37"
9121 9143 "@types/tinycolor2" "^1.4.2"
... ... @@ -9126,15 +9148,15 @@ vite-plugin-theme@^0.6.4:
9126 9148 esbuild-plugin-alias "^0.1.2"
9127 9149 tinycolor2 "^1.4.2"
9128 9150  
9129   -vite-plugin-windicss@0.13.2:
9130   - version "0.13.2"
9131   - resolved "https://registry.npmjs.org/vite-plugin-windicss/-/vite-plugin-windicss-0.13.2.tgz#c6390e42c4ceef2bd407fcbad8cab467ba695d87"
9132   - integrity sha512-yy9jncbjMl79hEnJC8F8UQhM3b+r9g+JDFtn1ximK0BZvMpS4UKBuayWjmmk9tb8/5I9W+H1osnrfhhlneLW1Q==
  9151 +vite-plugin-windicss@0.14.0:
  9152 + version "0.14.0"
  9153 + resolved "https://registry.npmjs.org/vite-plugin-windicss/-/vite-plugin-windicss-0.14.0.tgz#e2e1c2a14eff7a5a3c417c388e5d865fa6157967"
  9154 + integrity sha512-f4Dgvpgq1i2rvqJ3He4gZ+BYrgz6OiQwHOLMOMU4RbyWY1Vr7gdNs71E/AbN2DWdkm+L/fj/4BNhvlp35I8+fw==
9133 9155 dependencies:
9134   - "@windicss/plugin-utils" "0.13.2"
  9156 + "@windicss/plugin-utils" "0.14.0"
9135 9157 chalk "^4.1.0"
9136 9158 debug "^4.3.2"
9137   - windicss "^2.5.12"
  9159 + windicss "^2.5.14"
9138 9160  
9139 9161 vite@2.1.5:
9140 9162 version "2.1.5"
... ... @@ -9246,10 +9268,10 @@ which@^2.0.1:
9246 9268 dependencies:
9247 9269 isexe "^2.0.0"
9248 9270  
9249   -windicss@^2.5.12:
9250   - version "2.5.12"
9251   - resolved "https://registry.npmjs.org/windicss/-/windicss-2.5.12.tgz#7bc469b05d7a8fa3905d49d6521a1ff9107d0ea4"
9252   - integrity sha512-BZ0Ps1C0RlCHBVOPcw/DAReeR9o/mKaoFgkBsVphQ23M5nsvVfVXgGlNJZssjAQsXnlDpj97pnIhtDn1ENBjXw==
  9271 +windicss@^2.5.14:
  9272 + version "2.5.14"
  9273 + resolved "https://registry.npmjs.org/windicss/-/windicss-2.5.14.tgz#41236ccc2517c0947e1adb69e0d5e8aa9bed9c1e"
  9274 + integrity sha512-8Lm7U1M5AzJPbiaVSVz7qWdETRzlkv//5LBMICBBAojos1jo09lUGhNZ5rBzHeldB9JmqYMDOGgrrXHExu0EAg==
9253 9275  
9254 9276 wmf@~1.0.1:
9255 9277 version "1.0.2"
... ...