mirror of
https://github.com/yuruotong1/autoMate.git
synced 2026-03-22 13:07:17 +08:00
✨ 添加(ui/autoMate):在Config页面添加Category子页面,并设为默认显示页面
📝 新建(ui/autoMate):添加Category页面的样式文件和组件文件 🔧 更新(ui/autoMate):更新Config页面样式文件,设置nav样式为border-r border-t 🔧 修改(ui/autoMate):在window.ts中修改frame和transparent属性的值
This commit is contained in:
@@ -11,8 +11,8 @@ export function createWindow(): BrowserWindow { // Create the browser window.
|
||||
height: 750,
|
||||
center: true,
|
||||
show: false,
|
||||
// frame: false,
|
||||
// transparent: true,
|
||||
frame: true,
|
||||
transparent: false,
|
||||
// alwaysOnTop: true,
|
||||
autoHideMenuBar: true,
|
||||
...(process.platform === 'linux' ? { icon } : {}),
|
||||
|
||||
22
ui/autoMate/src/renderer/src/pages/Category/category.scss
Normal file
22
ui/autoMate/src/renderer/src/pages/Category/category.scss
Normal file
@@ -0,0 +1,22 @@
|
||||
.category-page{
|
||||
@apply w-screen h-screen;
|
||||
display: grid;
|
||||
grid-template:
|
||||
"categories content" auto
|
||||
"nav content" 30px/120px auto;
|
||||
|
||||
|
||||
.categories{
|
||||
@apply border-r;
|
||||
grid-area: categories;
|
||||
}
|
||||
|
||||
.nav {
|
||||
@apply border-t border-r;
|
||||
grid-area: nav;
|
||||
}
|
||||
|
||||
.content {
|
||||
grid-area: content;
|
||||
}
|
||||
}
|
||||
11
ui/autoMate/src/renderer/src/pages/Category/index.tsx
Normal file
11
ui/autoMate/src/renderer/src/pages/Category/index.tsx
Normal file
@@ -0,0 +1,11 @@
|
||||
import "./category.scss"
|
||||
|
||||
export const Category = () => {
|
||||
return (
|
||||
<main className="category-page">
|
||||
<div className="categories">categories</div>
|
||||
<div className="nav">nav</div>
|
||||
<div className="content">content</div>
|
||||
</main>
|
||||
)
|
||||
}
|
||||
@@ -1,12 +1,8 @@
|
||||
import styles from "./styles.module.scss"
|
||||
import { Outlet } from "react-router-dom"
|
||||
export default function Config(){
|
||||
return (
|
||||
<main className={styles.container}>
|
||||
<div> </div>
|
||||
<div> </div>
|
||||
<div className={styles.category}> </div>
|
||||
<div className={styles.nav}> </div>
|
||||
<div className={styles.content}> </div>
|
||||
<main>
|
||||
<Outlet />
|
||||
</main>
|
||||
)
|
||||
}
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
}
|
||||
&.nav {
|
||||
grid-area: nav;
|
||||
@apply border-r;
|
||||
@apply border-r border-t;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,6 +1,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";
|
||||
|
||||
const router = createHashRouter([
|
||||
{
|
||||
@@ -9,7 +10,14 @@ const router = createHashRouter([
|
||||
},
|
||||
{
|
||||
path: "config",
|
||||
element: <Config />
|
||||
element: <Config />,
|
||||
children: [
|
||||
{
|
||||
// 界面第一次打开时,默认显示的页面
|
||||
index: true,
|
||||
element: <Category />
|
||||
}
|
||||
]
|
||||
}
|
||||
])
|
||||
export default router
|
||||
|
||||
Reference in New Issue
Block a user