添加消息类型枚举和相关字段,优化消息记录服务的添加方法,更新多个组件以支持新增分类对话框
All checks were successful
Docker Build & Deploy / Build Docker Image (push) Successful in 38s
Docker Build & Deploy / Deploy to Production (push) Successful in 6s
Docker Build & Deploy / Cleanup Dangling Images (push) Successful in 1s

This commit is contained in:
孙诚
2026-01-06 13:45:39 +08:00
parent baa77341bc
commit 10b02df6e2
10 changed files with 178 additions and 149 deletions

View File

@@ -0,0 +1,43 @@
<template>
<van-dialog
v-model:show="show"
title="新增交易分类"
show-cancel-button
@confirm="handleConfirm"
>
<van-field v-model="classifyName" placeholder="请输入新的交易分类" />
</van-dialog>
</template>
<script setup>
import { ref } from 'vue'
import { showToast } from 'vant'
const emit = defineEmits(['confirm'])
const show = ref(false)
const classifyName = ref('')
// 打开弹窗
const open = () => {
classifyName.value = ''
show.value = true
}
// 确认
const handleConfirm = () => {
if (!classifyName.value.trim()) {
showToast('请输入分类名称')
return
}
emit('confirm', classifyName.value.trim())
show.value = false
classifyName.value = ''
}
// 暴露方法给父组件
defineExpose({
open
})
</script>