wangxy 3 veckor sedan
förälder
incheckning
45ae304762
1 ändrade filer med 5 tillägg och 2 borttagningar
  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)
+				}
+			})
 		}
 	}