mirror of
https://github.com/crawlab-team/crawlab.git
synced 2026-01-24 17:41:03 +01:00
当stage被删除时,重置next_stage被设置为该stage的field
This commit is contained in:
@@ -607,6 +607,14 @@ export default {
|
||||
if (Object.keys(stages).length === 0) {
|
||||
this.onAddStage()
|
||||
}
|
||||
// 重置next_stage被设置为该stage的field
|
||||
Object.values(this.spiderForm.config.stages).forEach(_stage => {
|
||||
_stage.fields.forEach(field => {
|
||||
if (field.next_stage === stage.name) {
|
||||
this.$set(field, 'next_stage', '')
|
||||
}
|
||||
})
|
||||
})
|
||||
},
|
||||
onAddStage (stage) {
|
||||
const stages = JSON.parse(JSON.stringify(this.spiderForm.config.stages))
|
||||
|
||||
Reference in New Issue
Block a user