File tree 3 files changed +31
-23
lines changed
3 files changed +31
-23
lines changed Original file line number Diff line number Diff line change @@ -36,9 +36,9 @@ exports[`Button renders Chinese characters correctly 3`] = `
36
36
</button >
37
37
` ;
38
38
39
- exports [` Button renders Chinese characters correctly 4` ] = ` <button class = " ant-btn ant-btn-loading" type = " button" ><span class = " ant-btn-loading-icon " >< span role = " img" aria-label = " loading" class = " anticon anticon-loading" ><svg focusable = " false" class = " anticon-spin" data-icon = " loading" width = " 1em" height = " 1em" fill = " currentColor" aria-hidden = " true" viewBox = " 0 0 1024 1024" ><path d = " M988 548c-19.9 0-36-16.1-36-36 0-59.4-11.6-117-34.6-171.3a440.45 440.45 0 00-94.3-139.9 437.71 437.71 0 00-139.9-94.3C629 83.6 571.4 72 512 72c-19.9 0-36-16.1-36-36s16.1-36 36-36c69.1 0 136.2 13.5 199.3 40.3C772.3 66 827 103 874 150c47 47 83.9 101.8 109.7 162.7 26.7 63.1 40.2 130.2 40.2 199.3.1 19.9-16 36-35.9 36z" ></path ></svg ></ span ></span ><span >按 钮</span ></button >` ;
39
+ exports [` Button renders Chinese characters correctly 4` ] = ` <button class = " ant-btn ant-btn-loading" type = " button" ><span role = " img" aria-label = " loading" class = " anticon anticon-loading" ><svg focusable = " false" class = " anticon-spin" data-icon = " loading" width = " 1em" height = " 1em" fill = " currentColor" aria-hidden = " true" viewBox = " 0 0 1024 1024" ><path d = " M988 548c-19.9 0-36-16.1-36-36 0-59.4-11.6-117-34.6-171.3a440.45 440.45 0 00-94.3-139.9 437.71 437.71 0 00-139.9-94.3C629 83.6 571.4 72 512 72c-19.9 0-36-16.1-36-36s16.1-36 36-36c69.1 0 136.2 13.5 199.3 40.3C772.3 66 827 103 874 150c47 47 83.9 101.8 109.7 162.7 26.7 63.1 40.2 130.2 40.2 199.3.1 19.9-16 36-35.9 36z" ></path ></svg ></span ><span >按 钮</span ></button >` ;
40
40
41
- exports [` Button renders Chinese characters correctly 5` ] = ` <button class = " ant-btn ant-btn-loading" type = " button" ><span class = " ant-btn-loading-icon " >< span role = " img" aria-label = " loading" class = " anticon anticon-loading" ><svg focusable = " false" class = " anticon-spin" data-icon = " loading" width = " 1em" height = " 1em" fill = " currentColor" aria-hidden = " true" viewBox = " 0 0 1024 1024" ><path d = " M988 548c-19.9 0-36-16.1-36-36 0-59.4-11.6-117-34.6-171.3a440.45 440.45 0 00-94.3-139.9 437.71 437.71 0 00-139.9-94.3C629 83.6 571.4 72 512 72c-19.9 0-36-16.1-36-36s16.1-36 36-36c69.1 0 136.2 13.5 199.3 40.3C772.3 66 827 103 874 150c47 47 83.9 101.8 109.7 162.7 26.7 63.1 40.2 130.2 40.2 199.3.1 19.9-16 36-35.9 36z" ></path ></svg ></ span ></span ><span >按 钮</span ></button >` ;
41
+ exports [` Button renders Chinese characters correctly 5` ] = ` <button class = " ant-btn ant-btn-loading" type = " button" ><span role = " img" aria-label = " loading" class = " anticon anticon-loading" ><svg focusable = " false" class = " anticon-spin" data-icon = " loading" width = " 1em" height = " 1em" fill = " currentColor" aria-hidden = " true" viewBox = " 0 0 1024 1024" ><path d = " M988 548c-19.9 0-36-16.1-36-36 0-59.4-11.6-117-34.6-171.3a440.45 440.45 0 00-94.3-139.9 437.71 437.71 0 00-139.9-94.3C629 83.6 571.4 72 512 72c-19.9 0-36-16.1-36-36s16.1-36 36-36c69.1 0 136.2 13.5 199.3 40.3C772.3 66 827 103 874 150c47 47 83.9 101.8 109.7 162.7 26.7 63.1 40.2 130.2 40.2 199.3.1 19.9-16 36-35.9 36z" ></path ></svg ></span ><span >按 钮</span ></button >` ;
42
42
43
43
exports [` Button renders Chinese characters correctly 6` ] = `
44
44
<button class = " ant-btn ant-btn-two-chinese-chars" type = " button" >
Original file line number Diff line number Diff line change @@ -176,13 +176,7 @@ export default defineComponent({
176
176
onClick : handleClick ,
177
177
} ;
178
178
179
- const iconNode = innerLoading . value ? (
180
- < span class = { `${ prefixCls . value } -loading-icon` } >
181
- < LoadingOutlined />
182
- </ span >
183
- ) : (
184
- icon
185
- ) ;
179
+ const iconNode = innerLoading . value ? < LoadingOutlined /> : icon ;
186
180
187
181
const kids = children . map ( child =>
188
182
insertSpace ( child , isNeedInserted && autoInsertSpace . value ) ,
Original file line number Diff line number Diff line change 155
155
}
156
156
}
157
157
158
- & > &-loading-icon {
159
- transition : all 0.3s @ease-in-out ;
160
-
161
- .@{iconfont-css-prefix} {
162
- padding-right : @padding-xs ;
163
- animation : none ;
164
- // for smooth button padding transition
165
- svg {
166
- animation : loadingCircle 1s infinite linear ;
167
- }
158
+ &&-loading :not (&-circle ):not (&-circle-outline ):not (&-icon-only ) {
159
+ padding-left : 29px ;
160
+ .@{iconfont-css-prefix} :not (:last-child ) {
161
+ margin-left : -14px ;
168
162
}
163
+ }
169
164
170
- & :only-child {
171
- . @{iconfont-css-prefix} {
172
- padding-right : 0 ;
173
- }
165
+ &-sm&-loading : not ( &-circle ): not ( &-circle-outline ): not ( &-icon-only ) {
166
+ padding-left : 24 px ;
167
+ . @{iconfont-css-prefix} {
168
+ margin-left : -17 px ;
174
169
}
175
170
}
176
171
172
+ // & > &-loading-icon {
173
+ // transition: all 0.3s @ease-in-out;
174
+
175
+ // .@{iconfont-css-prefix} {
176
+ // padding-right: @padding-xs;
177
+ // animation: none;
178
+ // // for smooth button padding transition
179
+ // svg {
180
+ // animation: loadingCircle 1s infinite linear;
181
+ // }
182
+ // }
183
+
184
+ // &:only-child {
185
+ // .@{iconfont-css-prefix} {
186
+ // padding-right: 0;
187
+ // }
188
+ // }
189
+ // }
190
+
177
191
&-group {
178
192
.btn-group (@btn-prefix-cls );
179
193
}
You can’t perform that action at this time.
0 commit comments