This commit is contained in:
xuyue committed 2024-01-21 21:41:31 +08:00
1 parent 0ea4c14732
commit d940c684ad
6 files changed
+56 -16

No files matched your search

+6 -1
View File
@@ -1,6 +1,6 @@
import { ref } from "vue"
import copyTextToClipboard from "copy-text-to-clipboard"
import { Code } from "../types"
import { Code, LANGUAGE } from "../types"
import { sources } from "../templates"
import { submit } from "../api"
@@ -21,6 +21,11 @@ export function reset() {
output.value = ""
}
export function changeLanguage(language: LANGUAGE) {
code.value.value = sources[language]
output.value = ""
}
export async function run() {
loading.value = true
const cleanCode = code.value.value.trim()