更改页面的内容
This commit is contained in:
@@ -263,7 +263,7 @@ export default defineAppConfig({
|
||||
colorMode: true,
|
||||
links: [{
|
||||
'icon': 'simple-icons-github',
|
||||
'to': 'https://github.com/nuxt-ui-pro/docs',
|
||||
'to': 'https://github.com/estel-li/estel_docs',
|
||||
'target': '_blank',
|
||||
'aria-label': 'GitHub'
|
||||
}]
|
||||
@@ -297,7 +297,7 @@ export default defineAppConfig({
|
||||
title: '当前页',
|
||||
bottom: {
|
||||
title: 'Community',
|
||||
edit: 'https://github.com/nuxt-ui-pro/docs/edit/main/content',
|
||||
edit: 'https://github.com/estel-li/estel_docs/edit/main/content',
|
||||
links: [{
|
||||
icon: 'lucide-star',
|
||||
label: 'GitHub',
|
||||
|
@@ -51,7 +51,7 @@
|
||||
<div class="mt-4 uppercase tracking-wider border-t border-gray-200 dark:border-gray-700 w-7/9 mx-5" />
|
||||
|
||||
<!-- 文档目录导航 -->
|
||||
<div class="mt-6 flex items-center justify-start pl-4 w-full">
|
||||
<div class="mt-6 flex items-center justify-start pl-4 w-full pb-3">
|
||||
<UContentNavigation
|
||||
highlight
|
||||
:navigation="navigation"
|
||||
|
@@ -3,11 +3,8 @@
|
||||
v-slot="{ open }"
|
||||
:modal="false"
|
||||
:items="[{
|
||||
label: 'Starter',
|
||||
to: 'https://ui-pro-starter.nuxt.dev/'
|
||||
}, {
|
||||
label: 'Landing',
|
||||
to: 'https://landing-template.nuxt.dev/'
|
||||
label: 'Blog',
|
||||
to: 'https://lijue.me'
|
||||
}, {
|
||||
label: 'Docs',
|
||||
to: 'https://docs-template.nuxt.dev/',
|
||||
@@ -15,15 +12,10 @@
|
||||
checked: true,
|
||||
type: 'checkbox'
|
||||
}, {
|
||||
label: 'SaaS',
|
||||
to: 'https://saas-template.nuxt.dev/'
|
||||
}, {
|
||||
label: 'Dashboard',
|
||||
to: 'https://dashboard-template.nuxt.dev/'
|
||||
}, {
|
||||
label: 'Chat',
|
||||
to: 'https://chat-template.nuxt.dev/'
|
||||
}]"
|
||||
label: 'JiWei',
|
||||
to: 'https://www.xajiwei.com/'
|
||||
},
|
||||
]"
|
||||
:ui="{ content: 'w-(--reka-dropdown-menu-trigger-width) min-w-0' }"
|
||||
size="xs"
|
||||
>
|
||||
|
@@ -30,8 +30,8 @@ const fields = ref([
|
||||
<template>
|
||||
<UAuthForm
|
||||
class="max-w-md"
|
||||
title="Login"
|
||||
description="Enter your credentials to access your account."
|
||||
title="注册"
|
||||
description="使用社交账号或邮箱注册"
|
||||
icon="lucide-user"
|
||||
:fields="fields"
|
||||
:providers="providers"
|
||||
|
@@ -4,76 +4,24 @@ import type { NavigationMenuItem } from '@nuxt/ui'
|
||||
const items = ref<NavigationMenuItem[][]>([
|
||||
[
|
||||
{
|
||||
label: 'Guide',
|
||||
icon: 'lucide-book-open'
|
||||
label: '稷维科技',
|
||||
icon: 'lucide-globe',
|
||||
to: 'https://www.xajiwei.com',
|
||||
target: '_blank',
|
||||
|
||||
|
||||
},
|
||||
{
|
||||
label: 'Composables',
|
||||
icon: 'lucide-database',
|
||||
children: [
|
||||
{
|
||||
label: 'defineShortcuts',
|
||||
icon: 'lucide-file-text',
|
||||
description: 'Define shortcuts for your application.',
|
||||
to: '/'
|
||||
},
|
||||
{
|
||||
label: 'useOverlay',
|
||||
icon: 'lucide-file-text',
|
||||
description: 'Display a modal/slideover within your application.',
|
||||
to: '/'
|
||||
},
|
||||
{
|
||||
label: 'useToast',
|
||||
icon: 'lucide-file-text',
|
||||
description: 'Display a toast within your application.',
|
||||
to: '/'
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
label: 'Components',
|
||||
label: '组件速查',
|
||||
icon: 'lucide-box',
|
||||
to: '',
|
||||
children: [
|
||||
{
|
||||
label: 'Link',
|
||||
icon: 'lucide-file-text',
|
||||
description: 'Use NuxtLink with superpowers.',
|
||||
to: '/'
|
||||
},
|
||||
{
|
||||
label: 'Modal',
|
||||
icon: 'lucide-file-text',
|
||||
description: 'Display a modal within your application.',
|
||||
to: '/'
|
||||
},
|
||||
{
|
||||
label: 'NavigationMenu',
|
||||
icon: 'lucide-file-text',
|
||||
description: 'Display a list of links.',
|
||||
to: '/'
|
||||
},
|
||||
{
|
||||
label: 'Pagination',
|
||||
icon: 'lucide-file-text',
|
||||
description: 'Display a list of pages.',
|
||||
to: ''
|
||||
},
|
||||
{
|
||||
label: 'Popover',
|
||||
icon: 'lucide-file-text',
|
||||
description: 'Display a non-modal dialog that floats around a trigger element.',
|
||||
to: '/'
|
||||
},
|
||||
{
|
||||
label: 'Progress',
|
||||
icon: 'lucide-file-text',
|
||||
description: 'Show a horizontal bar to indicate task progression.',
|
||||
to: '/'
|
||||
}
|
||||
]
|
||||
}
|
||||
to: '/简单文档/components/api'
|
||||
},
|
||||
{
|
||||
label: '关于',
|
||||
icon: 'lucide-info',
|
||||
to: '/about'
|
||||
},
|
||||
|
||||
]
|
||||
// [
|
||||
// {
|
||||
|
26
app/components/example/ExampleAlert.vue
Normal file
26
app/components/example/ExampleAlert.vue
Normal file
@@ -0,0 +1,26 @@
|
||||
<script setup>
|
||||
const props = defineProps({
|
||||
type: {
|
||||
type: String,
|
||||
default: () => '',
|
||||
},
|
||||
})
|
||||
|
||||
const alertClass = computed(() => {
|
||||
return {
|
||||
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',
|
||||
success: 'bg-green-100 border-green-200 dark:bg-green-900 dark:border-green-800',
|
||||
|
||||
}[props.type]
|
||||
})
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<div
|
||||
class="text-black p-2 border dark:text-white rounded"
|
||||
:class="alertClass"
|
||||
>
|
||||
<slot mdc-unwrap="p" />
|
||||
</div>
|
||||
</template>
|
5
app/components/example/ExampleCard.vue
Normal file
5
app/components/example/ExampleCard.vue
Normal file
@@ -0,0 +1,5 @@
|
||||
<template>
|
||||
<div class="p-2 border bg-white dark:bg-black dark:border-gray-700 rounded">
|
||||
<slot />
|
||||
</div>
|
||||
</template>
|
11
app/components/example/ExampleFulltextContentSearch.vue
Normal file
11
app/components/example/ExampleFulltextContentSearch.vue
Normal file
@@ -0,0 +1,11 @@
|
||||
<template>
|
||||
<UCard>
|
||||
<UButton
|
||||
color="primary"
|
||||
icon="i-lucide-search"
|
||||
@click="useContentSearch().open.value = true"
|
||||
>
|
||||
Open Search Modal
|
||||
</UButton>
|
||||
</UCard>
|
||||
</template>
|
47
app/components/example/ExampleFulltextFusejs.vue
Normal file
47
app/components/example/ExampleFulltextFusejs.vue
Normal file
@@ -0,0 +1,47 @@
|
||||
<script setup lang="ts">
|
||||
import Fuse from 'fuse.js'
|
||||
|
||||
const query = ref('')
|
||||
const { data } = await useAsyncData('search-data', () => queryCollectionSearchSections('docs'))
|
||||
|
||||
const fuse = new Fuse(data.value || [], {
|
||||
keys: [
|
||||
'title',
|
||||
'description',
|
||||
],
|
||||
})
|
||||
|
||||
const result = computed<Array<{ item: typeof data.value[0] }>>(() => fuse.search(toValue(query)).slice(0, 10))
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<UContainer class="p-4">
|
||||
<UCard>
|
||||
<UInput
|
||||
v-model="query"
|
||||
placeholder="Search..."
|
||||
class="w-full"
|
||||
/>
|
||||
<ul>
|
||||
<li
|
||||
v-for="link of result"
|
||||
:key="link.item.id"
|
||||
class="mt-2"
|
||||
>
|
||||
<UButton
|
||||
variant="ghost"
|
||||
class="w-full"
|
||||
:to="link.item.id"
|
||||
>
|
||||
<div class="flex flex-col">
|
||||
<span class="text-black dark:text-white font-semibold">{{ link.item.title }}</span>
|
||||
<span class="text-gray-500 text-xs truncate">
|
||||
{{ link.item.content?.slice(0, 100) }}...
|
||||
</span>
|
||||
</div>
|
||||
</UButton>
|
||||
</li>
|
||||
</ul>
|
||||
</UCard>
|
||||
</UContainer>
|
||||
</template>
|
51
app/components/example/ExampleFulltextMiniSearch.vue
Normal file
51
app/components/example/ExampleFulltextMiniSearch.vue
Normal file
@@ -0,0 +1,51 @@
|
||||
<script setup lang="ts">
|
||||
import MiniSearch from 'minisearch'
|
||||
|
||||
const query = ref('')
|
||||
const { data } = await useAsyncData('search-data', () => queryCollectionSearchSections('docs'))
|
||||
|
||||
const miniSearch = new MiniSearch({
|
||||
fields: ['title', 'content'],
|
||||
storeFields: ['title', 'content'],
|
||||
searchOptions: {
|
||||
prefix: true,
|
||||
fuzzy: 0.2,
|
||||
},
|
||||
})
|
||||
|
||||
// Add data to the MiniSearch instance
|
||||
miniSearch.addAll(toValue(data.value || []))
|
||||
const result = computed(() => miniSearch.search(toValue(query)).slice(0, 10))
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<UContainer class="p-4">
|
||||
<UCard>
|
||||
<UInput
|
||||
v-model="query"
|
||||
placeholder="Search..."
|
||||
class="w-full"
|
||||
/>
|
||||
<ul>
|
||||
<li
|
||||
v-for="link of result"
|
||||
:key="link.id"
|
||||
class="mt-2"
|
||||
>
|
||||
<UButton
|
||||
variant="ghost"
|
||||
class="w-full"
|
||||
:to="link.id"
|
||||
>
|
||||
<div class="flex flex-col">
|
||||
<span class="text-black dark:text-white font-semibold">{{ link.title }}</span>
|
||||
<span class="text-gray-500 text-xs truncate">
|
||||
{{ link.content?.slice(0, 100) }}...
|
||||
</span>
|
||||
</div>
|
||||
</UButton>
|
||||
</li>
|
||||
</ul>
|
||||
</UCard>
|
||||
</UContainer>
|
||||
</template>
|
8
app/components/example/ExampleHero.vue
Normal file
8
app/components/example/ExampleHero.vue
Normal file
@@ -0,0 +1,8 @@
|
||||
<template>
|
||||
<section class="pt-4">
|
||||
<h1 class="text-4xl">
|
||||
<slot mdc-unwrap="p" />
|
||||
</h1>
|
||||
<slot name="description" />
|
||||
</section>
|
||||
</template>
|
29
app/components/example/ExampleIconCard.vue
Normal file
29
app/components/example/ExampleIconCard.vue
Normal file
@@ -0,0 +1,29 @@
|
||||
<script setup>
|
||||
defineProps({
|
||||
title: {
|
||||
type: String,
|
||||
default: 'Default title',
|
||||
},
|
||||
description: {
|
||||
type: String,
|
||||
default: 'Default description',
|
||||
},
|
||||
icon: {
|
||||
type: String,
|
||||
default: 'IconMarkdown',
|
||||
},
|
||||
})
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<div class="p-6 border bg-white dark:bg-black dark:border-gray-700 rounded">
|
||||
<UIcon
|
||||
:name="icon"
|
||||
class="w-20 h-20"
|
||||
/>
|
||||
<h2 class="text-3xl font-semibold mb-2">
|
||||
{{ title }}
|
||||
</h2>
|
||||
<p>{{ description }}</p>
|
||||
</div>
|
||||
</template>
|
22
app/components/example/ExampleLandingHero.vue
Normal file
22
app/components/example/ExampleLandingHero.vue
Normal file
@@ -0,0 +1,22 @@
|
||||
<script setup lang="ts">
|
||||
defineProps<{
|
||||
image: string
|
||||
}>()
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<section class="flex flex-col sm:flex-row sm:items-center gap-4 py-8 sm:gap-12 sm:py-12 h-[331px]">
|
||||
<div class="flex flex-col gap-1">
|
||||
<h1 class="text-4xl font-semibold">
|
||||
<slot name="title" />
|
||||
</h1>
|
||||
<div class="text-base text-gray-600 dark:text-gray-300">
|
||||
<slot name="description" />
|
||||
</div>
|
||||
</div>
|
||||
<img
|
||||
:src="image"
|
||||
class="w-1/2 rounded-lg"
|
||||
>
|
||||
</section>
|
||||
</template>
|
5
app/components/example/ExampleTitle.vue
Normal file
5
app/components/example/ExampleTitle.vue
Normal file
@@ -0,0 +1,5 @@
|
||||
<template>
|
||||
<h1 class="text-4xl text-black dark:text-white">
|
||||
<slot mdc-unwrap="p" />
|
||||
</h1>
|
||||
</template>
|
Reference in New Issue
Block a user