mirror of
https://github.com/ant-design/ant-design.git
synced 2024-11-24 11:10:01 +08:00
resolve conflict.
This commit is contained in:
parent
cc180e2605
commit
46cb1c8cde
@ -7,12 +7,12 @@ import Button from '../button';
|
|||||||
import { ButtonType, NativeButtonProps } from '../button/button';
|
import { ButtonType, NativeButtonProps } from '../button/button';
|
||||||
import LocaleReceiver from '../locale-provider/LocaleReceiver';
|
import LocaleReceiver from '../locale-provider/LocaleReceiver';
|
||||||
import { getConfirmLocale } from './locale';
|
import { getConfirmLocale } from './locale';
|
||||||
|
import Icon from '../icon';
|
||||||
|
|
||||||
let mousePosition: { x: number, y: number } | null;
|
let mousePosition: { x: number, y: number } | null;
|
||||||
let mousePositionEventBinded: boolean;
|
let mousePositionEventBinded: boolean;
|
||||||
|
|
||||||
export interface ModalProps {
|
export interface ModalProps {
|
||||||
prefixCls?: string;
|
|
||||||
/** 对话框是否可见*/
|
/** 对话框是否可见*/
|
||||||
visible?: boolean;
|
visible?: boolean;
|
||||||
/** 确定按钮 loading*/
|
/** 确定按钮 loading*/
|
||||||
@ -55,6 +55,7 @@ export interface ModalProps {
|
|||||||
mask?: boolean;
|
mask?: boolean;
|
||||||
keyboard?: boolean;
|
keyboard?: boolean;
|
||||||
wrapProps?: any;
|
wrapProps?: any;
|
||||||
|
prefixCls?: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface ModalFuncProps {
|
export interface ModalFuncProps {
|
||||||
@ -192,6 +193,12 @@ export default class Modal extends React.Component<ModalProps, {}> {
|
|||||||
</LocaleReceiver>
|
</LocaleReceiver>
|
||||||
);
|
);
|
||||||
|
|
||||||
|
const closeIcon = (
|
||||||
|
<span className={`${prefixCls}-close-x`}>
|
||||||
|
<Icon className={`${prefixCls}-close-icon`} type={'close'}/>
|
||||||
|
</span>
|
||||||
|
);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Dialog
|
<Dialog
|
||||||
{...restProps}
|
{...restProps}
|
||||||
@ -201,6 +208,7 @@ export default class Modal extends React.Component<ModalProps, {}> {
|
|||||||
visible={visible}
|
visible={visible}
|
||||||
mousePosition={mousePosition}
|
mousePosition={mousePosition}
|
||||||
onClose={this.handleCancel}
|
onClose={this.handleCancel}
|
||||||
|
closeIcon={closeIcon}
|
||||||
/>
|
/>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
@ -26,7 +26,24 @@ exports[`Modal render correctly 1`] = `
|
|||||||
>
|
>
|
||||||
<span
|
<span
|
||||||
class="ant-modal-close-x"
|
class="ant-modal-close-x"
|
||||||
/>
|
>
|
||||||
|
<i
|
||||||
|
class="anticon ant-modal-close-icon"
|
||||||
|
>
|
||||||
|
<svg
|
||||||
|
aria-hidden="true"
|
||||||
|
data-icon="close"
|
||||||
|
fill="currentColor"
|
||||||
|
height="1em"
|
||||||
|
viewBox="0 0 1024 1024"
|
||||||
|
width="1em"
|
||||||
|
>
|
||||||
|
<path
|
||||||
|
d="M563.8 512l262.5-312.9c4.4-5.2.7-13.1-6.1-13.1h-79.8c-4.7 0-9.2 2.1-12.3 5.7L511.6 449.8 295.1 191.7c-3-3.6-7.5-5.7-12.3-5.7H203c-6.8 0-10.5 7.9-6.1 13.1L459.4 512 196.9 824.9c-4.4 5.2-.7 13.1 6.1 13.1h79.8c4.7 0 9.2-2.1 12.3-5.7l216.5-258.1 216.5 258.1c3 3.6 7.5 5.7 12.3 5.7h79.8c6.8 0 10.5-7.9 6.1-13.1L563.8 512z"
|
||||||
|
/>
|
||||||
|
</svg>
|
||||||
|
</i>
|
||||||
|
</span>
|
||||||
</button>
|
</button>
|
||||||
<div
|
<div
|
||||||
class="ant-modal-body"
|
class="ant-modal-body"
|
||||||
@ -94,7 +111,24 @@ exports[`Modal render without footer 1`] = `
|
|||||||
>
|
>
|
||||||
<span
|
<span
|
||||||
class="ant-modal-close-x"
|
class="ant-modal-close-x"
|
||||||
/>
|
>
|
||||||
|
<i
|
||||||
|
class="anticon ant-modal-close-icon"
|
||||||
|
>
|
||||||
|
<svg
|
||||||
|
aria-hidden="true"
|
||||||
|
data-icon="close"
|
||||||
|
fill="currentColor"
|
||||||
|
height="1em"
|
||||||
|
viewBox="0 0 1024 1024"
|
||||||
|
width="1em"
|
||||||
|
>
|
||||||
|
<path
|
||||||
|
d="M563.8 512l262.5-312.9c4.4-5.2.7-13.1-6.1-13.1h-79.8c-4.7 0-9.2 2.1-12.3 5.7L511.6 449.8 295.1 191.7c-3-3.6-7.5-5.7-12.3-5.7H203c-6.8 0-10.5 7.9-6.1 13.1L459.4 512 196.9 824.9c-4.4 5.2-.7 13.1 6.1 13.1h79.8c4.7 0 9.2-2.1 12.3-5.7l216.5-258.1 216.5 258.1c3 3.6 7.5 5.7 12.3 5.7h79.8c6.8 0 10.5-7.9 6.1-13.1L563.8 512z"
|
||||||
|
/>
|
||||||
|
</svg>
|
||||||
|
</i>
|
||||||
|
</span>
|
||||||
</button>
|
</button>
|
||||||
<div
|
<div
|
||||||
class="ant-modal-body"
|
class="ant-modal-body"
|
||||||
|
Loading…
Reference in New Issue
Block a user