diff --git a/mock/router.ts b/mock/router.ts
index d4d830d..915a3ea 100644
--- a/mock/router.ts
+++ b/mock/router.ts
@@ -78,6 +78,32 @@ const data = {
},
],
},
+ {
+ path: "/icon",
+ component: "Layout",
+ redirect: "/icon/index",
+ meta: {
+ title: "系统管理",
+ icon: "system",
+ hidden: false,
+ roles: ["ADMIN"],
+ keepAlive: true,
+ },
+ children: [
+ {
+ path: "index",
+ component: "demo/icons",
+ name: "Icons",
+ meta: {
+ title: "图标",
+ icon: "icon",
+ hidden: false,
+ roles: ["ADMIN"],
+ keepAlive: true,
+ },
+ },
+ ],
+ },
{
path: "/api",
component: "Layout",
diff --git a/package.json b/package.json
index b3fc900..20eb1a3 100644
--- a/package.json
+++ b/package.json
@@ -40,6 +40,7 @@
]
},
"dependencies": {
+ "@element-plus/icons-vue": "^2.1.0",
"@vitejs/plugin-vue": "^4.2.3",
"@vueuse/core": "^10.1.2",
"@wangeditor/editor": "^5.1.23",
diff --git a/src/assets/icons/icon.svg b/src/assets/icons/icon.svg
new file mode 100644
index 0000000..82be8ee
--- /dev/null
+++ b/src/assets/icons/icon.svg
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git a/src/router/index.ts b/src/router/index.ts
index 6df76e4..e56190c 100644
--- a/src/router/index.ts
+++ b/src/router/index.ts
@@ -52,6 +52,24 @@ export const constantRoutes: RouteRecordRaw[] = [
],
},
+ {
+ path: "/permission",
+ component: Layout,
+ redirect: "/permission/page",
+ children: [
+ {
+ path: "page",
+ component: () => import("@/views/permission/page.vue"),
+ name: "PermissionPage",
+ meta: {
+ title: "Permission",
+ icon: "password",
+ keepAlive: true,
+ },
+ },
+ ],
+ },
+
// 外部链接
// {
// path: "/external-link",
diff --git a/src/views/demo/icons.vue b/src/views/demo/icons.vue
new file mode 100644
index 0000000..562da5d
--- /dev/null
+++ b/src/views/demo/icons.vue
@@ -0,0 +1,177 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ name }}
+
+
+
+
+
+
+
+
+
+
+
+