修复 sdk 用法 image 放大弹框不出现的问题
This commit is contained in:
parent
9e678ddcca
commit
19cf23c7b5
|
@ -8,6 +8,7 @@ export interface ImageGalleryProps {
|
|||
classnames: ClassNamesFn;
|
||||
classPrefix: string;
|
||||
children: React.ReactNode;
|
||||
modalContainer?: () => HTMLElement;
|
||||
}
|
||||
|
||||
export interface ImageGalleryState {
|
||||
|
@ -84,7 +85,7 @@ export class ImageGallery extends React.Component<
|
|||
}
|
||||
|
||||
render() {
|
||||
const {children, classnames: cx} = this.props;
|
||||
const {children, classnames: cx, modalContainer} = this.props;
|
||||
const {index, items} = this.state;
|
||||
|
||||
return (
|
||||
|
@ -99,6 +100,7 @@ export class ImageGallery extends React.Component<
|
|||
onHide={this.close}
|
||||
show={this.state.isOpened}
|
||||
contentClassName={cx('ImageGallery')}
|
||||
container={modalContainer}
|
||||
>
|
||||
<a
|
||||
data-tooltip="关闭"
|
||||
|
|
|
@ -384,7 +384,7 @@ export class RootRenderer extends React.Component<RootRendererProps> {
|
|||
return (
|
||||
<RootStoreContext.Provider value={rootStore}>
|
||||
<ThemeContext.Provider value={this.props.theme || 'default'}>
|
||||
<ImageGallery>
|
||||
<ImageGallery modalContainer={env.getModalContainer}>
|
||||
{
|
||||
renderChild(
|
||||
pathPrefix || '',
|
||||
|
|
Loading…
Reference in New Issue