Commit 640a2c17986e2b59be57125e91051ec879f31eeb
1 parent
37c57416
fix(theme): make sure the steps style is correct, fix #414
Showing
3 changed files
with
26 additions
and
16 deletions
build/vite/plugin/theme.ts
... | ... | @@ -22,7 +22,17 @@ export function configThemePlugin(isBuild: boolean): Plugin[] { |
22 | 22 | }); |
23 | 23 | const plugin = [ |
24 | 24 | viteThemePlugin({ |
25 | - resolveSelector: (s) => `[data-theme] ${s}`, | |
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-steps-item-icon > .ant-steps-icon': | |
31 | + return s; | |
32 | + } | |
33 | + | |
34 | + return `[data-theme] ${s}`; | |
35 | + }, | |
26 | 36 | colorVariables: [...getThemeColors(), ...colors], |
27 | 37 | }), |
28 | 38 | antdDarkThemePlugin({ | ... | ... |
package.json
... | ... | @@ -114,14 +114,14 @@ |
114 | 114 | "vite-plugin-style-import": "^0.9.2", |
115 | 115 | "vite-plugin-svg-icons": "^0.4.1", |
116 | 116 | "vite-plugin-theme": "^0.6.3", |
117 | - "vite-plugin-windicss": "0.13.1", | |
117 | + "vite-plugin-windicss": "0.13.2", | |
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.6" | |
124 | + "esbuild": "^0.11.7" | |
125 | 125 | }, |
126 | 126 | "repository": { |
127 | 127 | "type": "git", | ... | ... |
yarn.lock
... | ... | @@ -1696,10 +1696,10 @@ |
1696 | 1696 | dependencies: |
1697 | 1697 | vue-demi latest |
1698 | 1698 | |
1699 | -"@windicss/plugin-utils@0.13.1": | |
1700 | - version "0.13.1" | |
1701 | - resolved "https://registry.npmjs.org/@windicss/plugin-utils/-/plugin-utils-0.13.1.tgz#e0e172855ebcf0b8a5f0f358befdcaf44bae5cf1" | |
1702 | - integrity sha512-Vr7f7yWxmB5AWwe+iDPV3JbhTlZHbDvM89IfJ0hyP6PqYmZNTtUfMXMbHXZJHVAbQ54dWBMG23WmeC9X327ETA== | |
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== | |
1703 | 1703 | dependencies: |
1704 | 1704 | debug "^4.3.2" |
1705 | 1705 | fast-glob "^3.2.5" |
... | ... | @@ -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.9.2, esbuild@^0.9.3: | |
3600 | - version "0.11.6" | |
3601 | - resolved "https://registry.npmjs.org/esbuild/-/esbuild-0.11.6.tgz#20961309c4cfed00b71027e18806150358d0cbb0" | |
3602 | - integrity sha512-L+nKW9ftVS/N2CVJMR9YmXHbkm+vHzlNYuo09rzipQhF7dYNvRLfWoEPSDRTl10and4owFBV9rJ2CTFNtLIOiw== | |
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== | |
3603 | 3603 | |
3604 | 3604 | escalade@^3.1.1: |
3605 | 3605 | version "3.1.1" |
... | ... | @@ -9126,12 +9126,12 @@ vite-plugin-theme@^0.6.3: |
9126 | 9126 | esbuild-plugin-alias "^0.1.2" |
9127 | 9127 | tinycolor2 "^1.4.2" |
9128 | 9128 | |
9129 | -vite-plugin-windicss@0.13.1: | |
9130 | - version "0.13.1" | |
9131 | - resolved "https://registry.npmjs.org/vite-plugin-windicss/-/vite-plugin-windicss-0.13.1.tgz#82a488f3395be710ae2166b83b0612a5eaec7738" | |
9132 | - integrity sha512-WmFfTLTMSY5gRC3MWX9o72Yni2HRdrtJ2im+cCyZ2W/p4WE6T702zFCScO8Tnz/E08GDx4OH6oFCZWeZYwgxzg== | |
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== | |
9133 | 9133 | dependencies: |
9134 | - "@windicss/plugin-utils" "0.13.1" | |
9134 | + "@windicss/plugin-utils" "0.13.2" | |
9135 | 9135 | chalk "^4.1.0" |
9136 | 9136 | debug "^4.3.2" |
9137 | 9137 | windicss "^2.5.12" | ... | ... |