低代码前端完成

This commit is contained in:
aixianling
2022-06-22 11:20:42 +08:00
parent 17e2d3b12a
commit 03bd52194b
3 changed files with 39 additions and 3 deletions

View File

@@ -23,6 +23,32 @@ export default {
return hash == "#add" ? AcAdd : AcList
}
},
provide() {
return {
top: this
}
},
methods: {
handleGetCode(id) {
id && this.instance.post("/node/aicode/getCode", null, {
params: {id},
responseType: "blob"
}).then(res => {
if (res?.code == 1) {
this.$message.error(res.err)
} else {
const link = document.createElement('a')
let blob = new Blob([res], {type: 'application/zip'})
link.style.display = 'none'
link.href = URL.createObjectURL(blob)
link.setAttribute('download', row.name + '.zip')
document.body.appendChild(link)
link.click()
document.body.removeChild(link)
}
})
}
},
created() {
this.dict.load("detailType")
}