Date: Tue, 16 Sep 2025 17:29:09 +0800
Subject: [PATCH 2/2] =?UTF-8?q?style(button):=20=E4=BC=98=E5=8C=96?=
=?UTF-8?q?=E6=8C=89=E9=92=AE=E6=BF=80=E6=B4=BB=E7=8A=B6=E6=80=81=E6=A0=B7?=
=?UTF-8?q?=E5=BC=8F?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
- 修改默认按钮、主要按钮、危险按钮在激活状态下的背景色、边框色和文字颜色
- 增加幽灵按钮、文本按钮和链接按钮在激活状态下的样式
-统一使用 $color-error-7 和 $color-primary-7 作为激活状态的颜色
---
src/styles/components/ant-button.scss | 40 +++++++++++++++++++++++++--
1 file changed, 38 insertions(+), 2 deletions(-)
diff --git a/src/styles/components/ant-button.scss b/src/styles/components/ant-button.scss
index b5b20c6..29bc47e 100644
--- a/src/styles/components/ant-button.scss
+++ b/src/styles/components/ant-button.scss
@@ -19,7 +19,7 @@
padding: 0 16px;
height: 28px;
}
-
+
}
.ant-btn-default {
&:disabled {
@@ -86,7 +86,7 @@
}
&:active {
- background: $color-error-5 !important;
+ background-color: $color-error-7 !important;
}
}
}
@@ -105,6 +105,11 @@
color: $color-primary-5 !important;
background-color: #fff !important;
}
+
+ &:active {
+ border-color: $color-primary-7 !important;
+ color: $color-primary-7 !important;
+ }
}
&.ant-btn-dangerous {
border: 1px solid $color-error !important;
@@ -119,6 +124,11 @@
border-color: $color-error-5 !important;
color: $color-error-5 !important;
}
+
+ &:active {
+ border-color: $color-error-7 !important;
+ color: $color-error-7 !important;
+ }
}
}
}
@@ -136,6 +146,11 @@
border-color: $color-primary-5 !important;
color: $color-primary-5 !important;
}
+
+ &:active {
+ border-color: $color-primary-7 !important;
+ color: $color-primary-7 !important;
+ }
}
&.ant-btn-dangerous {
@@ -150,6 +165,11 @@
border-color: $color-error-5 !important;
color: $color-error-5 !important;
}
+
+ &:active {
+ border-color: $color-error-7 !important;
+ color: $color-error-7 !important;
+ }
}
}
}
@@ -167,6 +187,10 @@
color: $color-primary-5 !important;
border-color: transparent !important;
}
+
+ &:active {
+ color: $color-primary-7 !important;
+ }
}
&.ant-btn-dangerous {
color: $color-error !important;
@@ -177,6 +201,10 @@
&:hover {
color: $color-error-5 !important;
}
+
+ &:active {
+ color: $color-error-7 !important;
+ }
}
}
}
@@ -194,6 +222,10 @@
color: $color-primary-5 !important;
border-color: transparent !important;
}
+
+ &:active {
+ color: $color-primary-7 !important;
+ }
}
&.ant-btn-dangerous {
color: $color-error !important;
@@ -204,6 +236,10 @@
&:hover {
color: $color-error-5 !important;
}
+
+ &:active {
+ color: $color-error-7 !important;
+ }
}
}
}