From 285d6c901d8195735b863a48b6c5535fac30e917 Mon Sep 17 00:00:00 2001 From: justorez Date: Tue, 13 Feb 2024 12:52:10 +0800 Subject: [PATCH] feat: unplugin-icons demo --- src/pages/index.vue | 1 + types/components.d.ts | 1 + vite.config.ts | 2 +- 3 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/pages/index.vue b/src/pages/index.vue index 0aaa64b..7e067e8 100644 --- a/src/pages/index.vue +++ b/src/pages/index.vue @@ -18,6 +18,7 @@ const entrances = routes role="button" class="btn btn-outline" > + {{ entry.text }} diff --git a/types/components.d.ts b/types/components.d.ts index b727579..41f406a 100644 --- a/types/components.d.ts +++ b/types/components.d.ts @@ -8,6 +8,7 @@ export {} declare module 'vue' { export interface GlobalComponents { HelloWorld: typeof import('./../src/components/HelloWorld.vue')['default'] + 'IMdi:linkVariant': typeof import('~icons/mdi/link-variant')['default'] RouterLink: typeof import('vue-router')['RouterLink'] RouterView: typeof import('vue-router')['RouterView'] } diff --git a/vite.config.ts b/vite.config.ts index 18629c0..8edf3a3 100644 --- a/vite.config.ts +++ b/vite.config.ts @@ -50,7 +50,7 @@ export default defineConfig({ resolvers: [IconsResolver()] }), - // https://npmmirror.com/package/unplugin-icons + // https://npmmirror.com/package/unplugin-icons#h-auto-importing // https://icones.js.org Icons({ compiler: 'vue3',