|
@@ -1,6 +1,5 @@
|
|
|
import { UnityAction } from '@/utils/utils';
|
|
|
-import { CloseCircleFilled, LeftOutlined } from '@ant-design/icons';
|
|
|
-import { history } from '@umijs/max';
|
|
|
+import { CloseCircleFilled } from '@ant-design/icons';
|
|
|
import { ConfigProvider } from 'antd';
|
|
|
import locale from 'antd/es/locale/zh_CN';
|
|
|
import { useEffect } from 'react';
|
|
@@ -11,16 +10,16 @@ export default (props) => {
|
|
|
children,
|
|
|
style,
|
|
|
closeable = true,
|
|
|
- returnable = false,
|
|
|
tabs = false,
|
|
|
+ title = null,
|
|
|
} = props;
|
|
|
|
|
|
const handleClose = () => {
|
|
|
UnityAction.sendMsg('closePage');
|
|
|
};
|
|
|
- const handleReturn = () => {
|
|
|
- history.back();
|
|
|
- };
|
|
|
+ // const handleReturn = () => {
|
|
|
+ // history.back();
|
|
|
+ // };
|
|
|
|
|
|
useEffect(() => {
|
|
|
document.body.style.backgroundColor = 'transparent';
|
|
@@ -29,13 +28,14 @@ export default (props) => {
|
|
|
return (
|
|
|
<ConfigProvider locale={locale}>
|
|
|
<div className={styles.page} style={style}>
|
|
|
- {returnable && (
|
|
|
+ {title}
|
|
|
+ {/* {returnable && (
|
|
|
<LeftOutlined
|
|
|
onClick={handleReturn}
|
|
|
className={styles.return}
|
|
|
style={{ top: tabs ? '0.4rem' : '' }}
|
|
|
/>
|
|
|
- )}
|
|
|
+ )} */}
|
|
|
{closeable && (
|
|
|
<CloseCircleFilled
|
|
|
onClick={handleClose}
|
|
@@ -44,7 +44,7 @@ export default (props) => {
|
|
|
/>
|
|
|
)}
|
|
|
|
|
|
- {children}
|
|
|
+ <div className={styles.pageContent}>{children}</div>
|
|
|
</div>
|
|
|
</ConfigProvider>
|
|
|
);
|