feat: base 优化ticketd

This commit is contained in:
caoqianming 2025-10-28 12:59:42 +08:00
parent 354f82bd36
commit 4d88ce0636
1 changed files with 11 additions and 6 deletions

View File

@ -79,12 +79,18 @@ const ticketDetail = ref({
}); });
const ticketLog = ref([]); const ticketLog = ref([]);
const ticketId = ref(null); const ticketId = ref(null);
watch(
() => props.ticket_,
async (newVal) => {
if (newVal && Object.keys(newVal).length > 0) {
ticketId.value = newVal.id
getTicketDetail()
getTicketLog()
}
},
{ immediate: false }
)
onMounted(() => { onMounted(() => {
if (props.ticket_) {
ticketId.value = props.ticket_.id;
getTicketDetail();
getTicketLog();
}
}); });
const emit = defineEmits(['success']); const emit = defineEmits(['success']);
const refreshTicket = async () => { const refreshTicket = async () => {
@ -103,7 +109,6 @@ const getTicketDetail = () => {
if (isCreator) { if (isCreator) {
isOwn.value = true isOwn.value = true
} }
}); });
}; };