加入Spiderfile模版

This commit is contained in:
marvzhang
2019-12-03 13:37:41 +08:00
parent 9e849695d1
commit 98cbccb81e
13 changed files with 177 additions and 52 deletions

View File

@@ -125,9 +125,15 @@ export default {
const list = JSON.parse(JSON.stringify(this.list))
for (let i = 0; i < list.length; i++) {
if (row.name === list[i].name) {
list.splice(i, 0, 1)
list.splice(i, 1)
}
}
if (list.length === 0) {
list.push({
name: `VARIABLE_NAME_${Math.floor(new Date().getTime())}`,
value: `VARIABLE_VALUE_${Math.floor(new Date().getTime())}`
})
}
this.$store.commit('spider/SET_SPIDER_FORM_CONFIG_SETTINGS', list)
},
onAddField (row) {