fangmingyue 2 years ago
parent
commit
a1e13bc136
3 changed files with 14 additions and 2 deletions
  1. 1
    1
      src/layouts/hooks/useShow.js
  2. 1
    1
      src/layouts/index.jsx
  3. 12
    0
      src/pages/user/list/index.jsx

+ 1
- 1
src/layouts/hooks/useShow.js View File

15
     if (show) {
15
     if (show) {
16
       fnRef.current();
16
       fnRef.current();
17
     }
17
     }
18
-  // eslint-disable-next-line react-hooks/exhaustive-deps
18
+    // eslint-disable-next-line react-hooks/exhaustive-deps
19
   }, [show, ...deps]);
19
   }, [show, ...deps]);
20
 }
20
 }

+ 1
- 1
src/layouts/index.jsx View File

55
   })
55
   })
56
 
56
 
57
   return (
57
   return (
58
-    <PageContext.Provider value={{show: pageShow}}>
58
+    <PageContext.Provider value={{ show: pageShow }}>
59
       <View className={laySty['page-wrapper']}>
59
       <View className={laySty['page-wrapper']}>
60
         <Notify id="vanNotify" />
60
         <Notify id="vanNotify" />
61
         <Dialog id="vanDialog" />
61
         <Dialog id="vanDialog" />

+ 12
- 0
src/pages/user/list/index.jsx View File

33
             listRef.current.refresh();
33
             listRef.current.refresh();
34
           })
34
           })
35
           .catch(() => {
35
           .catch(() => {
36
+            Dialog.close();
36
             setLoading(false);
37
             setLoading(false);
37
           });
38
           });
38
       }
39
       }
39
     });
40
     });
40
   };
41
   };
41
 
42
 
43
+
44
+
42
   const onShow = () => {
45
   const onShow = () => {
43
     listRef.current.refresh();
46
     listRef.current.refresh();
44
   }
47
   }
45
 
48
 
49
+  console.log('loading', loading);
46
   return (
50
   return (
47
     <Page loading={loading} onShow={onShow}>
51
     <Page loading={loading} onShow={onShow}>
48
       <view className={styles["user-warpper"]}>
52
       <view className={styles["user-warpper"]}>
64
                     }
68
                     }
65
                   </View>
69
                   </View>
66
                   <View>
70
                   <View>
71
+                    <Button
72
+                      plain
73
+                      type="default"
74
+                      size="small"
75
+                      color="var(--main-bg-color)"
76
+                    >
77
+                      修改
78
+                    </Button>
67
                     <Button
79
                     <Button
68
                       plain
80
                       plain
69
                       type="danger"
81
                       type="danger"