feat: 更新未读消息计数的刷新频率,优化消息视图;添加分类标签显示功能,增强预算卡片的可读性
All checks were successful
Docker Build & Deploy / Build Docker Image (push) Successful in 19s
Docker Build & Deploy / Deploy to Production (push) Successful in 13s
Docker Build & Deploy / Cleanup Dangling Images (push) Successful in 1s
Docker Build & Deploy / WeChat Notification (push) Successful in 1s

This commit is contained in:
2026-01-10 23:01:02 +08:00
parent 171febcfb6
commit ad21d20751
6 changed files with 98 additions and 25 deletions

View File

@@ -90,7 +90,7 @@
</template>
<script setup>
import { ref, onMounted, watch } from 'vue'
import { ref, onMounted, watch, nextTick } from 'vue'
import { showToast } from 'vant'
import dayjs from 'dayjs'
import ClassifySelector from '@/components/ClassifySelector.vue'
@@ -122,6 +122,7 @@ const form = ref({
})
const categoryName = ref('')
const isSyncing = ref(false)
// 弹窗控制
const showDatePicker = ref(false)
@@ -134,6 +135,7 @@ const currentTime = ref(dayjs().format('HH:mm').split(':'))
// 初始化数据
const initForm = async () => {
if (props.initialData) {
isSyncing.value = true
const { occurredAt, amount, reason, type, classify } = props.initialData
if (occurredAt) {
@@ -152,6 +154,10 @@ const initForm = async () => {
if (classify) {
categoryName.value = classify
}
nextTick(() => {
isSyncing.value = false
})
}
}
@@ -165,7 +171,9 @@ watch(() => props.initialData, () => {
}, { deep: true })
const handleTypeChange = (newType) => {
categoryName.value = ''
if (!isSyncing.value) {
categoryName.value = ''
}
}
const onConfirmDate = ({ selectedValues }) => {