fangmingyue 2 yıl önce
ebeveyn
işleme
a1e13bc136

+ 1
- 1
src/layouts/hooks/useShow.js Dosyayı Görüntüle

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

+ 1
- 1
src/layouts/index.jsx Dosyayı Görüntüle

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

+ 12
- 0
src/pages/user/list/index.jsx Dosyayı Görüntüle

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