This commit is contained in:
jialin
2025-06-20 19:34:04 +08:00
parent ca7dc02d88
commit 6be7140a47
18 changed files with 156 additions and 46 deletions
+5 -1
View File
@@ -298,6 +298,7 @@ export const useCheckCompatibility = () => {
options?: WarningStausOptions
) => {
const { lockAfterUpdate = false, override = false } = options || {};
console.log('updateWarningStatus', params, options);
setWarningStatus((prev: MessageStatus) => {
if (isLockWarningStatus.current && !override) {
@@ -348,6 +349,7 @@ export const useCheckCompatibility = () => {
const handleCheckCompatibility = (
evaluateResult: EvaluateResult | null
): MessageStatus => {
console.log('handleCheckCompatibility', evaluateResult);
if (!evaluateResult) {
return {
show: false,
@@ -586,14 +588,16 @@ export const useCheckCompatibility = () => {
);
const cancelEvaluate = () => {
// update the requestId to cancel the current evaluation
updateRequestId();
checkTokenRef.current?.cancel();
checkTokenRef.current = null;
cacheFormValuesRef.current = {};
};
useEffect(() => {
return () => {
cancelEvaluate();
clearCahceFormValues();
};
}, []);