refactor: 统一账单列表组件,封装 BillListComponent
- 创建 BillListComponent 组件(基于 v2 风格,紧凑布局) - 支持筛选(类型、分类、日期范围)和排序(金额、时间) - 支持分页加载、左滑删除、点击详情、多选模式 - 支持 API 自动加载和 Custom 自定义数据两种模式 - 迁移 6 个页面/组件到新组件: - TransactionsRecord.vue - EmailRecord.vue - ClassificationNLP.vue - UnconfirmedClassification.vue - BudgetCard.vue - ReasonGroupList.vue - 删除旧版 TransactionList 组件 - 保留 CalendarV2 的特殊版本(有专用功能) - 添加完整的使用文档和 JSDoc 注释
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
<template>
|
||||
<template>
|
||||
<div class="reason-group-list-v2">
|
||||
<van-empty
|
||||
v-if="groups.length === 0 && !loading"
|
||||
@@ -78,10 +78,12 @@
|
||||
</van-button>
|
||||
</template>
|
||||
|
||||
<TransactionList
|
||||
<BillListComponent
|
||||
data-source="custom"
|
||||
:transactions="groupTransactions"
|
||||
:loading="transactionLoading"
|
||||
:finished="transactionFinished"
|
||||
:enable-filter="false"
|
||||
@load="loadGroupTransactions"
|
||||
@click="handleTransactionClick"
|
||||
@delete="handleGroupTransactionDelete"
|
||||
@@ -185,7 +187,7 @@ import { ref, computed, watch, onBeforeUnmount } from 'vue'
|
||||
import { showToast, showSuccessToast, showLoadingToast, closeToast, showConfirmDialog } from 'vant'
|
||||
import { getReasonGroups, batchUpdateByReason, getTransactionList } from '@/api/transactionRecord'
|
||||
import ClassifySelector from './ClassifySelector.vue'
|
||||
import TransactionList from './TransactionList.vue'
|
||||
import BillListComponent from './Bill/BillListComponent.vue'
|
||||
import TransactionDetail from './TransactionDetail.vue'
|
||||
import PopupContainer from './PopupContainer.vue'
|
||||
|
||||
|
||||
Reference in New Issue
Block a user