feat: 添加分类名称更新功能,支持在交易记录中同步更新分类名称
All checks were successful
Docker Build & Deploy / Build Docker Image (push) Successful in 23s
Docker Build & Deploy / Deploy to Production (push) Successful in 7s

This commit is contained in:
2026-01-01 15:20:59 +08:00
parent c58404491f
commit 8c72102e87
6 changed files with 173 additions and 34 deletions

View File

@@ -13,10 +13,10 @@
>
<van-tabs v-model:active="activeTab" shrink>
<van-tab title="一句话录账" name="one">
<OneLineBillAdd @success="handleSuccess" />
<OneLineBillAdd :key="componentKey" @success="handleSuccess" />
</van-tab>
<van-tab title="手动录账" name="manual">
<ManualBillAdd @success="handleSuccess" />
<ManualBillAdd :key="componentKey" @success="handleSuccess" />
</van-tab>
</van-tabs>
</PopupContainer>
@@ -33,11 +33,15 @@ const emit = defineEmits(['success'])
const showAddBill = ref(false)
const activeTab = ref('one')
const componentKey = ref(0)
const openAddBill = () => {
showAddBill.value = true
// Reset to default tab if needed, or keep last used
// activeTab.value = 'one'
// 清理状态,默认选中一句话录账
activeTab.value = 'one'
// 清理子组件状态通过 key 强制重渲染
componentKey.value++
}
const handleSuccess = () => {
@@ -50,7 +54,7 @@ const handleSuccess = () => {
<style scoped>
.floating-add {
position: fixed;
bottom: 80px; /* Above tabbar */
bottom: 95px; /* Above tabbar */
right: 20px;
width: 50px;
height: 50px;