文件传输助手

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
+5 -5
View File
@@ -17,7 +17,8 @@
@longpress="act(c)"
>
<view class="av-wrap">
<image v-if="c.avatar" class="av" :src="c.avatar" mode="aspectFill" />
<image v-if="c.avatar && c.type !== 'files'" class="av" :src="c.avatar" mode="aspectFill" />
<view v-else-if="c.type === 'files'" class="av"><fy-file-mark /></view>
<view v-else class="av txt" :class="avClass(c)">{{ avText(c) }}</view>
<text v-if="c.unread && !c.muted" class="badge abs">{{ c.unread > 99 ? '99+' : c.unread }}</text>
<text v-else-if="c.unread && c.muted" class="dotu" />
@@ -39,10 +40,11 @@
<script>
import FyHeader from '../../components/fy-header.vue'
import FyFileMark from '../../components/fy-file-mark.vue'
import { store } from '../../utils/store.js'
export default {
components: { FyHeader },
components: { FyHeader, FyFileMark },
data() {
return { rows: [], unread: 0, off: null }
},
@@ -68,13 +70,11 @@ export default {
},
avText(c) {
if (c.type === 'work') return '工'
if (c.type === 'files') return '文'
if (c.type === 'group') return '群'
return (c.name || '?').slice(0, 1)
},
avClass(c) {
if (c.type === 'work') return 'work'
if (c.type === 'files') return 'file'
return 'plain'
},
open(c) {
@@ -132,7 +132,7 @@ export default {
.item { display: flex; align-items: center; padding: 22rpx 28rpx; background: #fff; }
.item.pin { background: #F7F8FA; }
.av-wrap { position: relative; width: 92rpx; height: 92rpx; flex-shrink: 0; }
.av { width: 92rpx; height: 92rpx; border-radius: 20rpx; }
.av { width: 92rpx; height: 92rpx; border-radius: 20rpx; overflow: hidden; }
.av.txt { display: flex; align-items: center; justify-content: center; font-size: 32rpx; font-weight: 600; }
.av.work { background: #1677FF; color: #fff; }
.av.file { background: #F3F6FB; color: #4B5563; }