|
@@ -14,6 +14,7 @@ const sid1 = Math.random().toString(36).substring(2, 8);
|
14
|
14
|
export default (props) => {
|
15
|
15
|
const [loading, setLoading] = React.useState(false);
|
16
|
16
|
const listRef = React.useRef();
|
|
17
|
+ const dialogId = React.useMemo(() => `dialog-${Math.random().toString(36).substring(2, 7)}`, []);
|
17
|
18
|
|
18
|
19
|
const onAdd = () => {
|
19
|
20
|
Taro.navigateTo({
|
|
@@ -25,6 +26,7 @@ export default (props) => {
|
25
|
26
|
Dialog.confirm({
|
26
|
27
|
width: '70vw',
|
27
|
28
|
title: "确认删除用户?",
|
|
29
|
+ selector: dialogId,
|
28
|
30
|
}).then((action) => {
|
29
|
31
|
if (action === "confirm") {
|
30
|
32
|
setLoading(true);
|
|
@@ -49,9 +51,10 @@ export default (props) => {
|
49
|
51
|
listRef.current.refresh();
|
50
|
52
|
}
|
51
|
53
|
|
52
|
|
- console.log('loading', loading);
|
|
54
|
+ // console.log('loading', loading);
|
53
|
55
|
return (
|
54
|
56
|
<Page loading={loading} onShow={onShow}>
|
|
57
|
+ <Dialog id={dialogId} />
|
55
|
58
|
<view className={styles["user-warpper"]}>
|
56
|
59
|
<view className={styles["user-warpper-list"]}>
|
57
|
60
|
<PowerList
|