From adce6d4f64342938794cc2137318f1c2829c5689 Mon Sep 17 00:00:00 2001 From: Uyarn Date: Tue, 9 Jan 2024 19:25:47 +0800 Subject: [PATCH 1/2] chore: fix tdesign style usage --- README.md | 3 --- frontend/src/main.tsx | 4 +++- frontend/tdesign.sh | 7 ------- 3 files changed, 3 insertions(+), 11 deletions(-) delete mode 100644 frontend/tdesign.sh diff --git a/README.md b/README.md index ee32ed8..b9fca70 100644 --- a/README.md +++ b/README.md @@ -65,9 +65,6 @@ float32.app 使用 promptc 标准来实践 prompt 开发的解耦。请参阅 [p ## 前端 -> [!CAUTION] -> 前端需要先运行 `tdesign.sh` 否则会丢失样式。 - 前端使用 pnpm + React + Vite + MobX + TDesign 的结构。请使用以下命令以启动开发服务器: ```bash diff --git a/frontend/src/main.tsx b/frontend/src/main.tsx index a189057..bcf68d8 100644 --- a/frontend/src/main.tsx +++ b/frontend/src/main.tsx @@ -1,10 +1,12 @@ import React from 'react' import ReactDOM from 'react-dom/client' -import './index.css' import {App} from "./App.tsx"; import {createBrowserRouter, RouterProvider} from "react-router-dom"; import {About} from "./About.tsx"; +import 'tdesign-react/es/style/index.css'; // 少量公共样式 +import './index.css' + const router = createBrowserRouter([ { path: "/about", diff --git a/frontend/tdesign.sh b/frontend/tdesign.sh deleted file mode 100644 index 627d10d..0000000 --- a/frontend/tdesign.sh +++ /dev/null @@ -1,7 +0,0 @@ -#!/bin/bash -cd public -rm tdesign.min.css -rm tdesign.min.js -wget https://unpkg.com/tdesign-react/dist/tdesign.min.css -wget https://unpkg.com/tdesign-react/dist/tdesign.min.js -cd .. \ No newline at end of file From e61971b54fd2380819d4a96ceca16cf56fe3d468 Mon Sep 17 00:00:00 2001 From: Xiang Shi <33132228+KevinZonda@users.noreply.github.com> Date: Wed, 10 Jan 2024 11:19:03 +0000 Subject: [PATCH 2/2] chore: comment out not required resource --- frontend/index.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/frontend/index.html b/frontend/index.html index 84f0054..d173a9a 100644 --- a/frontend/index.html +++ b/frontend/index.html @@ -4,8 +4,8 @@ float32: 优雅地探寻未知 - - + +