add code preset
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
<Header />
|
||||
<Content />
|
||||
<n-modal
|
||||
v-model:show="show"
|
||||
v-model:show="file"
|
||||
preset="card"
|
||||
style="width: 600px"
|
||||
:mask-closable="false"
|
||||
@@ -10,6 +10,15 @@
|
||||
>
|
||||
<File />
|
||||
</n-modal>
|
||||
<n-modal
|
||||
v-model:show="query"
|
||||
preset="card"
|
||||
style="width: 600px"
|
||||
:mask-closable="false"
|
||||
title="代码预设"
|
||||
>
|
||||
<Query />
|
||||
</n-modal>
|
||||
</template>
|
||||
<script lang="ts" setup>
|
||||
import { useMagicKeys, whenever } from "@vueuse/core"
|
||||
@@ -18,19 +27,25 @@ import { run } from "../composables/code"
|
||||
import Content from "./Content.vue"
|
||||
import File from "./File.vue"
|
||||
import Header from "./Header.vue"
|
||||
import Query from "./Query.vue"
|
||||
|
||||
const show = ref(false)
|
||||
const file = ref(false)
|
||||
const query = ref(false)
|
||||
|
||||
const { alt_shift_p, ctrl_shift_p, ctrl_shift_z } = useMagicKeys()
|
||||
const { alt_shift_p, ctrl_shift_p, ctrl_shift_z, ctrl_shift_m } = useMagicKeys()
|
||||
|
||||
whenever(alt_shift_p, () => {
|
||||
show.value = true
|
||||
file.value = true
|
||||
})
|
||||
whenever(ctrl_shift_p, () => {
|
||||
show.value = true
|
||||
file.value = true
|
||||
})
|
||||
whenever(ctrl_shift_z, () => {
|
||||
show.value = true
|
||||
file.value = true
|
||||
})
|
||||
|
||||
whenever(ctrl_shift_m, () => {
|
||||
query.value = true
|
||||
})
|
||||
|
||||
const { ctrl_s } = useMagicKeys({
|
||||
|
||||
Reference in New Issue
Block a user