From 121afa8fe5e32f910a7a3db920343a50e1040abd Mon Sep 17 00:00:00 2001 From: elonehoo Date: Mon, 1 Jan 2024 21:24:06 +0800 Subject: [PATCH] feat: add copy url button --- nuxt.config.ts | 1 + pages/index.vue | 12 +++++++++++- styles/input.css | 3 +++ ui/button/Base.vue | 32 +++++++++++++++++++++++++++++++ ui/icon/Base.vue | 9 +++++++++ ui/input/Input.vue | 4 ++-- unocss.config.ts | 47 +++++++++++++++++++++++++++++++++++++++++++--- 7 files changed, 102 insertions(+), 6 deletions(-) create mode 100644 styles/input.css create mode 100644 ui/button/Base.vue create mode 100644 ui/icon/Base.vue diff --git a/nuxt.config.ts b/nuxt.config.ts index 6a86db9..b435c09 100644 --- a/nuxt.config.ts +++ b/nuxt.config.ts @@ -28,6 +28,7 @@ export default defineNuxtConfig({ css: [ '@unocss/reset/tailwind.css', '~/styles/splitpanes.css', + '~/styles/input.css', ], colorMode: { classSuffix: '', diff --git a/pages/index.vue b/pages/index.vue index 5a2af83..7721812 100644 --- a/pages/index.vue +++ b/pages/index.vue @@ -4,6 +4,16 @@ const linkQuery = useRouteQuery('link') diff --git a/styles/input.css b/styles/input.css new file mode 100644 index 0000000..23f4476 --- /dev/null +++ b/styles/input.css @@ -0,0 +1,3 @@ +:root { + --app-ui-c-context: 125, 125, 125; +} diff --git a/ui/button/Base.vue b/ui/button/Base.vue new file mode 100644 index 0000000..bbc992e --- /dev/null +++ b/ui/button/Base.vue @@ -0,0 +1,32 @@ + + + diff --git a/ui/icon/Base.vue b/ui/icon/Base.vue new file mode 100644 index 0000000..ebf13de --- /dev/null +++ b/ui/icon/Base.vue @@ -0,0 +1,9 @@ + + + diff --git a/ui/input/Input.vue b/ui/input/Input.vue index 8c7f97d..991ab96 100644 --- a/ui/input/Input.vue +++ b/ui/input/Input.vue @@ -7,7 +7,7 @@ defineOptions({ const props = withDefaults( defineProps<{ - modelValue?: string | number + modelValue?: string | number | string[] | null icon?: string placeholder?: string disabled?: boolean @@ -28,7 +28,7 @@ const input = useVModel(props, 'modelValue', emit, { passive: true })