From bda4243d007a9791bf1df0e14d2053cf92a9eb94 Mon Sep 17 00:00:00 2001
From: yz <yz_0812@outlook.com>
Date: 星期五, 19 三月 2021 02:11:58 +0800
Subject: [PATCH] 添加首页延时加载

---
 src/views/dashboard/ygUser.vue |   32 +++++++++++++++++---------------
 1 files changed, 17 insertions(+), 15 deletions(-)

diff --git a/src/views/dashboard/ygUser.vue b/src/views/dashboard/ygUser.vue
index e860193..5f859e8 100644
--- a/src/views/dashboard/ygUser.vue
+++ b/src/views/dashboard/ygUser.vue
@@ -126,21 +126,23 @@
     }
   },
   mounted() {
-    this.getDicts('EDUCATION').then(response => {
-      this.educationOptions = response.data
-    })
-    this.getDicts('NATIVEPLACE').then(response => {
-      this.nativePlaceOptions = response.data
-    })
-    this.getDicts('sex').then(response => {
-      this.sexOptions = response.data
-    })
-    this.getDicts('empType').then(response => {
-      this.empTypeOptions = response.data
-    })
-    this.getDicts('NATION').then(response => {
-      this.nationOptions = response.data
-    })
+    setTimeout(() => {
+      this.getDicts('EDUCATION').then(response => {
+        this.educationOptions = response.data
+      })
+      this.getDicts('NATIVEPLACE').then(response => {
+        this.nativePlaceOptions = response.data
+      })
+      this.getDicts('sex').then(response => {
+        this.sexOptions = response.data
+      })
+      this.getDicts('empType').then(response => {
+        this.empTypeOptions = response.data
+      })
+      this.getDicts('NATION').then(response => {
+        this.nationOptions = response.data
+      })
+    }, 1000)
   },
   methods: {
     educationFormat(row, column) {

--
Gitblit v1.8.0