xujunjie 1 год назад
Родитель
Сommit
f03f7badd6
2 измененных файлов с 7 добавлено и 2 удалено
  1. 6 1
      src/components/PageContent/index.js
  2. 1 1
      src/pages/Menu/index.js

+ 6 - 1
src/components/PageContent/index.js

@@ -1,13 +1,18 @@
+import { UnityAction } from '@/utils/utils';
 import { CloseOutlined } from '@ant-design/icons';
 import styles from './index.less';
 
 export default (props) => {
   const { children, style, closeable = true } = props;
 
+  const handleClose = () => {
+    UnityAction.sendMsg('closePage');
+  };
+
   return (
     <div className={styles.page} style={style}>
       {closeable && (
-          <CloseOutlined className={styles.close} />
+        <CloseOutlined onClick={handleClose} className={styles.close} />
       )}
 
       {children}

+ 1 - 1
src/pages/Menu/index.js

@@ -29,7 +29,7 @@ const menuList = [
     path: (projectId) => `/task-manage/${projectId}`,
   },
   {
-    name: '智能控',
+    name: '智能控',
     path: (projectId) => `/hardware-controller/${projectId}`,
   },
   {