更新crud快照

This commit is contained in:
zhangxulong 2023-05-31 18:48:51 +08:00
parent 7ef06cf19b
commit f4f58126cf
3 changed files with 8 additions and 42 deletions

View File

@ -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])} />

View File

@ -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 (

View File

@ -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