mirror of
https://gitee.com/baidu/amis.git
synced 2024-11-30 02:58:05 +08:00
getModalContainer 改成回调
This commit is contained in:
parent
b6f48e70c9
commit
8a79a82283
@ -223,7 +223,7 @@ export class ActionRenderer extends React.Component<
|
||||
onAction={this.handleAction}
|
||||
isCurrentUrl={this.isCurrentAction}
|
||||
tooltipContainer={
|
||||
env.getModalContainer ? env.getModalContainer() : undefined
|
||||
env.getModalContainer ? env.getModalContainer : undefined
|
||||
}
|
||||
/>
|
||||
);
|
||||
|
@ -707,7 +707,7 @@ export default class Cards extends React.Component<GridProps, object> {
|
||||
key="dragging-toggle"
|
||||
tooltip="对卡片进行排序操作"
|
||||
tooltipContainer={
|
||||
env && env.getModalContainer ? env.getModalContainer() : undefined
|
||||
env && env.getModalContainer ? env.getModalContainer : undefined
|
||||
}
|
||||
size="sm"
|
||||
active={store.dragging}
|
||||
|
@ -400,7 +400,7 @@ export default class Dialog extends React.Component<DialogProps, DialogState> {
|
||||
onEntered={this.handleEntered}
|
||||
onExited={this.handleExited}
|
||||
container={
|
||||
env && env.getModalContainer ? env.getModalContainer() : undefined
|
||||
env && env.getModalContainer ? env.getModalContainer : undefined
|
||||
}
|
||||
enforceFocus={false}
|
||||
disabled={store.loading}
|
||||
|
@ -39,6 +39,7 @@ export interface DrawerProps extends RendererProps {
|
||||
resizable?: boolean;
|
||||
overlay?: boolean;
|
||||
closeOnOutside?: boolean;
|
||||
drawerContainer?: () => HTMLElement;
|
||||
}
|
||||
|
||||
export default class Drawer extends React.Component<DrawerProps, object> {
|
||||
@ -433,7 +434,8 @@ export default class Drawer extends React.Component<DrawerProps, object> {
|
||||
overlay,
|
||||
closeOnOutside,
|
||||
classPrefix: ns,
|
||||
classnames: cx
|
||||
classnames: cx,
|
||||
drawerContainer
|
||||
} = this.props;
|
||||
|
||||
const Container = wrapperComponent || DrawerContainer;
|
||||
@ -454,7 +456,11 @@ export default class Drawer extends React.Component<DrawerProps, object> {
|
||||
!store.drawerOpen && !store.dialogOpen && closeOnOutside
|
||||
}
|
||||
container={
|
||||
env && env.getModalContainer ? env.getModalContainer() : undefined
|
||||
drawerContainer
|
||||
? drawerContainer
|
||||
: env && env.getModalContainer
|
||||
? env.getModalContainer
|
||||
: undefined
|
||||
}
|
||||
>
|
||||
<div className={cx('Drawer-header')}>
|
||||
|
@ -284,7 +284,7 @@ export class FormItemWrap extends React.Component<FormItemProps> {
|
||||
className: cx(`Form-labelRemark`),
|
||||
container:
|
||||
env && env.getModalContainer
|
||||
? env.getModalContainer()
|
||||
? env.getModalContainer
|
||||
: undefined
|
||||
})
|
||||
: null}
|
||||
@ -313,7 +313,7 @@ export class FormItemWrap extends React.Component<FormItemProps> {
|
||||
className: cx(`Form-remark`),
|
||||
container:
|
||||
env && env.getModalContainer
|
||||
? env.getModalContainer()
|
||||
? env.getModalContainer
|
||||
: undefined
|
||||
})
|
||||
: null}
|
||||
@ -386,7 +386,7 @@ export class FormItemWrap extends React.Component<FormItemProps> {
|
||||
className: cx(`Form-lableRemark`),
|
||||
container:
|
||||
env && env.getModalContainer
|
||||
? env.getModalContainer()
|
||||
? env.getModalContainer
|
||||
: undefined
|
||||
})
|
||||
: null}
|
||||
@ -408,9 +408,7 @@ export class FormItemWrap extends React.Component<FormItemProps> {
|
||||
className: cx(`Form-remark`),
|
||||
tooltip: remark,
|
||||
container:
|
||||
env && env.getModalContainer
|
||||
? env.getModalContainer()
|
||||
: undefined
|
||||
env && env.getModalContainer ? env.getModalContainer : undefined
|
||||
})
|
||||
: null}
|
||||
|
||||
@ -480,7 +478,7 @@ export class FormItemWrap extends React.Component<FormItemProps> {
|
||||
className: cx(`Form-lableRemark`),
|
||||
container:
|
||||
env && env.getModalContainer
|
||||
? env.getModalContainer()
|
||||
? env.getModalContainer
|
||||
: undefined
|
||||
})
|
||||
: null}
|
||||
@ -504,7 +502,7 @@ export class FormItemWrap extends React.Component<FormItemProps> {
|
||||
tooltip: remark,
|
||||
container:
|
||||
env && env.getModalContainer
|
||||
? env.getModalContainer()
|
||||
? env.getModalContainer
|
||||
: undefined
|
||||
})
|
||||
: null}
|
||||
@ -578,7 +576,7 @@ export class FormItemWrap extends React.Component<FormItemProps> {
|
||||
className: cx(`Form-lableRemark`),
|
||||
container:
|
||||
env && env.getModalContainer
|
||||
? env.getModalContainer()
|
||||
? env.getModalContainer
|
||||
: undefined
|
||||
})
|
||||
: null}
|
||||
@ -601,7 +599,7 @@ export class FormItemWrap extends React.Component<FormItemProps> {
|
||||
tooltip: remark,
|
||||
container:
|
||||
env && env.getModalContainer
|
||||
? env.getModalContainer()
|
||||
? env.getModalContainer
|
||||
: undefined
|
||||
})
|
||||
: null}
|
||||
|
@ -428,7 +428,7 @@ export default class PickerControl extends React.PureComponent<
|
||||
// classPrefix={ns}
|
||||
// className={`${ns}Picker-pickBtn`}
|
||||
// tooltip="点击选择"
|
||||
// tooltipContainer={env && env.getModalContainer ? env.getModalContainer() : undefined}
|
||||
// tooltipContainer={env && env.getModalContainer ? env.getModalContainer : undefined}
|
||||
// level="info"
|
||||
// size="sm"
|
||||
// disabled={disabled}
|
||||
|
@ -341,7 +341,7 @@ export default class FormTable extends React.Component<TableProps, TableState> {
|
||||
tooltip="新增一行"
|
||||
tooltipContainer={
|
||||
env && env.getModalContainer
|
||||
? env.getModalContainer()
|
||||
? env.getModalContainer
|
||||
: undefined
|
||||
}
|
||||
onClick={this.addItem.bind(this, rowIndex, undefined)}
|
||||
@ -392,7 +392,7 @@ export default class FormTable extends React.Component<TableProps, TableState> {
|
||||
tooltip="编辑当前行"
|
||||
tooltipContainer={
|
||||
env && env.getModalContainer
|
||||
? env.getModalContainer()
|
||||
? env.getModalContainer
|
||||
: undefined
|
||||
}
|
||||
onClick={() => this.startEdit(rowIndex)}
|
||||
@ -418,7 +418,7 @@ export default class FormTable extends React.Component<TableProps, TableState> {
|
||||
tooltip="保存"
|
||||
tooltipContainer={
|
||||
env && env.getModalContainer
|
||||
? env.getModalContainer()
|
||||
? env.getModalContainer
|
||||
: undefined
|
||||
}
|
||||
onClick={this.confirmEdit}
|
||||
@ -444,7 +444,7 @@ export default class FormTable extends React.Component<TableProps, TableState> {
|
||||
tooltip="取消"
|
||||
tooltipContainer={
|
||||
env && env.getModalContainer
|
||||
? env.getModalContainer()
|
||||
? env.getModalContainer
|
||||
: undefined
|
||||
}
|
||||
onClick={this.cancelEdit}
|
||||
@ -480,7 +480,7 @@ export default class FormTable extends React.Component<TableProps, TableState> {
|
||||
tooltip="删除当前行"
|
||||
tooltipContainer={
|
||||
env && env.getModalContainer
|
||||
? env.getModalContainer()
|
||||
? env.getModalContainer
|
||||
: undefined
|
||||
}
|
||||
onClick={this.removeItem.bind(this, rowIndex)}
|
||||
|
@ -689,7 +689,7 @@ export default class List extends React.Component<ListProps, object> {
|
||||
key="dragging-toggle"
|
||||
tooltip="对列表进行排序操作"
|
||||
tooltipContainer={
|
||||
env && env.getModalContainer ? env.getModalContainer() : undefined
|
||||
env && env.getModalContainer ? env.getModalContainer : undefined
|
||||
}
|
||||
size="sm"
|
||||
active={store.dragging}
|
||||
|
@ -377,7 +377,7 @@ export default class Page extends React.Component<PageProps> {
|
||||
tooltip: remark,
|
||||
container:
|
||||
env && env.getModalContainer
|
||||
? env.getModalContainer()
|
||||
? env.getModalContainer
|
||||
: undefined
|
||||
})
|
||||
: null}
|
||||
|
@ -1064,7 +1064,7 @@ export default class Table extends React.Component<TableProps, object> {
|
||||
tooltip: column.remark,
|
||||
container:
|
||||
env && env.getModalContainer
|
||||
? env.getModalContainer()
|
||||
? env.getModalContainer
|
||||
: undefined
|
||||
})
|
||||
: null}
|
||||
@ -1384,7 +1384,7 @@ export default class Table extends React.Component<TableProps, object> {
|
||||
key="dragging-toggle"
|
||||
tooltip="点击开始排序"
|
||||
tooltipContainer={
|
||||
env && env.getModalContainer ? env.getModalContainer() : undefined
|
||||
env && env.getModalContainer ? env.getModalContainer : undefined
|
||||
}
|
||||
size="sm"
|
||||
active={store.dragging}
|
||||
|
Loading…
Reference in New Issue
Block a user