소스 검색

调整页面

wangxy 3 주 전
부모
커밋
45ae304762
1개의 변경된 파일5개의 추가작업 그리고 2개의 파일을 삭제
  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)
+				}
+			})
 		}
 	}