mirror of
https://gitee.com/baidu/amis.git
synced 2024-11-30 02:58:05 +08:00
更新crud快照
This commit is contained in:
parent
7ef06cf19b
commit
f4f58126cf
@ -264,22 +264,6 @@ export class Modal extends React.Component<ModalProps, ModalState> {
|
||||
this.isRootClosed && !e.defaultPrevented && onHide(e);
|
||||
}
|
||||
|
||||
getZIndex() {
|
||||
let defaultIndex = 1400;
|
||||
const {classnames: cx} = this.props;
|
||||
const modals = document.querySelectorAll('.' + cx('Modal'));
|
||||
const popups = document.querySelectorAll('.' + cx('PopUp'));
|
||||
[...modals, ...popups].forEach((node: HTMLDialogElement) => {
|
||||
const style = getComputedStyle(node);
|
||||
const curIndex = parseInt(style.zIndex, 10);
|
||||
if (curIndex > defaultIndex) {
|
||||
defaultIndex = curIndex;
|
||||
}
|
||||
});
|
||||
|
||||
return defaultIndex;
|
||||
}
|
||||
|
||||
render() {
|
||||
const {
|
||||
className,
|
||||
@ -317,7 +301,6 @@ export class Modal extends React.Component<ModalProps, ModalState> {
|
||||
},
|
||||
className
|
||||
)}
|
||||
style={{zIndex: this.getZIndex()}}
|
||||
>
|
||||
{overlay ? (
|
||||
<div className={cx(`Modal-overlay`, fadeStyles[status])} />
|
||||
|
@ -71,22 +71,6 @@ export class PopUp extends React.PureComponent<PopUpPorps> {
|
||||
e.stopPropagation();
|
||||
}
|
||||
|
||||
getZIndex() {
|
||||
let defaultIndex = 3000;
|
||||
const {classnames: cx} = this.props;
|
||||
const modals = document.querySelectorAll('.' + cx('Modal'));
|
||||
const popups = document.querySelectorAll('.' + cx('PopUp'));
|
||||
[...modals, ...popups].forEach((node: HTMLDialogElement) => {
|
||||
const style = getComputedStyle(node);
|
||||
const curIndex = parseInt(style.zIndex, 10);
|
||||
if (curIndex > defaultIndex) {
|
||||
defaultIndex = curIndex;
|
||||
}
|
||||
});
|
||||
|
||||
return defaultIndex;
|
||||
}
|
||||
|
||||
render() {
|
||||
const {
|
||||
style,
|
||||
@ -109,8 +93,7 @@ export class PopUp extends React.PureComponent<PopUpPorps> {
|
||||
} = this.props;
|
||||
|
||||
const outerStyle: any = {
|
||||
...style,
|
||||
zIndex: this.getZIndex()
|
||||
...style
|
||||
};
|
||||
delete outerStyle.top;
|
||||
return (
|
||||
|
@ -1237,7 +1237,7 @@ exports[`Renderer: crud keepItemSelectionOnPageChange & maxKeepItemSelectionLeng
|
||||
<div
|
||||
class="cxd-Crud-statistics"
|
||||
>
|
||||
1/15 总共:144 项
|
||||
1/15 共:144 项
|
||||
</div>
|
||||
</div>
|
||||
<div
|
||||
@ -2002,7 +2002,7 @@ exports[`Renderer: crud sortable & orderBy & orderDir & orderField 1`] = `
|
||||
<div
|
||||
class="cxd-Crud-statistics"
|
||||
>
|
||||
1/15 总共:144 项
|
||||
1/15 共:144 项
|
||||
</div>
|
||||
</div>
|
||||
<div
|
||||
@ -2197,7 +2197,7 @@ exports[`Renderer:crud basic interval headerToolbar footerToolbar 1`] = `
|
||||
<div
|
||||
class="cxd-Crud-statistics"
|
||||
>
|
||||
1/72 总共:144 项
|
||||
1/72 共:144 项
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@ -2694,7 +2694,7 @@ exports[`Renderer:crud basic interval headerToolbar footerToolbar 1`] = `
|
||||
<div
|
||||
class="cxd-Crud-statistics"
|
||||
>
|
||||
1/72 总共:144 项
|
||||
1/72 共:144 项
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@ -3832,7 +3832,7 @@ exports[`Renderer:crud cards 1`] = `
|
||||
<div
|
||||
class="cxd-Crud-statistics"
|
||||
>
|
||||
1/24 总共:144 项
|
||||
1/24 共:144 项
|
||||
</div>
|
||||
</div>
|
||||
<div
|
||||
@ -4235,7 +4235,7 @@ exports[`Renderer:crud list 1`] = `
|
||||
<div
|
||||
class="cxd-Crud-statistics"
|
||||
>
|
||||
1/15 总共:144 项
|
||||
1/15 共:144 项
|
||||
</div>
|
||||
</div>
|
||||
<div
|
||||
@ -4668,7 +4668,7 @@ exports[`Renderer:crud source & alwaysShowPagination 1`] = `
|
||||
<div
|
||||
class="cxd-Crud-statistics"
|
||||
>
|
||||
1/1 总共:0 项
|
||||
1/1 共:0 项
|
||||
</div>
|
||||
</div>
|
||||
<div
|
||||
|
Loading…
Reference in New Issue
Block a user