|
@@ -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() {
|