文件传输助手

This commit is contained in:
2026-09-23 17:54:51 +08:00
parent 08d8231671
commit 201d0086a4
5 changed files with 120 additions and 10 deletions
+6 -2
View File
@@ -35,7 +35,8 @@
>
<view v-if="selecting" class="ck" :class="{ on: isPicked(m) }" />
<view v-if="!m.mine" class="av" @click.stop="openSender(m)">
<image v-if="avatarOf(m)" :src="avatarOf(m)" mode="aspectFill" />
<fy-file-mark v-if="isFiles" />
<image v-else-if="avatarOf(m)" :src="avatarOf(m)" mode="aspectFill" />
<text v-else>{{ initialOf(m) }}</text>
</view>
<view class="col" :class="{ mine: m.mine }">
@@ -155,6 +156,7 @@
<script>
import FyHeader from '../../components/fy-header.vue'
import FyFileMark from '../../components/fy-file-mark.vue'
import { store, previewOf } from '../../utils/store.js'
import { fmtTime, toast } from '../../utils/format.js'
import { uploadLocal, fileTicket, openFile } from '../../utils/files.js'
@@ -163,7 +165,7 @@ import { mobileUrl } from '../../utils/nav.js'
const EMOS = ['😀','😁','😂','😅','😊','😍','😘','😜','🤗','🤔','🙄','😴','😭','😡','👍','👎','👌','🙏','👏','💪','🔥','⭐','🎉','❤️','💕','✅','❌','💯','🤝','👀']
export default {
components: { FyHeader },
components: { FyHeader, FyFileMark },
data() {
return {
sid: '',
@@ -174,6 +176,7 @@ export default {
title: '聊天',
isGroup: false,
isWork: false,
isFiles: false,
peerId: '',
myAvatar: '',
myInitial: '我',
@@ -289,6 +292,7 @@ export default {
this.title = (c && c.name) || '聊天'
this.isGroup = !!(c && c.type === 'group')
this.isWork = !!(c && c.type === 'work')
this.isFiles = !!(c && c.type === 'files')
this.peerId = (c && c.peerId) || ''
this.memberCount = c && c.memberIds ? c.memberIds.length : 0
this.myAvatar = (store.me && store.me.avatar) || ''