大量的代码格式化
Some checks failed
Docker Build & Deploy / Build Docker Image (push) Failing after 1m10s
Docker Build & Deploy / Deploy to Production (push) Has been skipped
Docker Build & Deploy / Cleanup Dangling Images (push) Successful in 1s
Docker Build & Deploy / WeChat Notification (push) Successful in 1s
Some checks failed
Docker Build & Deploy / Build Docker Image (push) Failing after 1m10s
Docker Build & Deploy / Deploy to Production (push) Has been skipped
Docker Build & Deploy / Cleanup Dangling Images (push) Successful in 1s
Docker Build & Deploy / WeChat Notification (push) Successful in 1s
This commit is contained in:
@@ -7,10 +7,10 @@
|
||||
@click-left="onClickLeft"
|
||||
>
|
||||
<template #right>
|
||||
<van-button
|
||||
<van-button
|
||||
v-if="selectedIds.size > 0"
|
||||
type="primary"
|
||||
size="small"
|
||||
type="primary"
|
||||
size="small"
|
||||
:loading="confirming"
|
||||
@click="handleConfirmSelected"
|
||||
>
|
||||
@@ -20,8 +20,13 @@
|
||||
</van-nav-bar>
|
||||
|
||||
<div class="scroll-content">
|
||||
<div v-if="loading && transactions.length === 0" class="loading-container">
|
||||
<van-loading vertical>加载中...</van-loading>
|
||||
<div
|
||||
v-if="loading && transactions.length === 0"
|
||||
class="loading-container"
|
||||
>
|
||||
<van-loading vertical>
|
||||
加载中...
|
||||
</van-loading>
|
||||
</div>
|
||||
|
||||
<TransactionList
|
||||
@@ -92,7 +97,7 @@ const handleConfirmSelected = async () => {
|
||||
|
||||
// 转换数据格式以适配 TransactionList 组件
|
||||
const displayTransactions = computed(() => {
|
||||
return transactions.value.map(t => ({
|
||||
return transactions.value.map((t) => ({
|
||||
...t,
|
||||
upsetedClassify: t.unconfirmedClassify,
|
||||
upsetedType: t.unconfirmedType
|
||||
@@ -104,13 +109,12 @@ const loadData = async () => {
|
||||
try {
|
||||
const response = await getUnconfirmedTransactionList()
|
||||
if (response && response.success) {
|
||||
transactions.value = (response.data || [])
|
||||
.map(t => ({
|
||||
...t,
|
||||
upsetedClassify: t.unconfirmedClassify,
|
||||
upsetedType: t.unconfirmedType
|
||||
}))
|
||||
selectedIds.value = new Set(response.data.map(t => t.id))
|
||||
transactions.value = (response.data || []).map((t) => ({
|
||||
...t,
|
||||
upsetedClassify: t.unconfirmedClassify,
|
||||
upsetedType: t.unconfirmedType
|
||||
}))
|
||||
selectedIds.value = new Set(response.data.map((t) => t.id))
|
||||
}
|
||||
} catch (error) {
|
||||
console.error('获取待确认列表失败:', error)
|
||||
@@ -125,7 +129,7 @@ const handleTransactionClick = (transaction) => {
|
||||
}
|
||||
|
||||
const handleTransactionDeleted = (id) => {
|
||||
transactions.value = transactions.value.filter(t => t.id !== id)
|
||||
transactions.value = transactions.value.filter((t) => t.id !== id)
|
||||
}
|
||||
|
||||
const updateSelectedIds = (ids) => {
|
||||
|
||||
Reference in New Issue
Block a user