Web:Common: fixed z-index

This commit is contained in:
Timofey Boyko 2021-09-30 18:06:00 +08:00
parent 3e4c79e981
commit bd56abaa0a
3 changed files with 4 additions and 4 deletions

View File

@ -34,7 +34,7 @@ DocumentCatalogFolderLoader.propTypes = {
id: PropTypes.string,
className: PropTypes.string,
style: PropTypes.object,
showText: PropTypes.func,
showText: PropTypes.bool,
};
DocumentCatalogFolderLoader.defaultProps = {

View File

@ -121,7 +121,7 @@ class PageLayout extends React.Component {
) {
this.backdropClick();
}
console.log('rerender');
if (isMobile && !this.props.userShowText && this.props.showText) this.props.setShowText(false);
if (isMobileUtils() && !isMobile && !this.props.userShowText && this.props.showText)
this.props.setShowText(false);

View File

@ -3,7 +3,7 @@ import styled, { css } from 'styled-components';
import PropTypes from 'prop-types';
import { Resizable } from 're-resizable';
import { isMobile, isMobileOnly, isTablet } from 'react-device-detect';
import { mobile, tablet } from '@appserver/components/utils/device';
import { mobile, tablet, isMobile as isMobileUtils } from '@appserver/components/utils/device';
const StyledCatalog = styled.div`
position: relative;
@ -12,7 +12,7 @@ const StyledCatalog = styled.div`
}
top: ${(props) => isMobileOnly && (props.showText ? '64px' : '56px')} !important;
z-index: ${(props) => (props.showText ? '202' : '100')};
z-index: ${(props) => (props.showText && (isMobileOnly || isMobileUtils()) ? '201' : '100')};
.resizable-block {
display: flex;
flex-direction: column;