wangxy 3 settimane fa
parent
commit
45ae304762
1 ha cambiato i file con 5 aggiunte e 2 eliminazioni
  1. 5 2
      pages/client/Kaoshi/examTools.js

+ 5 - 2
pages/client/Kaoshi/examTools.js

@@ -49,8 +49,11 @@ export function useKaoShiCache() {
 	function removeCacheKsOther(key) {
 		const data = getCacheOtherNotKey(ksCache)
 		if (data) {
-			const newData = data[key];
-			saveCache(ksCache, key, newData)
+			Object.keys(data).forEach(item => {
+				if (item != key) {
+					removeCacheKs(item)
+				}
+			})
 		}
 	}