From f4af231172874eeffa9097e2624c4a7d0654f7d7 Mon Sep 17 00:00:00 2001 From: Vben Date: Mon, 19 Apr 2021 23:51:43 +0800 Subject: [PATCH] fix(button): ghost style --- build/vite/plugin/hmr.ts | 6 ++++-- src/design/ant/btn.less | 4 ++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/build/vite/plugin/hmr.ts b/build/vite/plugin/hmr.ts index 583106288a9..807fdb96a2c 100644 --- a/build/vite/plugin/hmr.ts +++ b/build/vite/plugin/hmr.ts @@ -13,8 +13,10 @@ export function configHmrPlugin(): Plugin { if (file.match(/xml$/)) return []; modules.forEach((m) => { - m.importedModules = new Set(); - m.importers = new Set(); + if (!m.url.match(/\.(css|less)/)) { + m.importedModules = new Set(); + m.importers = new Set(); + } }); return modules; diff --git a/src/design/ant/btn.less b/src/design/ant/btn.less index 9e4a5e185a1..3f6bae811d4 100644 --- a/src/design/ant/btn.less +++ b/src/design/ant/btn.less @@ -185,7 +185,7 @@ } } - &-ghost { + &-background-ghost { color: @button-ghost-color; background-color: transparent; border-color: @button-ghost-color; @@ -193,7 +193,7 @@ &:hover, &:focus { - color: @button-ghost-hover-color; + color: @button-ghost-hover-color !important; background-color: @button-ghost-hover-bg-color; border-color: @button-ghost-hover-color; }