fix: modal loading button not work
parent
b616823353
commit
9257c1ea68
|
@ -66,10 +66,12 @@ export default {
|
||||||
|
|
||||||
render() {
|
render() {
|
||||||
const { type, loading, buttonProps } = this;
|
const { type, loading, buttonProps } = this;
|
||||||
return (
|
const props = {
|
||||||
<Button type={type} onClick={this.onClick} loading={loading} {...buttonProps}>
|
type,
|
||||||
{getSlot(this)}
|
onClick: this.onClick,
|
||||||
</Button>
|
loading,
|
||||||
);
|
...buttonProps,
|
||||||
|
};
|
||||||
|
return <Button {...props}>{getSlot(this)}</Button>;
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
|
@ -82,13 +82,13 @@ export interface ModalOptions {
|
||||||
* The ok button props
|
* The ok button props
|
||||||
* @type object
|
* @type object
|
||||||
*/
|
*/
|
||||||
okButtonProps?: Button;
|
okButtonProps?: Button.$props;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The cancel button props
|
* The cancel button props
|
||||||
* @type object
|
* @type object
|
||||||
*/
|
*/
|
||||||
cancelButtonProps?: Button;
|
cancelButtonProps?: Button.$props;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Title
|
* Title
|
||||||
|
@ -259,13 +259,13 @@ export declare class Modal extends AntdComponent {
|
||||||
* The ok button props, follow jsx rules
|
* The ok button props, follow jsx rules
|
||||||
* @type object
|
* @type object
|
||||||
*/
|
*/
|
||||||
okButtonProps?: { props: Button; on: {} };
|
okButtonProps?: Button.$props;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The cancel button props, follow jsx rules
|
* The cancel button props, follow jsx rules
|
||||||
* @type object
|
* @type object
|
||||||
*/
|
*/
|
||||||
cancelButtonProps?: { props: Button; on: {} };
|
cancelButtonProps?: Button.$props;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The modal dialog's title
|
* The modal dialog's title
|
||||||
|
|
Loading…
Reference in New Issue