From 736bba9924ddbd5b888dc76026183c0ec2bf656e Mon Sep 17 00:00:00 2001
From: xuewuerduo <53554701+xuewuerduo@users.noreply.github.com>
Date: Tue, 16 Jul 2024 21:24:09 +0800
Subject: [PATCH] =?UTF-8?q?16.=E5=90=8E=E5=8F=B0=E9=A1=B5=E9=9D=A2?=
=?UTF-8?q?=E5=B8=83=E5=B1=80=E5=92=8C=E9=87=8D=E5=AE=9A=E5=90=91=E4=B9=8B?=
=?UTF-8?q?=E5=90=8E=E5=8F=B0=E9=A6=96=E9=A1=B5?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/assets/admin/css/home.css | 48 +++++++++++++++++++++++++++++++++++
src/router/index.js | 4 +++
src/views/admin/home.vue | 16 +++++++++++-
3 files changed, 67 insertions(+), 1 deletion(-)
create mode 100644 src/assets/admin/css/home.css
diff --git a/src/assets/admin/css/home.css b/src/assets/admin/css/home.css
new file mode 100644
index 0000000..b1e22a6
--- /dev/null
+++ b/src/assets/admin/css/home.css
@@ -0,0 +1,48 @@
+* {
+ margin: 0;
+ padding: 0;
+}
+
+body {
+ font-size: 14px;
+}
+
+a {
+ outline: none;
+ text-decoration: none;
+ cursor: pointer;
+}
+
+ul,
+li {
+ list-style: none;
+}
+
+/*.dr-home */
+.dr-home {
+ display: flex;
+ flex-direction: column; /* 容器内元素从上至下排列 */
+ height: 100vh;
+}
+
+.dr-home .header {
+ display: flex;
+ height: 55px;
+ background: #393d49;
+}
+
+.dr-home .main {
+ display: flex;
+ height: calc(100vh - 55px); /* 减去 header 高度 */
+}
+
+.dr-home .main .side {
+ width: 200px;
+ background: #545c64;
+}
+
+.dr-home .main .content {
+ padding: 5px;
+ flex: 1;
+ overflow-y: auto;
+}
diff --git a/src/router/index.js b/src/router/index.js
index 2af7f10..59795eb 100644
--- a/src/router/index.js
+++ b/src/router/index.js
@@ -1,6 +1,10 @@
import { createRouter, createWebHistory } from "vue-router"
import {useAdminStore} from "@/stores/admin/admin.js";
const routes= [
+ {
+ path: "/", //http://localhost:5173/
+ redirect: "/admin" //重定向
+ },
{
path: "/login", // http://localhost:5173/login
component: () => import("@/views/admin/login.vue")
diff --git a/src/views/admin/home.vue b/src/views/admin/home.vue
index a88a518..63ecc0b 100644
--- a/src/views/admin/home.vue
+++ b/src/views/admin/home.vue
@@ -1,9 +1,23 @@
- 后台页面
+