低代码前端完成
This commit is contained in:
@@ -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")
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user