Browse Source

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

YunaiV 4 months ago
parent
commit
ce3cc228e5
1 changed files with 6 additions and 1 deletions
  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()
+  }
 }
 
 /** 编辑用户 */