perf: 切换卡片时重置ai-check
This commit is contained in:
@ -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,
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user