Browse Source

fix: Popconfirm loading should finish (#41121)

* fix: Popconfirm loading should finish

* chore: update bug version
pull/41131/head
二货爱吃白萝卜 2 years ago
committed by GitHub
parent
commit
87f13b3ddc
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 1
      components/_util/ActionButton.tsx
  2. 17
      components/modal/style/index.tsx
  3. 3
      scripts/post-script.js

1
components/_util/ActionButton.tsx

@ -62,6 +62,7 @@ const ActionButton: React.FC<ActionButtonProps> = (props) => {
setLoading(true);
returnValueOfOnOk!.then(
(...args: any[]) => {
setLoading(false, true);
onInternalClose(...args);
clickedRef.current = false;
},

17
components/modal/style/index.tsx

@ -1,9 +1,9 @@
import type React from 'react';
import { clearFix, genFocusStyle, resetComponent } from '../../style';
import { initFadeMotion, initZoomMotion } from '../../style/motion';
import type { AliasToken, FullToken, GenerateStyle } from '../../theme/internal';
import { genComponentStyleHook, mergeToken } from '../../theme/internal';
import type { TokenWithCommonCls } from '../../theme/util/genComponentStyleHook';
import { clearFix, genFocusStyle, resetComponent } from '../../style';
/** Component only token. Which will handle additional calculation of alias token */
export interface ComponentToken {
@ -47,12 +47,12 @@ function box(position: React.CSSProperties['position']): React.CSSProperties {
}
export const genModalMaskStyle: GenerateStyle<TokenWithCommonCls<AliasToken>> = (token) => {
const { componentCls } = token;
const { componentCls, antCls } = token;
return [
{
[`${componentCls}-root`]: {
[`${componentCls}${token.antCls}-zoom-enter, ${componentCls}${token.antCls}-zoom-appear`]: {
[`${componentCls}${antCls}-zoom-enter, ${componentCls}${antCls}-zoom-appear`]: {
// reset scale avoid mousePosition bug
transform: 'none',
opacity: 0,
@ -61,6 +61,12 @@ export const genModalMaskStyle: GenerateStyle<TokenWithCommonCls<AliasToken>> =
userSelect: 'none',
},
// https://github.com/ant-design/ant-design/issues/37329
// https://github.com/ant-design/ant-design/issues/40272
[`${componentCls}${antCls}-zoom-leave ${componentCls}-content`]: {
pointerEvents: 'none',
},
[`${componentCls}-mask`]: {
...box('fixed'),
zIndex: token.zIndexPopupBase,
@ -349,11 +355,6 @@ const genModalConfirmStyle: GenerateStyle<ModalToken> = (token) => {
[`${confirmComponentCls}-success ${confirmComponentCls}-body > ${token.iconCls}`]: {
color: token.colorSuccess,
},
// https://github.com/ant-design/ant-design/issues/37329
[`${componentCls}-zoom-leave ${componentCls}-btns`]: {
pointerEvents: 'none',
},
};
};

3
scripts/post-script.js

@ -29,6 +29,9 @@ const DEPRECIATED_VERSION = {
'5.1.2': ['https://github.com/ant-design/ant-design/issues/39949'],
'5.1.3': ['https://github.com/ant-design/ant-design/issues/40113'],
'5.1.4': ['https://github.com/ant-design/ant-design/issues/40186'],
'>= 5.2.3 <= 5.3.0': [
'https://github.com/ant-design/ant-design/pull/40719#issuecomment-1453418135',
],
};
function matchDeprecated(version) {

Loading…
Cancel
Save