add cpp
Some checks failed
Deploy / build-and-deploy (push) Has been cancelled

This commit is contained in:
2025-09-10 13:46:12 +08:00
parent 044b33f39c
commit 80d279365c
5 changed files with 5 additions and 3 deletions

View File

@@ -68,6 +68,5 @@ export async function createCode(data: { code: string; query: string }) {
}
export async function removeCode(id: number) {
const res = await api.delete(`/${id}`)
console.log(res.data)
await api.delete(`/${id}`)
}

View File

@@ -6,6 +6,7 @@ import { code } from "../composables/code"
const LANGS = [
["python", "Python"],
["c", "C 语言"],
["cpp", "C++"],
]
const languages: SelectOption[] = LANGS.map((it) => ({

View File

@@ -17,6 +17,7 @@ const cache: Cache = {
code: {
python: useStorage("code_python", sources["python"]),
c: useStorage("code_c", sources["c"]),
cpp: useStorage("code_cpp", sources["cpp"]),
},
}

View File

@@ -1,6 +1,6 @@
import { RemovableRef } from "@vueuse/core"
export type LANGUAGE = "c" | "python"
export type LANGUAGE = "c" | "python" | "cpp"
export interface Code {
value: string