perf: 支持下载聊天引用的文件

This commit is contained in:
kuaifan 2025-02-07 04:55:58 +09:00
parent 34cfd1e344
commit b6a4e6b4de
2 changed files with 14 additions and 1 deletions

View File

@ -3416,6 +3416,10 @@ export default {
this.$store.dispatch("filePos", value);
break;
case 'filedown':
this.$store.dispatch('downUrl', $A.apiUrl(`file/content?id=${value.shakeId}&down=yes`))
break;
case 'link':
this.copyText(value);
break;
@ -4047,6 +4051,15 @@ export default {
fileId: null,
shakeId: data.id
},
}, {
type: 'filedown',
icon: '',
label: '下载',
value: {
folderId: data.pid,
fileId: null,
shakeId: data.id
},
})
},

View File

@ -1779,7 +1779,7 @@ export default {
this.$nextTick(_ => {
const dom = $A(this.$el).find(`[data-id="${fileId}"]`)
if (dom.length > 0) {
$A.scrollIntoAndShake(dom)
$A.scrollIntoAndShake(dom[0])
}
})
},