flat: 修改传说中的Attachment

This commit is contained in:
Apcallover
2024-04-22 15:59:25 +08:00
parent d71c5171f4
commit ab94467da4
2 changed files with 7 additions and 18 deletions

View File

@@ -39,15 +39,10 @@
},
computed: {
ImgUrl(val) {
if (this.value) {
const url = this.value.split('|')
return [{
name: 'img',
url: url[url.length - 1]
}]
} else {
return []
}
return this.value ? [{
name: 'img.jpg',
url: this.value
}] : []
}
},
methods: {
@@ -57,13 +52,7 @@
name
}) {
// this.$emit("input", file);
uploadFile(file).then((fileObj) => {
const {
id,
path
} = fileObj.data
const url = `${id}|${path}$`
console.log(url)
uploadFile(file).then((url) => {
this.$emit("input", url);
})
},