diff --git a/components/checkbox/style/mixin.less b/components/checkbox/style/mixin.less index 259dfb5def..50d9627851 100644 --- a/components/checkbox/style/mixin.less +++ b/components/checkbox/style/mixin.less @@ -57,10 +57,10 @@ &:after { @check-width: (@checkbox-size / 14) * 5px; @check-height: (@checkbox-size / 14) * 8px; - transform: rotate(45deg) scale(0); + transform: rotate(45deg) scale(0) translate(-50%, -50%); position: absolute; - left: (@checkbox-size - @check-width) / 2 - 0.5px * (@checkbox-size / 14); - top: (@checkbox-size - @check-height) / 2 - 2px * (@checkbox-size / 14); + top: 50%; + left: 21%; display: table; width: @check-width; height: @check-height; @@ -89,7 +89,7 @@ // 选中状态 .@{checkbox-prefix-cls}-checked .@{checkbox-inner-prefix-cls}:after { - transform: rotate(45deg) scale(1); + transform: rotate(45deg) scale(1) translate(-50%, -50%); position: absolute; display: table; border: 2px solid @checkbox-check-color; diff --git a/components/config-provider/__tests__/__snapshots__/components.test.js.snap b/components/config-provider/__tests__/__snapshots__/components.test.js.snap index 933b165a3c..ab0a4045b4 100644 --- a/components/config-provider/__tests__/__snapshots__/components.test.js.snap +++ b/components/config-provider/__tests__/__snapshots__/components.test.js.snap @@ -16398,7 +16398,6 @@ exports[`ConfigProvider components Upload configProvider 1`] = ` >
{ } handleManualRemove = (file: UploadFile) => { - this.upload.abort(file); - + if (this.upload) { + this.upload.abort(file); + } this.handleRemove(file); }; @@ -315,11 +316,11 @@ class Upload extends React.Component { [`${prefixCls}-disabled`]: disabled, }); - const uploadButton = ( -
+ const uploadButton = children ? ( +
- ); + ) : null; if (listType === 'picture-card') { return ( diff --git a/components/upload/__tests__/__snapshots__/demo.test.js.snap b/components/upload/__tests__/__snapshots__/demo.test.js.snap index 8f40478a6c..865868ba06 100644 --- a/components/upload/__tests__/__snapshots__/demo.test.js.snap +++ b/components/upload/__tests__/__snapshots__/demo.test.js.snap @@ -6,7 +6,6 @@ exports[`renders ./components/upload/demo/avatar.md correctly 1`] = ` >
`; @@ -17,7 +16,6 @@ exports[`renders ./components/upload/demo/basic.md correctly 1`] = ` >
@@ -415,7 +409,6 @@ exports[`renders ./components/upload/demo/picture-style.md correctly 1`] = ` >