From 2a65dc334324944c7ac3f4672a9f67b67d12a04b Mon Sep 17 00:00:00 2001 From: ruotongyu Date: Sun, 16 Jun 2024 09:36:26 +0800 Subject: [PATCH] =?UTF-8?q?=E2=9C=A8=20=E6=B7=BB=E5=8A=A0(category.scss)?= =?UTF-8?q?=EF=BC=9A=E6=9B=B4=E6=96=B0=E9=A1=B5=E9=9D=A2=E5=B8=83=E5=B1=80?= =?UTF-8?q?=E6=A0=B7=E5=BC=8F=20=F0=9F=93=9D=20=E6=B7=BB=E5=8A=A0(index.ts?= =?UTF-8?q?x)=EF=BC=9A=E6=B7=BB=E5=8A=A0=E5=86=85=E5=AE=B9=E9=A1=B5?= =?UTF-8?q?=E9=9D=A2=E7=BB=84=E4=BB=B6=20=F0=9F=93=9D=20=E6=B7=BB=E5=8A=A0?= =?UTF-8?q?(content.scss)=EF=BC=9A=E6=B7=BB=E5=8A=A0=E5=86=85=E5=AE=B9?= =?UTF-8?q?=E9=A1=B5=E9=9D=A2=E6=A0=B7=E5=BC=8F=20=F0=9F=93=9D=20=E6=B7=BB?= =?UTF-8?q?=E5=8A=A0(index.tsx)=EF=BC=9A=E6=B7=BB=E5=8A=A0=E5=86=85?= =?UTF-8?q?=E5=AE=B9=E9=A1=B5=E9=9D=A2=E7=BB=84=E4=BB=B6=20=F0=9F=94=A7=20?= =?UTF-8?q?=E6=B7=BB=E5=8A=A0(router/index.tsx)=EF=BC=9A=E6=9B=B4=E6=96=B0?= =?UTF-8?q?=E8=B7=AF=E7=94=B1=E9=85=8D=E7=BD=AE=EF=BC=8C=E5=B0=86=E5=86=85?= =?UTF-8?q?=E5=AE=B9=E9=A1=B5=E9=9D=A2=E6=B7=BB=E5=8A=A0=E5=88=B0=E5=88=86?= =?UTF-8?q?=E7=B1=BB=E9=A1=B5=E9=9D=A2=E4=B8=AD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/renderer/src/pages/Category/category.scss | 6 +++--- .../src/renderer/src/pages/Category/index.tsx | 13 ++++++++++--- .../src/renderer/src/pages/Content/content.scss | 12 ++++++++++++ .../src/renderer/src/pages/Content/index.tsx | 8 ++++++++ ui/autoMate/src/renderer/src/router/index.tsx | 11 +++++++++-- 5 files changed, 42 insertions(+), 8 deletions(-) create mode 100644 ui/autoMate/src/renderer/src/pages/Content/content.scss create mode 100644 ui/autoMate/src/renderer/src/pages/Content/index.tsx diff --git a/ui/autoMate/src/renderer/src/pages/Category/category.scss b/ui/autoMate/src/renderer/src/pages/Category/category.scss index 2306d5f..8d4bb09 100644 --- a/ui/autoMate/src/renderer/src/pages/Category/category.scss +++ b/ui/autoMate/src/renderer/src/pages/Category/category.scss @@ -3,16 +3,16 @@ display: grid; grid-template: "categories content" auto - "nav content" 30px/120px auto; + "nav content" 30px/100px auto; .categories{ - @apply border-r; + @apply border-r bg-slate-100 text-xs text-slate-700; grid-area: categories; } .nav { - @apply border-t border-r; + @apply border-t border-r bg-slate-100 flex justify-center items-center gap-2; grid-area: nav; } diff --git a/ui/autoMate/src/renderer/src/pages/Category/index.tsx b/ui/autoMate/src/renderer/src/pages/Category/index.tsx index 400c5b6..a610a98 100644 --- a/ui/autoMate/src/renderer/src/pages/Category/index.tsx +++ b/ui/autoMate/src/renderer/src/pages/Category/index.tsx @@ -1,11 +1,18 @@ +import { Outlet } from "react-router-dom" import "./category.scss" +import { Add, DatabaseConfig } from "@icon-park/react" export const Category = () => { return (
-
categories
-
nav
-
content
+
vue.js
+
+ + +
+
+ +
) } \ No newline at end of file diff --git a/ui/autoMate/src/renderer/src/pages/Content/content.scss b/ui/autoMate/src/renderer/src/pages/Content/content.scss new file mode 100644 index 0000000..5f44145 --- /dev/null +++ b/ui/autoMate/src/renderer/src/pages/Content/content.scss @@ -0,0 +1,12 @@ +.content-page{ + @apply h-screen text-xs text-slate-700; + display: grid; + grid-template: "list content" auto / 150px auto; + .list{ + @apply bg-slate-50 border-r; + grid-area: list; + } + .content{ + grid-area: content; + } +} \ No newline at end of file diff --git a/ui/autoMate/src/renderer/src/pages/Content/index.tsx b/ui/autoMate/src/renderer/src/pages/Content/index.tsx new file mode 100644 index 0000000..c2cab8b --- /dev/null +++ b/ui/autoMate/src/renderer/src/pages/Content/index.tsx @@ -0,0 +1,8 @@ +import "./content.scss" + +export const Content = () => { + return (
+
list
+
content
+
) +} \ No newline at end of file diff --git a/ui/autoMate/src/renderer/src/router/index.tsx b/ui/autoMate/src/renderer/src/router/index.tsx index 97d42a3..d123ddf 100644 --- a/ui/autoMate/src/renderer/src/router/index.tsx +++ b/ui/autoMate/src/renderer/src/router/index.tsx @@ -2,6 +2,7 @@ import Config from "@renderer/pages/Config"; import Home from "@renderer/pages/Home"; import { createHashRouter } from "react-router-dom"; import {Category} from "@renderer/pages/Category"; +import { Content } from "@renderer/pages/Content"; const router = createHashRouter([ { @@ -13,9 +14,15 @@ const router = createHashRouter([ element: , children: [ { + path: "", // 界面第一次打开时,默认显示的页面 - index: true, - element: + element: , + children: [ + { + index: true, + element: + } + ] } ] }