update 增加用户个人信息管理的功能
This commit is contained in:
@@ -17,13 +17,27 @@ export default {
|
||||
}
|
||||
},
|
||||
|
||||
created() {
|
||||
watch: {
|
||||
async id() {
|
||||
this.src = await this.getSrc()
|
||||
}
|
||||
},
|
||||
|
||||
async created() {
|
||||
if (this.id) {
|
||||
this.$api.sysFileInfoPreview({ id: this.id }).then(async ({ data }) => {
|
||||
this.src = await this.getSrc()
|
||||
}
|
||||
},
|
||||
|
||||
methods: {
|
||||
|
||||
getSrc() {
|
||||
return this.$api.sysFileInfoPreview({ id: this.id }).then(async ({ data }) => {
|
||||
const base64 = await ArrayBufferToBase64(data)
|
||||
this.src = base64
|
||||
return base64
|
||||
})
|
||||
}
|
||||
|
||||
},
|
||||
|
||||
render() {
|
||||
|
||||
Reference in New Issue
Block a user