diff --git a/src/oj/ai/components/Heatmap.vue b/src/oj/ai/components/Heatmap.vue index 731795e..2c4f4a8 100644 --- a/src/oj/ai/components/Heatmap.vue +++ b/src/oj/ai/components/Heatmap.vue @@ -60,7 +60,7 @@ import { useAIStore } from "oj/store/ai" import { parseTime } from "utils/functions" const aiStore = useAIStore() -const containerRef = ref() +const containerRef = useTemplateRef("containerRef") const CELL_SIZE = 12 const CELL_GAP = 3 diff --git a/src/oj/problem/components/Form.vue b/src/oj/problem/components/Form.vue index e3276ce..91260c4 100644 --- a/src/oj/problem/components/Form.vue +++ b/src/oj/problem/components/Form.vue @@ -31,9 +31,7 @@ interface Props { isConnected?: boolean // WebSocket 实际的连接状态(已建立/未建立) } -const props = withDefaults(defineProps(), { - isConnected: false, -}) +const { storageKey, isConnected = false } = defineProps() // 注入同步状态 const syncStatus = injectSyncStatus() @@ -102,7 +100,7 @@ const reset = () => { problem.value!.template[codeStore.code.language] || SOURCES[codeStore.code.language], ) - storage.remove(props.storageKey) + storage.remove(storageKey) message.success("代码重置成功") } @@ -228,7 +226,7 @@ onMounted(() => { /> -