This commit is contained in:
2025-07-31 15:18:46 +08:00
parent ce50120e40
commit 9cea296e6c
7 changed files with 18 additions and 19 deletions

View File

@@ -14,7 +14,7 @@
}, { }, {
label: 'JiWei', label: 'JiWei',
to: 'https://www.xajiwei.com/' to: 'https://www.xajiwei.com/'
}, }
]" ]"
:ui="{ content: 'w-(--reka-dropdown-menu-trigger-width) min-w-0' }" :ui="{ content: 'w-(--reka-dropdown-menu-trigger-width) min-w-0' }"
size="xs" size="xs"

View File

@@ -7,8 +7,7 @@ const items = ref<NavigationMenuItem[][]>([
label: '稷维科技', label: '稷维科技',
icon: 'lucide-globe', icon: 'lucide-globe',
to: 'https://www.xajiwei.com', to: 'https://www.xajiwei.com',
target: '_blank', target: '_blank'
}, },
{ {
@@ -20,8 +19,8 @@ const items = ref<NavigationMenuItem[][]>([
label: '关于', label: '关于',
icon: 'lucide-info', icon: 'lucide-info',
to: '/about' to: '/about'
}, }
] ]
// [ // [
// { // {

View File

@@ -2,15 +2,15 @@
const props = defineProps({ const props = defineProps({
type: { type: {
type: String, type: String,
default: () => '', default: () => ''
}, }
}) })
const alertClass = computed(() => { const alertClass = computed(() => {
return { return {
warning: 'bg-orange-100 border-orange-200 dark:bg-orange-900 dark:border-orange-800', warning: 'bg-orange-100 border-orange-200 dark:bg-orange-900 dark:border-orange-800',
info: 'bg-blue-100 border-blue-200 dark:bg-blue-900 dark:border-blue-800', info: 'bg-blue-100 border-blue-200 dark:bg-blue-900 dark:border-blue-800',
success: 'bg-green-100 border-green-200 dark:bg-green-900 dark:border-green-800', success: 'bg-green-100 border-green-200 dark:bg-green-900 dark:border-green-800'
}[props.type] }[props.type]
}) })

View File

@@ -7,8 +7,8 @@ const { data } = await useAsyncData('search-data', () => queryCollectionSearchSe
const fuse = new Fuse(data.value || [], { const fuse = new Fuse(data.value || [], {
keys: [ keys: [
'title', 'title',
'description', 'description'
], ]
}) })
const result = computed<Array<{ item: typeof data.value[0] }>>(() => fuse.search(toValue(query)).slice(0, 10)) const result = computed<Array<{ item: typeof data.value[0] }>>(() => fuse.search(toValue(query)).slice(0, 10))

View File

@@ -9,8 +9,8 @@ const miniSearch = new MiniSearch({
storeFields: ['title', 'content'], storeFields: ['title', 'content'],
searchOptions: { searchOptions: {
prefix: true, prefix: true,
fuzzy: 0.2, fuzzy: 0.2
}, }
}) })
// Add data to the MiniSearch instance // Add data to the MiniSearch instance

View File

@@ -2,16 +2,16 @@
defineProps({ defineProps({
title: { title: {
type: String, type: String,
default: 'Default title', default: 'Default title'
}, },
description: { description: {
type: String, type: String,
default: 'Default description', default: 'Default description'
}, },
icon: { icon: {
type: String, type: String,
default: 'IconMarkdown', default: 'IconMarkdown'
}, }
}) })
</script> </script>

View File

@@ -77,7 +77,7 @@ export default defineNuxtConfig({
title: 'Estel Docs', title: 'Estel Docs',
description: 'Estel Docs 文档系统', description: 'Estel Docs 文档系统',
contentCollection: 'docs' contentCollection: 'docs'
}, }
], ]
}, }
}) })