将i-lucide都改为lucide本地库

This commit is contained in:
2025-07-28 13:38:45 +08:00
parent 29a41504d0
commit d30e76c41a
52 changed files with 155 additions and 155 deletions

View File

@@ -25,7 +25,7 @@ const directoryNavigation = computed(() => {
return {
title: item.title,
path: item.path,
icon: (item.icon as string) || 'i-lucide-file-text',
icon: (item.icon as string) || 'lucide-file-text',
active: Boolean(item.active)
}
}
@@ -34,7 +34,7 @@ const directoryNavigation = computed(() => {
return {
title: item.title,
path: item.path,
icon: (item.icon as string) || 'i-lucide-folder',
icon: (item.icon as string) || 'lucide-folder',
active: Boolean(item.active),
// 不包含 children这样就不会展开显示子项
children: []

View File

@@ -36,10 +36,10 @@
border-b border-gray-200 dark:border-gray-700 pt-2">
<div class="flex items-center flex-1 min-w-0 pl-1 ">
<UIcon :name="(typeof child.icon === 'string' ? child.icon : 'i-lucide-file-text')" class="mr-2 text-gray-400" size="14" />
<UIcon :name="(typeof child.icon === 'string' ? child.icon : 'lucide-file-text')" class="mr-2 text-gray-400" size="14" />
<span class="text-base font-medium font-sans">{{ child.title }}</span>
</div>
<UIcon name="i-lucide-chevron-right" class="text-gray-400 flex-shrink-0 ml-2" size="16" />
<UIcon name="lucide-chevron-right" class="text-gray-400 flex-shrink-0 ml-2" size="16" />
</div>
</div>
</div>
@@ -60,7 +60,7 @@ const firstLevelItems = computed(() => {
.map(item => ({
...item,
description: item.description,
icon: item.icon || 'i-lucide-book-open'
icon: item.icon || 'lucide-book-open'
}));
});

View File

@@ -30,7 +30,7 @@
<UButton
label="Docs"
variant="subtle"
trailing-icon="i-lucide-chevron-down"
trailing-icon="lucide-chevron-down"
size="xs"
class="-mb-[6px] font-semibold rounded-full truncate"
:class="[open && 'bg-primary/15']"

View File

@@ -19,7 +19,7 @@
<UButton
color="neutral"
variant="ghost"
icon="i-lucide-x"
icon="lucide-x"
square
@click="$emit('close')"
/>

View File

@@ -33,11 +33,11 @@ const fields = ref([
class="max-w-md"
title="登录"
description="使用社交账号或邮箱登录"
icon="i-lucide-user"
icon="lucide-user"
:fields="fields"
:providers="providers"
:separator="{
icon: 'i-lucide-user'
icon: 'lucide-user'
}"
/>
</template>

View File

@@ -32,11 +32,11 @@ const fields = ref([
class="max-w-md"
title="Login"
description="Enter your credentials to access your account."
icon="i-lucide-user"
icon="lucide-user"
:fields="fields"
:providers="providers"
:separator="{
icon: 'i-lucide-user'
icon: 'lucide-user'
}"
/>
</template>

View File

@@ -36,7 +36,7 @@
<div class="flex items-center" :style="{ marginLeft: '0px' }">
<Icon
v-if="showIcon"
:name="item.icon || 'i-lucide-file'"
:name="item.icon || 'lucide-file'"
class="mr-2 text-gray-500 w-4 h-4"
:class="{
'text-green-500': item.icon?.includes('vue'),
@@ -101,12 +101,12 @@ const defaultIcons = {
js: 'i-simple-icons-javascript',
md: 'i-simple-icons-markdown',
json: 'i-simple-icons-json',
folder: 'i-lucide-folder',
file: 'i-lucide-file'
folder: 'lucide-folder',
file: 'lucide-file'
};
function getIcon(filename: string, type: 'folder' | 'file'): string {
if (filename === '...') return 'i-lucide-more-horizontal';
if (filename === '...') return 'lucide-more-horizontal';
if (filename.endsWith('/')) return defaultIcons.folder;
const parts = filename.split('.');

View File

@@ -14,7 +14,7 @@
<!-- 箭头仅文件夹且有子项时显示 -->
<Icon
v-if="showArrow && item.isFolder && item.children && item.children.length > 0"
:name="isExpanded ? 'i-lucide-chevron-down' : 'i-lucide-chevron-right'"
:name="isExpanded ? 'lucide-chevron-down' : 'lucide-chevron-right'"
class="mr-1 text-gray-400 w-4 h-4 transition-transform"
:class="{ 'rotate-90': isExpanded }"
/>
@@ -23,7 +23,7 @@
<!-- 图标 -->
<Icon
v-if="showIcon"
:name="item.icon || 'i-lucide-file'"
:name="item.icon || 'lucide-file'"
class="mr-2 text-gray-500 w-4 h-4"
:class="{
'text-green-500': item.icon?.includes('vue'),

View File

@@ -5,27 +5,27 @@ const items = ref<NavigationMenuItem[][]>([
[
{
label: 'Guide',
icon: 'i-lucide-book-open',
icon: 'lucide-book-open',
},
{
label: 'Composables',
icon: 'i-lucide-database',
icon: 'lucide-database',
children: [
{
label: 'defineShortcuts',
icon: 'i-lucide-file-text',
icon: 'lucide-file-text',
description: 'Define shortcuts for your application.',
to: '/composables/define-shortcuts'
},
{
label: 'useOverlay',
icon: 'i-lucide-file-text',
icon: 'lucide-file-text',
description: 'Display a modal/slideover within your application.',
to: '/composables/use-overlay'
},
{
label: 'useToast',
icon: 'i-lucide-file-text',
icon: 'lucide-file-text',
description: 'Display a toast within your application.',
to: '/composables/use-toast'
}
@@ -33,42 +33,42 @@ const items = ref<NavigationMenuItem[][]>([
},
{
label: 'Components',
icon: 'i-lucide-box',
icon: 'lucide-box',
to: '/components',
children: [
{
label: 'Link',
icon: 'i-lucide-file-text',
icon: 'lucide-file-text',
description: 'Use NuxtLink with superpowers.',
to: '/components/link'
},
{
label: 'Modal',
icon: 'i-lucide-file-text',
icon: 'lucide-file-text',
description: 'Display a modal within your application.',
to: '/components/modal'
},
{
label: 'NavigationMenu',
icon: 'i-lucide-file-text',
icon: 'lucide-file-text',
description: 'Display a list of links.',
to: '/components/navigation-menu'
},
{
label: 'Pagination',
icon: 'i-lucide-file-text',
icon: 'lucide-file-text',
description: 'Display a list of pages.',
to: '/components/pagination'
},
{
label: 'Popover',
icon: 'i-lucide-file-text',
icon: 'lucide-file-text',
description: 'Display a non-modal dialog that floats around a trigger element.',
to: '/components/popover'
},
{
label: 'Progress',
icon: 'i-lucide-file-text',
icon: 'lucide-file-text',
description: 'Show a horizontal bar to indicate task progression.',
to: '/components/progress'
}
@@ -85,7 +85,7 @@ const items = ref<NavigationMenuItem[][]>([
// },
// {
// label: 'Help',
// icon: 'i-lucide-circle-help',
// icon: 'lucide-circle-help',
// badge: '3.8k',
// disabled: true
// }

View File

@@ -10,13 +10,13 @@ const markdownLink = computed(() => `${window?.location?.origin}/raw${route.path
const items = [
{
label: 'Copy Markdown link',
icon: 'i-lucide-link',
icon: 'lucide-link',
onSelect() {
copy(markdownLink.value)
toast.add({
title: 'Markdown link copied to clipboard',
icon: 'i-lucide-check-circle',
icon: 'lucide-check-circle',
color: 'success',
})
},
@@ -46,7 +46,7 @@ const items = [
<UButtonGroup size="sm">
<UButton
label="Copy page"
:icon="copied ? 'i-lucide-copy-check' : 'i-lucide-copy'"
:icon="copied ? 'lucide-copy-check' : 'lucide-copy'"
color="neutral"
variant="outline"
:ui="{
@@ -68,7 +68,7 @@ const items = [
}"
>
<UButton
icon="i-lucide-chevron-down"
icon="lucide-chevron-down"
color="neutral"
variant="outline"
/>