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

a

上级 8d6cea05
...@@ -10,7 +10,7 @@ ...@@ -10,7 +10,7 @@
<div class="flex flex-grow justify-between items-center"> <div class="flex flex-grow justify-between items-center">
<span>新主题</span> <span>新主题</span>
<div class="space-x-1"> <div class="space-x-1">
<UKbd></UKbd> <UKbd>{{ metaSymbol }}</UKbd>
<UKbd>K</UKbd> <UKbd>K</UKbd>
</div> </div>
</div> </div>
...@@ -28,6 +28,7 @@ ...@@ -28,6 +28,7 @@
</div> </div>
</template> </template>
<script setup lang="ts"> <script setup lang="ts">
const { metaSymbol } = useShortcuts()
const colorMode = useColorMode() const colorMode = useColorMode()
const isDark = computed({ const isDark = computed({
get () { get () {
...@@ -37,4 +38,12 @@ const isDark = computed({ ...@@ -37,4 +38,12 @@ const isDark = computed({
colorMode.preference = colorMode.value === 'dark' ? 'light' : 'dark' colorMode.preference = colorMode.value === 'dark' ? 'light' : 'dark'
} }
}) })
defineShortcuts({
meta_k: {
handler: () => {
}
}
})
</script> </script>
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
"type": "module", "type": "module",
"scripts": { "scripts": {
"build": "nuxt build", "build": "nuxt build",
"dev": "nuxt dev --host", "dev": "SW=false nuxt dev --host",
"dev-sw": "SW=true nuxi dev --host", "dev-sw": "SW=true nuxi dev --host",
"generate": "nuxt generate", "generate": "nuxt generate",
"preview": "nuxt preview", "preview": "nuxt preview",
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册