fix: S2 缺陷修复 — emoji/类型/双重请求/动画/prefers-reduced-motion
This commit is contained in:
@@ -79,8 +79,9 @@
|
||||
<text class="state-text">加载失败,下拉刷新重试</text>
|
||||
</view>
|
||||
|
||||
<view class="empty" v-if="txList.length === 0 && !loading && !loadError">
|
||||
<text class="empty-text">暂无账单记录</text>
|
||||
<view class="state-box" v-if="txList.length === 0 && !loading && !loadError">
|
||||
<Icon name="edit" :size="48" color="#BFB3B3" />
|
||||
<text class="state-text">暂无账单记录</text>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
@@ -98,6 +99,7 @@ import Skeleton from '@/components/Skeleton/Skeleton.vue'
|
||||
import FilterPanel from './filter-panel.vue'
|
||||
import { statusBarHeight } from '@/utils/system'
|
||||
import { formatAmount, formatDate } from '@/utils/format'
|
||||
import type { Transaction, TransactionParams } from '@/api/transaction'
|
||||
import type { FilterParams } from '@/api/filter'
|
||||
|
||||
const userStore = useUserStore()
|
||||
@@ -106,7 +108,7 @@ const loading = ref(false)
|
||||
const filterType = ref('all')
|
||||
const page = ref(1)
|
||||
const pageSize = 20
|
||||
const txList = ref<any[]>([])
|
||||
const txList = ref<Transaction[]>([])
|
||||
const total = ref(0)
|
||||
const loadError = ref(false)
|
||||
let loadSeq = 0 // 请求序号,防止并发覆盖
|
||||
@@ -162,7 +164,7 @@ async function loadTx(reset = false, silent = false) {
|
||||
if (!silent) txList.value = []
|
||||
}
|
||||
const seq = ++loadSeq
|
||||
const params: any = { page: page.value, pageSize, group_id: groupStore.currentGroupId }
|
||||
const params: TransactionParams & { group_id?: number | null; category_ids?: string } = { page: page.value, pageSize, group_id: groupStore.currentGroupId }
|
||||
if (filterType.value !== 'all') params.type = filterType.value
|
||||
// 合并高级筛选参数
|
||||
const af = advancedFilters.value
|
||||
@@ -369,13 +371,6 @@ onPullDownRefresh(() => {
|
||||
|
||||
.loading-text { font-size: $font-md; color: $text-muted; }
|
||||
|
||||
.empty {
|
||||
text-align: center;
|
||||
padding: 120rpx 0;
|
||||
}
|
||||
|
||||
.empty-text { font-size: $font-lg; color: $text-muted; }
|
||||
|
||||
.state-box {
|
||||
@include state-box;
|
||||
justify-content: center;
|
||||
|
||||
Reference in New Issue
Block a user