From 842a8ab561c2ed0b3e88bd67be3f55527a76851f Mon Sep 17 00:00:00 2001 From: ccbikai Date: Mon, 23 Dec 2024 20:57:16 +0800 Subject: [PATCH] feat: Add link search function --- components/dashboard/Nav.vue | 4 +- components/dashboard/links/Index.vue | 9 +- components/dashboard/links/Search.vue | 88 ++++++++ components/ui/badge/Badge.vue | 16 ++ components/ui/badge/index.ts | 25 ++ components/ui/command/Command.vue | 30 +++ components/ui/command/CommandDialog.vue | 21 ++ components/ui/command/CommandEmpty.vue | 20 ++ components/ui/command/CommandGroup.vue | 29 +++ components/ui/command/CommandInput.vue | 33 +++ components/ui/command/CommandItem.vue | 26 +++ components/ui/command/CommandList.vue | 27 +++ components/ui/command/CommandSeparator.vue | 23 ++ components/ui/command/CommandShortcut.vue | 14 ++ components/ui/command/index.ts | 9 + package.json | 2 + pnpm-lock.yaml | 251 ++++++++++++++++++++- server/api/link/create.post.ts | 2 + server/api/link/edit.put.ts | 4 +- server/api/link/search.get.ts | 73 ++++++ 20 files changed, 695 insertions(+), 11 deletions(-) create mode 100644 components/dashboard/links/Search.vue create mode 100644 components/ui/badge/Badge.vue create mode 100644 components/ui/badge/index.ts create mode 100644 components/ui/command/Command.vue create mode 100644 components/ui/command/CommandDialog.vue create mode 100644 components/ui/command/CommandEmpty.vue create mode 100644 components/ui/command/CommandGroup.vue create mode 100644 components/ui/command/CommandInput.vue create mode 100644 components/ui/command/CommandItem.vue create mode 100644 components/ui/command/CommandList.vue create mode 100644 components/ui/command/CommandSeparator.vue create mode 100644 components/ui/command/CommandShortcut.vue create mode 100644 components/ui/command/index.ts create mode 100644 server/api/link/search.get.ts diff --git a/components/dashboard/Nav.vue b/components/dashboard/Nav.vue index 2c1fa5d..814eec0 100644 --- a/components/dashboard/Nav.vue +++ b/components/dashboard/Nav.vue @@ -3,7 +3,7 @@ const route = useRoute() diff --git a/components/dashboard/links/Index.vue b/components/dashboard/links/Index.vue index 35b6611..1ae1edf 100644 --- a/components/dashboard/links/Index.vue +++ b/components/dashboard/links/Index.vue @@ -42,9 +42,12 @@ function updateLinkList(link, type) {