Explorar o código

feat:优化用户详情界面,增加 loading 效果

YunaiV hai 4 meses
pai
achega
ce3cc228e5
Modificáronse 1 ficheiros con 6 adicións e 1 borrados
  1. 6 1
      src/pages-system/user/detail/index.vue

+ 6 - 1
src/pages-system/user/detail/index.vue

@@ -125,7 +125,12 @@ async function getDetail() {
   if (!props.id) {
     return
   }
-  formData.value = await getUser(Number(props.id))
+  try {
+    toast.loading('加载中...')
+    formData.value = await getUser(Number(props.id))
+  } finally {
+    toast.close()
+  }
 }
 
 /** 编辑用户 */