Explorar el Código

🎨 优化细节

快乐的梦鱼 hace 2 semanas
padre
commit
4a7f52883d
Se han modificado 1 ficheros con 6 adiciones y 2 borrados
  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);