This commit is contained in:
@@ -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}`)
|
||||
}
|
||||
|
||||
@@ -6,6 +6,7 @@ import { code } from "../composables/code"
|
||||
const LANGS = [
|
||||
["python", "Python"],
|
||||
["c", "C 语言"],
|
||||
["cpp", "C++"],
|
||||
]
|
||||
|
||||
const languages: SelectOption[] = LANGS.map((it) => ({
|
||||
|
||||
@@ -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"]),
|
||||
},
|
||||
}
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user