|
@@ -14,31 +14,47 @@ export function configThemePlugin(isBuild: boolean): PluginOption[] {
|
|
|
mixLighten,
|
|
|
tinycolor,
|
|
|
});
|
|
|
- const plugin = [
|
|
|
- viteThemePlugin({
|
|
|
- resolveSelector: (s) => {
|
|
|
- s = s.trim();
|
|
|
- switch (s) {
|
|
|
- case '.ant-steps-item-process .ant-steps-item-icon > .ant-steps-icon':
|
|
|
- return '.ant-steps-item-icon > .ant-steps-icon';
|
|
|
- case '.ant-radio-button-wrapper-checked:not(.ant-radio-button-wrapper-disabled)':
|
|
|
- case '.ant-radio-button-wrapper-checked:not(.ant-radio-button-wrapper-disabled):hover':
|
|
|
- case '.ant-radio-button-wrapper-checked:not(.ant-radio-button-wrapper-disabled):active':
|
|
|
- return s;
|
|
|
- case '.ant-steps-item-icon > .ant-steps-icon':
|
|
|
- return s;
|
|
|
- case '.ant-select-item-option-selected:not(.ant-select-item-option-disabled)':
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ const vite_theme_plugin = viteThemePlugin({
|
|
|
+ resolveSelector: (s) => {
|
|
|
+ s = s.trim();
|
|
|
+ switch (s) {
|
|
|
+ case '.ant-steps-item-process .ant-steps-item-icon > .ant-steps-icon':
|
|
|
+ return '.ant-steps-item-icon > .ant-steps-icon';
|
|
|
+ case '.ant-radio-button-wrapper-checked:not(.ant-radio-button-wrapper-disabled)':
|
|
|
+ case '.ant-radio-button-wrapper-checked:not(.ant-radio-button-wrapper-disabled):hover':
|
|
|
+ case '.ant-radio-button-wrapper-checked:not(.ant-radio-button-wrapper-disabled):active':
|
|
|
+ return s;
|
|
|
+ case '.ant-steps-item-icon > .ant-steps-icon':
|
|
|
+ return s;
|
|
|
+ case '.ant-select-item-option-selected:not(.ant-select-item-option-disabled)':
|
|
|
+ return s;
|
|
|
+ default:
|
|
|
+ if (s.indexOf('.ant-btn') >= -1) {
|
|
|
+
|
|
|
return s;
|
|
|
- default:
|
|
|
- if (s.indexOf('.ant-btn') >= -1) {
|
|
|
-
|
|
|
- return s;
|
|
|
- }
|
|
|
- }
|
|
|
- return s.startsWith('[data-theme') ? s : `[data-theme] ${s}`;
|
|
|
- },
|
|
|
- colorVariables: [...getThemeColors(), ...colors],
|
|
|
- }),
|
|
|
+ }
|
|
|
+ }
|
|
|
+ return s.startsWith('[data-theme') ? s : `[data-theme] ${s}`;
|
|
|
+ },
|
|
|
+ colorVariables: [...getThemeColors(), ...colors],
|
|
|
+ });
|
|
|
+ vite_theme_plugin.forEach(function (item) {
|
|
|
+
|
|
|
+ if ('vite:theme' === item.name) {
|
|
|
+
|
|
|
+ if (isBuild) {
|
|
|
+ delete item.enforce;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ });
|
|
|
+
|
|
|
+
|
|
|
+ const plugin = [
|
|
|
+ vite_theme_plugin,
|
|
|
antdDarkThemePlugin({
|
|
|
preloadFiles: [
|
|
|
path.resolve(process.cwd(), 'node_modules/ant-design-vue/dist/antd.less'),
|
|
@@ -58,6 +74,7 @@ export function configThemePlugin(isBuild: boolean): PluginOption[] {
|
|
|
|
|
|
'text-color-secondary': '#8b949e',
|
|
|
'border-color-base': '#303030',
|
|
|
+ 'header-light-bottom-border-color': '#303030',
|
|
|
|
|
|
'item-active-bg': '#111b26',
|
|
|
'app-content-background': '#1e1e1e',
|