添加调试模块

This commit is contained in:
2024-12-22 02:06:54 +08:00
parent b89cef5b7c
commit c9bcd42ada
4 changed files with 46 additions and 3 deletions

View File

@@ -3,7 +3,7 @@ import { Icon } from "@iconify/vue"
import { useMessage } from "naive-ui"
import SelectLanguage from "../components/SelectLanguage.vue"
import ThemeButton from "../components/ThemeButton.vue"
import { loading, run, share, size } from "../composables/code"
import { code, debug, loading, run, share, size } from "../composables/code"
const message = useMessage()
@@ -11,6 +11,10 @@ function handleShare() {
share()
message.success("分享链接已复制")
}
function handleDebug() {
debug.value = true
}
</script>
<template>
@@ -21,7 +25,10 @@ function handleShare() {
<div class="title">徐越的自测猫</div>
</n-flex>
<n-flex>
<n-button @click="handleShare">分享</n-button>
<n-button quaternary type="error" v-if="code.language === 'python'" @click="handleDebug">
调试
</n-button>
<n-button quaternary @click="handleShare">分享</n-button>
<ThemeButton />
<n-input-number
v-model:value="size"