Parcourir la source

🎨 优化细节

快乐的梦鱼 il y a 2 semaines
Parent
commit
4a7f52883d
1 fichiers modifiés avec 6 ajouts et 2 suppressions
  1. 6 2
      src/pages/admin.vue

+ 6 - 2
src/pages/admin.vue

@@ -219,8 +219,12 @@ onMounted(() => {
   }
 });
 
-watch(() => authStore.userId, () => {
-  listRef.value?.reload();
+watch(() => authStore.userId, (newV) => {
+  if (newV) {
+    setTimeout(() => {
+      listRef.value?.reload();
+    }, 1000);
+  }
 });
 
 const { variable: lastValueCategory } = useMemorizeVar('categoryLastSelectValue', 0);