From f0953c4a8b01dc1d8825f3d171ecbc92ddd59ec1 Mon Sep 17 00:00:00 2001 From: yuruo Date: Tue, 18 Jun 2024 08:48:44 +0800 Subject: [PATCH] =?UTF-8?q?=F0=9F=94=A7=20=E4=BF=AE=E5=A4=8D(tables.ts)?= =?UTF-8?q?=EF=BC=9A=E6=B3=A8=E9=87=8A=E6=8E=89=E4=B8=8D=E9=9C=80=E8=A6=81?= =?UTF-8?q?=E7=9A=84contents=E8=A1=A8=E5=88=9B=E5=BB=BA=E8=AF=AD=E5=8F=A5?= =?UTF-8?q?=20=20=20=F0=9F=93=9D=20=E6=9B=B4=E6=96=B0(Content.tsx)?= =?UTF-8?q?=EF=BC=9A=E6=9B=B4=E6=96=B0=E5=86=85=E5=AE=B9=E9=A1=B5=E7=9A=84?= =?UTF-8?q?=E8=BE=93=E5=85=A5UI=20=20=20=F0=9F=93=9D=20=E6=9B=B4=E6=96=B0(?= =?UTF-8?q?content.scss)=EF=BC=9A=E6=9B=B4=E6=96=B0=E5=86=85=E5=AE=B9?= =?UTF-8?q?=E9=A1=B5=E6=A0=B7=E5=BC=8F=20=20=20=F0=9F=93=9D=20=E6=9B=B4?= =?UTF-8?q?=E6=96=B0(contentList.scss)=EF=BC=9A=E6=9B=B4=E6=96=B0=E5=86=85?= =?UTF-8?q?=E5=AE=B9=E5=88=97=E8=A1=A8=E9=A1=B5=E6=A0=B7=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ui/autoMate/src/main/db/tables.ts | 18 +++++++++--------- .../src/renderer/src/pages/Content/Content.tsx | 8 ++++++-- .../renderer/src/pages/Content/content.scss | 12 +++++++----- .../src/pages/ContentList/contentList.scss | 2 +- 4 files changed, 23 insertions(+), 17 deletions(-) diff --git a/ui/autoMate/src/main/db/tables.ts b/ui/autoMate/src/main/db/tables.ts index 0f2ebb7..6d4fb11 100644 --- a/ui/autoMate/src/main/db/tables.ts +++ b/ui/autoMate/src/main/db/tables.ts @@ -10,15 +10,15 @@ CREATE TABLE IF NOT EXISTS categories ( `) -db.exec(` -CREATE TABLE IF NOT EXISTS contents ( - id INTEGER PRIMARY KEY AUTOINCREMENT not null, - title TEXT not null, - content TEXT not null, - category_id INTEGER, - created_at TEXT not null -); -`) +// db.exec(` +// CREATE TABLE IF NOT EXISTS contents ( +// id INTEGER PRIMARY KEY AUTOINCREMENT not null, +// title TEXT not null, +// content TEXT not null, +// category_id INTEGER, +// created_at TEXT not null +// ); +// `) // for (let i = 0; i < 20; i++) { // const name = Random.title(5, 10) diff --git a/ui/autoMate/src/renderer/src/pages/Content/Content.tsx b/ui/autoMate/src/renderer/src/pages/Content/Content.tsx index f7e0095..9515f20 100644 --- a/ui/autoMate/src/renderer/src/pages/Content/Content.tsx +++ b/ui/autoMate/src/renderer/src/pages/Content/Content.tsx @@ -1,11 +1,15 @@ import { useLoaderData } from "react-router-dom" import "./content.scss" +import { Button } from "antd" export const Content = () => { const content = useLoaderData() as ContentType return (
-

{content.title}

-
{content.content}
+ +