Skip to content

Commit 3466029

Browse files
committed
fix: 全局覆盖样式
1 parent b9f9c9f commit 3466029

File tree

1 file changed

+46
-11
lines changed

1 file changed

+46
-11
lines changed

src/assets/style/realize/element-variable.scss

Lines changed: 46 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,8 @@ $--link-disabled-font-color: var(--theme-text-soft);
1616
background-color 0.2s ease,
1717
box-shadow 0.2s ease;
1818

19-
&:hover {
19+
&.el-button--default:hover,
20+
&.el-button--default:focus {
2021
color: var(--theme-primary) !important;
2122
background: var(--theme-primary-soft) !important;
2223
border: 1px solid var(--theme-primary-soft-border) !important;
@@ -52,8 +53,8 @@ $--link-disabled-font-color: var(--theme-text-soft);
5253
background: var(--el-color-primary) !important;
5354
border: 1px solid var(--el-color-primary) !important;
5455

55-
&:hover,
56-
&:focus {
56+
&:not(.is-plain):hover,
57+
&:not(.is-plain):focus {
5758
color: var(--el-color-white) !important;
5859
background: var(--el-color-primary-dark-2) !important;
5960
border: 1px solid var(--el-color-primary-dark-2) !important;
@@ -63,6 +64,13 @@ $--link-disabled-font-color: var(--theme-text-soft);
6364
color: var(--el-color-primary) !important;
6465
background: var(--theme-surface-raised) !important;
6566
border: 1px solid var(--theme-primary-soft-border) !important;
67+
68+
&:hover,
69+
&:focus {
70+
color: var(--el-color-primary) !important;
71+
background: var(--theme-primary-soft) !important;
72+
border: 1px solid var(--theme-primary-soft-border) !important;
73+
}
6674
}
6775
}
6876

@@ -77,12 +85,21 @@ $--link-disabled-font-color: var(--theme-text-soft);
7785
border: 1px solid var(--el-color-success) !important;
7886
}
7987

80-
&:hover,
81-
&:focus {
88+
&:not(.is-plain):hover,
89+
&:not(.is-plain):focus {
8290
color: var(--el-color-white) !important;
8391
background: var(--el-color-success-dark-2) !important;
8492
border: 1px solid var(--el-color-success-dark-2) !important;
8593
}
94+
95+
&.is-plain {
96+
&:hover,
97+
&:focus {
98+
color: var(--el-color-success) !important;
99+
background: var(--el-color-success-light-9) !important;
100+
border: 1px solid var(--el-color-success-light-5) !important;
101+
}
102+
}
86103
}
87104

88105
.el-button--danger {
@@ -96,12 +113,21 @@ $--link-disabled-font-color: var(--theme-text-soft);
96113
border: 1px solid var(--el-color-danger) !important;
97114
}
98115

99-
&:hover,
100-
&:focus {
116+
&:not(.is-plain):hover,
117+
&:not(.is-plain):focus {
101118
color: var(--el-color-white) !important;
102119
background: var(--el-color-danger-dark-2) !important;
103120
border: 1px solid var(--el-color-danger-dark-2) !important;
104121
}
122+
123+
&.is-plain {
124+
&:hover,
125+
&:focus {
126+
color: var(--el-color-danger) !important;
127+
background: var(--el-color-danger-light-9) !important;
128+
border: 1px solid var(--el-color-danger-light-5) !important;
129+
}
130+
}
105131
}
106132

107133
.el-button--warning {
@@ -135,8 +161,8 @@ $--link-disabled-font-color: var(--theme-text-soft);
135161
}
136162
}
137163

138-
&:hover,
139-
&:focus {
164+
&:not(.is-plain):hover,
165+
&:not(.is-plain):focus {
140166
color: var(--el-color-white) !important;
141167
background: var(--el-color-warning-dark-2) !important;
142168
border: 1px solid var(--el-color-warning-dark-2) !important;
@@ -169,12 +195,21 @@ $--link-disabled-font-color: var(--theme-text-soft);
169195
border: 1px solid var(--el-color-info) !important;
170196
}
171197

172-
&:hover,
173-
&:focus {
198+
&:not(.is-plain):hover,
199+
&:not(.is-plain):focus {
174200
color: var(--el-color-white) !important;
175201
background: var(--el-color-info-dark-2) !important;
176202
border: 1px solid var(--el-color-info-dark-2) !important;
177203
}
204+
205+
&.is-plain {
206+
&:hover,
207+
&:focus {
208+
color: var(--el-color-info) !important;
209+
background: var(--el-color-info-light-9) !important;
210+
border: 1px solid var(--el-color-info-light-5) !important;
211+
}
212+
}
178213
}
179214

180215
// checkbox

0 commit comments

Comments
 (0)