shaogen1995 před 2 roky
rodič
revize
5fe8690c4a
3 změnil soubory, kde provedl 12 přidání a 11 odebrání
  1. 0 1
      src/index.tsx
  2. 1 1
      src/pages/GoodsAdd/index.tsx
  3. 11 9
      src/pages/Layout/index.tsx

+ 0 - 1
src/index.tsx

@@ -1,4 +1,3 @@
-// import 'default-passive-events';
 
 import App from "./App";
 import store from "./store/index";

+ 1 - 1
src/pages/GoodsAdd/index.tsx

@@ -343,7 +343,7 @@ function GoodsAdd({ id, closePage, upTableList, addTableList }: Props) {
               />
             </Form.Item>
 
-            <Form.Item label="简" name="description">
+            <Form.Item label="简" name="description">
               <TextArea
                 rows={3}
                 placeholder="请输入内容"

+ 11 - 9
src/pages/Layout/index.tsx

@@ -101,15 +101,17 @@ function Layout() {
 
   // 权限的数据和页面判断
   useEffect(() => {
-    authPageArr.forEach((v) => {
-      if (v.authority) {
-        listTemp.forEach((v2) => {
-          if (v.id === v2.id) v2.done = true;
-        });
-      }
-    });
-    const newList = listTemp.filter((v) => v.done);
-    setList(newList);
+    if(authPageArr&&authPageArr.length){
+      authPageArr.forEach((v) => {
+        if (v.authority) {
+          listTemp.forEach((v2) => {
+            if (v.id === v2.id) v2.done = true;
+          });
+        }
+      });
+      const newList = listTemp.filter((v) => v.done);
+      setList(newList);
+    }
   }, [authPageArr, listTemp]);
 
   const [list, setList] = useState(listTemp);