perf: 切换卡片时重置ai-check

This commit is contained in:
rd
2025-08-15 10:39:14 +08:00
parent af174dbbed
commit d4617f6db1
3 changed files with 11 additions and 7 deletions

View File

@ -21,7 +21,7 @@ export default function useGetAiReviewResult({
const checkResult = ref<any>({});
const writerCode = computed(() => route.params.writerCode);
const handleStartCheck = async () => {
checkLoading.value = true;
const { id, platform, content } = cardInfo.value;
@ -36,10 +36,13 @@ export default function useGetAiReviewResult({
startStatusPolling();
}
};
const handleAgainCheck = async () => {
const resetAiReviewInfo = () => {
checkResult.value = {};
ticket.value = '';
clearStatusPollingTimer();
};
const handleAgainCheck = async () => {
resetAiReviewInfo();
handleStartCheck();
};
const startStatusPolling = () => {
@ -76,5 +79,6 @@ export default function useGetAiReviewResult({
checkResult,
checkLoading,
ticket,
resetAiReviewInfo,
};
}