fix clean cache when code is reset

This commit is contained in:
2024-06-11 23:18:10 +08:00
parent 30a3609838
commit 89114a9296
2 changed files with 6 additions and 7 deletions

View File

@@ -16,10 +16,12 @@ const route = useRoute()
const router = useRouter()
const userStore = useUserStore()
const props = defineProps<{ storageKey: string }>()
const emit = defineEmits(["changeLanguage"])
function reset() {
code.value = problem.value!.template[code.language] || SOURCES[code.language]
storage.remove(props.storageKey)
message.success("代码重置成功")
}