fix(场景自动化) 修复页面初始化时插件步骤不加载问题

This commit is contained in:
fit2-zhao 2021-09-17 15:49:25 +08:00 committed by fit2-zhao
parent 7f768a7b92
commit 1f11263068
1 changed files with 19 additions and 15 deletions

View File

@ -465,9 +465,10 @@ export default {
this.getWsProjects(); this.getWsProjects();
this.getMaintainerOptions(); this.getMaintainerOptions();
this.getApiScenario(); this.getApiScenario();
this.getPlugins();
this.initPlugins();
this.buttonData = buttons(this); this.buttonData = buttons(this);
this.getPlugins().then(() => {
this.initPlugins();
});
}, },
mounted() { mounted() {
this.$nextTick(() => { this.$nextTick(() => {
@ -528,6 +529,7 @@ export default {
} }
}, },
getPlugins() { getPlugins() {
return new Promise((resolve) => {
let url = "/plugin/list"; let url = "/plugin/list";
this.plugins = []; this.plugins = [];
this.$get(url, response => { this.$get(url, response => {
@ -543,6 +545,8 @@ export default {
} }
}) })
} }
resolve();
});
}); });
}, },
stop() { stop() {