|
@@ -71,7 +71,7 @@ export default {
|
|
return {
|
|
return {
|
|
form: {},
|
|
form: {},
|
|
rules: {},
|
|
rules: {},
|
|
- loading: false,
|
|
|
|
|
|
+ loading: true,
|
|
};
|
|
};
|
|
},
|
|
},
|
|
created() {
|
|
created() {
|
|
@@ -81,6 +81,7 @@ export default {
|
|
...news(['create', 'fetch', 'update']),
|
|
...news(['create', 'fetch', 'update']),
|
|
async search() {
|
|
async search() {
|
|
if (this.id) {
|
|
if (this.id) {
|
|
|
|
+ this.$set(this, `loading`, false);
|
|
let res = await this.fetch(this.id);
|
|
let res = await this.fetch(this.id);
|
|
if (this.$checkRes(res)) {
|
|
if (this.$checkRes(res)) {
|
|
this.$set(this, `form`, res.data);
|
|
this.$set(this, `form`, res.data);
|