From 48bf2b21989cb179d07fcb2ad6afacfcc97bea57 Mon Sep 17 00:00:00 2001 From: taoran Date: Mon, 4 Dec 2023 17:57:20 +0800 Subject: [PATCH 1/2] =?UTF-8?q?feat:=20=E9=A6=96=E9=A1=B5=E9=80=82?= =?UTF-8?q?=E9=85=8D=E7=A7=BB=E5=8A=A8=E7=AB=AF=EF=BC=8C=E6=96=B0=E5=A2=9E?= =?UTF-8?q?=E5=B7=A5=E5=85=B7=EF=BC=9A=E9=9A=8F=E6=9C=BA=E5=AF=86=E7=A0=81?= =?UTF-8?q?=E7=94=9F=E6=88=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .env.example | 2 +- mock/tools.ts | 9 ++ src/App.vue | 12 +- src/components/Home/Home.vue | 6 +- src/components/Layout/Header/Header.vue | 64 ++++++-- src/components/Layout/Right/Right.vue | 2 +- .../RandomPassword/RandomPassword.vue | 153 ++++++++++++++++++ src/router/router.ts | 8 + src/utils/string.ts | 19 ++- tailwind.config.js | 8 + 10 files changed, 262 insertions(+), 21 deletions(-) create mode 100644 src/components/RandomPassword/RandomPassword.vue diff --git a/.env.example b/.env.example index b59056b..9c4114f 100644 --- a/.env.example +++ b/.env.example @@ -1,5 +1,5 @@ # 变量必须以 VITE_ 为前缀才能暴露给外部读取 -NODE_ENV = 'dev' +NODE_ENV = 'development' # 网站名称 VITE_APP_TITLE = '工具坊' # 网站域名 diff --git a/mock/tools.ts b/mock/tools.ts index e5b51bb..88928b1 100644 --- a/mock/tools.ts +++ b/mock/tools.ts @@ -81,6 +81,15 @@ function getTools() { url: '/signimage', cateId: 5, cate: '设计工具', + }, + { + id: 1, + title: '随机密码生成', + logo: 'https://fuss10.elemecdn.com/a/3f/3302e58f9a181d2509f3dc0fa68b0jpeg.jpeg', + desc: '密码生成器、随机字符串生成,批量生成', + url: '/random_password', + cateId: 2, + cate: '开发运维', } ] } diff --git a/src/App.vue b/src/App.vue index 9c313ec..52cca75 100644 --- a/src/App.vue +++ b/src/App.vue @@ -8,23 +8,23 @@ import Right from '@/components/Layout/Right/Right.vue'
- - + + - + - + - - + +
diff --git a/src/components/Home/Home.vue b/src/components/Home/Home.vue index ebc8360..5b79972 100644 --- a/src/components/Home/Home.vue +++ b/src/components/Home/Home.vue @@ -27,13 +27,13 @@ onMounted(() => {