fix: TransactionItem小头像+预算页双显+账单静默刷新
TransactionItem: - meta 区域改为 view+flex 布局,小头像作为独立元素渲染 - creator-tag 容器包裹头像+昵称,小程序端 image 不嵌套在 text 内 预算页: - 群组模式顶部显示概览行(群组预算 | 我的预算) - 下方显示「设置我的预算」卡片,编辑作用于个人预算 - 个人模式保持原样 账单页: - loadTx 添加 silent 参数,静默刷新时不清空列表 - onShow 调用 loadTx(true, true) 避免骨架屏闪烁
This commit is contained in:
@@ -17,12 +17,14 @@
|
||||
/>
|
||||
<view class="info">
|
||||
<text class="name">{{ item.note || item.category_name || '未分类' }}</text>
|
||||
<text class="meta">
|
||||
<image v-if="isOtherCreator && creatorAvatarUrl" :src="creatorAvatarUrl" class="creator-mini-avatar" mode="aspectFill" />
|
||||
<text v-else-if="isOtherCreator" class="creator-mini-initial">{{ item.creator_nickname?.[0] }}</text>
|
||||
<text v-if="isOtherCreator" class="creator-name">{{ item.creator_nickname }} · </text>
|
||||
{{ item.category_name || '未分类' }}{{ hideDate ? '' : ' · ' + formatDate(item.date) }}
|
||||
</text>
|
||||
<view class="meta">
|
||||
<view v-if="isOtherCreator" class="creator-tag">
|
||||
<image v-if="creatorAvatarUrl" :src="creatorAvatarUrl" class="creator-mini-avatar" mode="aspectFill" />
|
||||
<text v-else class="creator-mini-initial">{{ item.creator_nickname?.[0] }}</text>
|
||||
<text class="creator-name">{{ item.creator_nickname }}</text>
|
||||
</view>
|
||||
<text>{{ (isOtherCreator ? ' · ' : '') + (item.category_name || '未分类') }}{{ hideDate ? '' : ' · ' + formatDate(item.date) }}</text>
|
||||
</view>
|
||||
</view>
|
||||
<text class="amount" :class="item.type">{{ item.type === 'expense' ? '-' : '+' }}{{ formatAmount(item.amount) }}</text>
|
||||
</view>
|
||||
@@ -148,16 +150,22 @@ function onTouchEnd() {
|
||||
}
|
||||
}
|
||||
|
||||
.creator-tag {
|
||||
margin-right: 4rpx;
|
||||
display: inline;
|
||||
}
|
||||
|
||||
.creator-mini-avatar {
|
||||
width: 28rpx;
|
||||
height: 28rpx;
|
||||
border-radius: 50%;
|
||||
vertical-align: middle;
|
||||
margin-right: 4rpx;
|
||||
position: relative;
|
||||
top: 4rpx;
|
||||
}
|
||||
|
||||
.creator-mini-initial {
|
||||
display: inline-flex;
|
||||
display: flex;
|
||||
width: 28rpx;
|
||||
height: 28rpx;
|
||||
border-radius: 50%;
|
||||
@@ -166,8 +174,7 @@ function onTouchEnd() {
|
||||
color: #FF8C69;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
vertical-align: middle;
|
||||
margin-right: 4rpx;
|
||||
flex-shrink: 0;
|
||||
}
|
||||
|
||||
.info {
|
||||
|
||||
Reference in New Issue
Block a user