报错处理

This commit is contained in:
fofolee
2022-04-18 08:56:10 +08:00
parent 05999db5d2
commit ebd2ebddae
2 changed files with 37 additions and 30 deletions

View File

@@ -33,18 +33,7 @@ export default defineComponent({
});
return;
}
// 如果配置了后台服务则开启监听
if (this.$profile.quickFeatures.apiServer.serverStatus) {
window
.quickcommandHttpServer()
.run(
this.$profile.quickFeatures.apiServer.cmd,
this.$profile.quickFeatures.apiServer.port
);
console.log("Server Start...");
}
// 默认主题色
this.setCssVar("primary", this.$profile.primaryColor);
this.startUp();
// 进入插件
utools.onPluginEnter((enter) => {
// 暗黑模式
@@ -76,6 +65,21 @@ export default defineComponent({
this.$utools.DBPRE.CFG + "preferences"
);
},
// 随插件启动执行
startUp() {
// 如果配置了后台服务则开启监听
if (this.$profile.quickFeatures.apiServer.serverStatus) {
window
.quickcommandHttpServer()
.run(
this.$profile.quickFeatures.apiServer.cmd,
this.$profile.quickFeatures.apiServer.port
);
console.log("Server Start...");
}
// 默认主题色
this.setCssVar("primary", this.$profile.primaryColor);
},
},
});
</script>