提交 f6cfb3f9 编写于 作者: View Design's avatar View Design

123

上级 ac574ab4
......@@ -16,6 +16,7 @@
<script setup>
const toast = useToast()
const slots = useSlots()
const props = defineProps({
code: {
type: String,
......@@ -53,6 +54,14 @@ const handleCopy = () => {
title: '复制成功'
})
}
watch(
() => slots.default(),
(newValue, oldValue) => {
// 在这里处理默认插槽内容的变化
console.log('Default slot content changed:', newValue)
},
{ immediate: true, deep: true }
)
</script>
<style>
......
// https://nuxt.com/docs/api/configuration/nuxt-config
import { bundledLanguages, type BuiltinLanguage } from 'shiki'
const langs = Object.keys(bundledLanguages).filter(item => item !== 'lisp');
const sw = process.env.SW === 'true'
export default defineNuxtConfig({
devtools: {
......@@ -77,12 +75,5 @@ export default defineNuxtConfig({
navigateFallbackAllowlist: [/^\/$/],
type: 'module',
},
},
mdc: {
highlight: {
highlighter: 'shiki',
theme: 'slack-dark',
langs: langs as BuiltinLanguage[]
}
}
})
\ No newline at end of file
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册