报错处理
This commit is contained in:
parent
585f777832
commit
91ab92af3f
3 changed files with 29 additions and 16 deletions
|
@ -17,7 +17,16 @@ async function start() {
|
|||
current_step.value = i + 1
|
||||
current_state.value = 'process'
|
||||
for (const cmd of step.command) {
|
||||
await pywebview.api.run(cmd, step.cwd)
|
||||
if ((await pywebview.api.run(cmd, step.cwd)) == 'failed') {
|
||||
current_state.value = 'error'
|
||||
running.value = false
|
||||
notification['error']({
|
||||
content: '错误',
|
||||
meta: '命令运行失败',
|
||||
duration: 3000
|
||||
})
|
||||
return
|
||||
}
|
||||
}
|
||||
}
|
||||
current_state.value = 'finish'
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue