From 57fd14a199a253f49f3c53810490e5d31512b261 Mon Sep 17 00:00:00 2001 From: Corentin Thomasset Date: Tue, 5 Apr 2022 23:23:08 +0200 Subject: [PATCH] feat(page): home page layout --- src/components/ToolCard.vue | 45 +++++++++++++++++++++++++++++++++++++ src/pages/Home.page.vue | 16 ++++++++++--- src/plugins/naive.plugin.ts | 6 +++++ src/tools/index.ts | 1 + 4 files changed, 65 insertions(+), 3 deletions(-) create mode 100644 src/components/ToolCard.vue diff --git a/src/components/ToolCard.vue b/src/components/ToolCard.vue new file mode 100644 index 00000000..75c60857 --- /dev/null +++ b/src/components/ToolCard.vue @@ -0,0 +1,45 @@ + + + + + \ No newline at end of file diff --git a/src/pages/Home.page.vue b/src/pages/Home.page.vue index 7387ac2e..e733507d 100644 --- a/src/pages/Home.page.vue +++ b/src/pages/Home.page.vue @@ -1,11 +1,21 @@ - \ No newline at end of file diff --git a/src/plugins/naive.plugin.ts b/src/plugins/naive.plugin.ts index 86de7fb9..b04df564 100644 --- a/src/plugins/naive.plugin.ts +++ b/src/plugins/naive.plugin.ts @@ -39,10 +39,15 @@ import { NMessageProvider, NPageHeader, NResult, + NH3, + NEllipsis, + NTag, } from 'naive-ui'; const components = [ + NTag, NResult, + NEllipsis, NPageHeader, NMessageProvider, NLayout, @@ -50,6 +55,7 @@ const components = [ NMenu, NDropdown, NH2, + NH3, NP, NAlert, NTooltip, diff --git a/src/tools/index.ts b/src/tools/index.ts index 782478a7..c9889f23 100644 --- a/src/tools/index.ts +++ b/src/tools/index.ts @@ -20,3 +20,4 @@ export const toolsByCategory: ToolCategory[] = [ ]; export const tools = toolsByCategory.flatMap(({ components }) => components); +export const toolsWithCategory = toolsByCategory.flatMap(({ components, name }) => components.map((tool) => ({ category: name, ...tool })));