|
@@ -273,6 +273,8 @@ const listData = ref({
|
|
|
});
|
|
|
const excessiveData = ref({});
|
|
|
const dialogSelection = ref({});
|
|
|
+const timeout = ref(null)
|
|
|
+
|
|
|
|
|
|
// 按钮触发的事件: row 为当前点击的行数据, item 为当前点击的按钮
|
|
|
function longPress(row, item) {
|
|
@@ -511,14 +513,29 @@ function dialogCloseBefo(val) {
|
|
|
return true
|
|
|
}
|
|
|
|
|
|
+function chuliReloadListData(data) {
|
|
|
+ clearTimeout(timeout.value);
|
|
|
+ timeout.value = setTimeout(() => {
|
|
|
+ reloadListData(data)
|
|
|
+ }, 100);
|
|
|
+}
|
|
|
+
|
|
|
+function chuliOnRefresh(data) {
|
|
|
+ clearTimeout(timeout.value);
|
|
|
+ timeout.value = setTimeout(() => {
|
|
|
+ onRefresh(true)
|
|
|
+ }, 100);
|
|
|
+}
|
|
|
+
|
|
|
useLifecycle({
|
|
|
load: () => {
|
|
|
+ chuliOnRefresh(true)
|
|
|
router.on('moduleListDetailParameter', (data) => {
|
|
|
- reloadListData(data)
|
|
|
+ chuliReloadListData(data)
|
|
|
})
|
|
|
|
|
|
router.eventOn('moduleListRefreshData', (data) => {
|
|
|
- onRefresh(true)
|
|
|
+ chuliOnRefresh(true)
|
|
|
})
|
|
|
}
|
|
|
});
|