diff --git a/src/config/replacer/resolve.config.js b/src/config/replacer/resolve.config.js index b3c49de..6156725 100644 --- a/src/config/replacer/resolve.config.js +++ b/src/config/replacer/resolve.config.js @@ -13,7 +13,12 @@ * 注意: value 不能设置为 true */ const cssResolve = { - '.ant-checkbox-checked .ant-checkbox-inner::after': false, + '.ant-checkbox-checked .ant-checkbox-inner::after': { + resolve(cssText, cssObj) { + cssObj.rules.push('border-top:0', 'border-left:0') + return cssObj.toText() + } + }, '.ant-menu-dark .ant-menu-inline.ant-menu-sub': { resolve(cssText, cssObj) { cssObj.rules = cssObj.rules.filter(rule => rule.indexOf('box-shadow') == -1) diff --git a/src/utils/theme-color-replacer-extend.js b/src/utils/theme-color-replacer-extend.js index 7e586dc..8dadc35 100644 --- a/src/utils/theme-color-replacer-extend.js +++ b/src/utils/theme-color-replacer-extend.js @@ -26,8 +26,11 @@ function resolveCss(output, srcArr) { // 转换为 css 对象 let cssObj = parseCssObj(text) // 根据selector匹配配置,匹配成功,则按配置处理 css - if (cssResolve[cssObj.selector]) { - outArr.push(cssResolve[cssObj.selector].resolve(text, cssObj)) + if (cssResolve[cssObj.selector] != undefined) { + let cfg = cssResolve[cssObj.selector] + if (cfg) { + outArr.push(cfg.resolve(text, cssObj)) + } } else { let cssText = '' // 匹配不成功,则测试是否有匹配的正则配置,有则按正则对应的配置处理