diff --git a/scripts/AddlocalIdentName.js b/scripts/AddlocalIdentName.js index 8c6a08891c37649898aedcdd7d1cbcf7a6d03bfb..a7764c204220f57a27d874ddca606fa473e7fac6 100644 --- a/scripts/AddlocalIdentName.js +++ b/scripts/AddlocalIdentName.js @@ -24,13 +24,16 @@ const LocalIdentNameplugin = postcss.plugin('LocalIdentNameplugin', ({ localIden return; } // 删除 :global(className) 保留 className - if (item.selector && !item.selector.includes('(')) { + if (item.selector) { if (item.selector.includes(':global(')) { // converted :global(.className) const className = item.selector.match(/:global\((\S*)\)/)[1]; item.selector = className; return; } + if (item.selector.includes('(')) { + return; + } const className = item.selector.replace(/\./g, `.${localIdentName}`); item.selector = className; } diff --git a/src/components/GlobalHeader/index.less b/src/components/GlobalHeader/index.less index f1928d4cd9e9656c9d997eaa854fd81eac5d13cc..ad305210ec626a05460017d648b48f245cb7949d 100644 --- a/src/components/GlobalHeader/index.less +++ b/src/components/GlobalHeader/index.less @@ -56,8 +56,10 @@ i.trigger { vertical-align: middle; color: @text-color; } - &:hover, - &:global(.ant-popover-open) { + &:hover { + background: @primary-1; + } + :global(&.ant-popover-open) { background: @primary-1; } } diff --git a/src/components/SettingDarwer/index.js b/src/components/SettingDarwer/index.js index e11595edba8bbf2833d71d36c557a8cbf04b9024..d395029458ae0b39652cc8e8de7caa0b5b4da691 100644 --- a/src/components/SettingDarwer/index.js +++ b/src/components/SettingDarwer/index.js @@ -133,6 +133,7 @@ class SettingDarwer extends PureComponent { window.less .modifyVars({ '@primary-color': color, + '@input-hover-border-color': color, }) .then(() => { hideMessage(); diff --git a/src/pages/Dashboard/Analysis.less b/src/pages/Dashboard/Analysis.less index cd1d43ba1f88e3ecf35353a2b1b65e5dbe748b7c..dc2319cbf4ff5b5c0ad5e61755ec475e9e5436d3 100644 --- a/src/pages/Dashboard/Analysis.less +++ b/src/pages/Dashboard/Analysis.less @@ -119,10 +119,9 @@ position: relative; right: 6px; } - } - - :global(.ant-tabs-tab-active) h4 { - color: @primary-color; + .ant-tabs-tab-active h4 { + color: @primary-color; + } } }