From d7dfd79a26b7732aedf0e5a49723e4fc16015cdb Mon Sep 17 00:00:00 2001
From: LCJ-MinYa <1049468118@qq.com>
Date: Thu, 31 Jul 2025 13:59:48 +0800
Subject: [PATCH] =?UTF-8?q?feat:=20=E5=B7=A5=E5=85=B7=E5=AF=BC=E8=88=AA?=
=?UTF-8?q?=E9=A1=B5?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/router/modules/home.ts | 42 +++----
src/router/modules/template.ts | 2 +-
src/router/modules/tool.ts | 23 ++++
src/views/demo/virtualList.vue | 2 +-
src/views/tool/nav/index.vue | 217 +++++++++++++++++++++++++++++++++
5 files changed, 263 insertions(+), 23 deletions(-)
create mode 100644 src/router/modules/tool.ts
create mode 100644 src/views/tool/nav/index.vue
diff --git a/src/router/modules/home.ts b/src/router/modules/home.ts
index 842dbfc..36784e8 100644
--- a/src/router/modules/home.ts
+++ b/src/router/modules/home.ts
@@ -1,25 +1,25 @@
const { VITE_HIDE_HOME } = import.meta.env;
-const Layout = () => import("@/layout/index.vue");
+const Layout = () => import('@/layout/index.vue');
export default {
- path: "/",
- name: "Home",
- component: Layout,
- redirect: "/welcome",
- meta: {
- icon: "ep:home-filled",
- title: "首页",
- rank: 0
- },
- children: [
- {
- path: "/welcome",
- name: "Welcome",
- component: () => import("@/views/welcome/index.vue"),
- meta: {
- title: "首页",
- showLink: VITE_HIDE_HOME === "true" ? false : true
- }
- }
- ]
+ path: '/',
+ name: 'Home',
+ component: Layout,
+ redirect: '/welcome',
+ meta: {
+ icon: 'ep:house',
+ title: '首页',
+ rank: 0,
+ },
+ children: [
+ {
+ path: '/welcome',
+ name: 'Welcome',
+ component: () => import('@/views/welcome/index.vue'),
+ meta: {
+ title: '首页',
+ showLink: VITE_HIDE_HOME === 'true' ? false : true,
+ },
+ },
+ ],
} satisfies RouteConfigsTable;
diff --git a/src/router/modules/template.ts b/src/router/modules/template.ts
index 60f24a6..a4f5109 100644
--- a/src/router/modules/template.ts
+++ b/src/router/modules/template.ts
@@ -6,7 +6,7 @@ export default {
component: Layout,
redirect: '/template/base',
meta: {
- icon: 'ep:house',
+ icon: 'ep:set-up',
title: '模版页面',
rank: 2,
},
diff --git a/src/router/modules/tool.ts b/src/router/modules/tool.ts
new file mode 100644
index 0000000..91f420c
--- /dev/null
+++ b/src/router/modules/tool.ts
@@ -0,0 +1,23 @@
+const Layout = () => import('@/layout/index.vue');
+
+export default {
+ path: '/tool',
+ name: 'Tool',
+ component: Layout,
+ redirect: '/tool/nav',
+ meta: {
+ icon: 'ep:rank',
+ title: '工具页面',
+ rank: 1,
+ },
+ children: [
+ {
+ path: '/tool/nav',
+ name: 'ToolNav',
+ component: () => import('@/views/tool/nav/index.vue'),
+ meta: {
+ title: '工具导航',
+ },
+ },
+ ],
+} satisfies RouteConfigsTable;
diff --git a/src/views/demo/virtualList.vue b/src/views/demo/virtualList.vue
index 3d165d3..7ef7833 100644
--- a/src/views/demo/virtualList.vue
+++ b/src/views/demo/virtualList.vue
@@ -30,7 +30,7 @@
import { ref, computed, onMounted } from 'vue';
/** 原始数据列表 */
-const dataList = Array.from({ length: 1000 }, (_, i) => ({ id: i, text: `Item ${i}` }));
+const dataList = Array.from({ length: 10000 }, (_, i) => ({ id: i, text: `Item ${i}` }));
/** 虚拟列表单条item的高度 */
const itemHeight = 100;
/** 虚拟列表的总高度 */
diff --git a/src/views/tool/nav/index.vue b/src/views/tool/nav/index.vue
new file mode 100644
index 0000000..9378f4c
--- /dev/null
+++ b/src/views/tool/nav/index.vue
@@ -0,0 +1,217 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
{{ item.name }}
+
+
+
+
+
+
+
+
+
+
+