liuyu il y a 4 ans
Parent
commit
7c25069dd2
1 fichiers modifiés avec 3 ajouts et 0 suppressions
  1. 3 0
      src/views/contact/index.vue

+ 3 - 0
src/views/contact/index.vue

@@ -50,6 +50,7 @@ export default {
     return {
       form: {},
       rules: {},
+      loading: true,
     };
   },
   created() {
@@ -58,11 +59,13 @@ export default {
   methods: {
     ...contact(['query', 'update', 'create']),
     async searchInfo({ skip = 0, limit = 1, ...info } = {}) {
+      this.$set(this, `loading`, false);
       let res = await this.query({ skip, limit, ...info });
       if (this.$checkRes(res)) {
         if (res.data.length > 0) {
           this.$set(this, `form`, res.data[0]);
         }
+        this.$set(this, `loading`, true);
       }
     },
     async submitForm() {