fix: modal ts error for parentContext #4305

close #4305
pull/4313/head
tangjinzhou 2021-07-01 21:45:35 +08:00
parent da10933cd3
commit d5952c060f
2 changed files with 2 additions and 1 deletions

View File

@ -123,6 +123,7 @@ export interface ModalFuncProps {
autoFocusButton?: null | 'ok' | 'cancel';
transitionName?: string;
maskTransitionName?: string;
parentContext?: any;
}
type getContainerFunc = () => HTMLElement;

View File

@ -5,7 +5,7 @@ import { destroyFns } from './Modal';
import Omit from 'omit.js';
export default function confirm(config: ModalFuncProps & { parentContext?: any }) {
export default function confirm(config: ModalFuncProps) {
const div = document.createElement('div');
document.body.appendChild(div);
let currentConfig = { ...Omit(config, ['parentContext']), close, visible: true } as any;