v0.16.0: 后台体验升级——i18n(默认英文)/浅深主题/字号放大/关站维护页/个人设置(头像·语言·主题·密码·MCP Token)/权限管理(菜单+MCP·API)/询盘抽屉翻倍+PHP序列化数据清洗(22.7万行)+去裸JSON

This commit is contained in:
bigcode
2026-11-05 01:46:00 +08:00
parent c3df5d9db1
commit a018019504
47 changed files with 3008 additions and 830 deletions
+20 -1
View File
@@ -15,6 +15,7 @@ import { mkdirSync, writeFileSync } from "node:fs";
import { renderToString } from "react-dom/server";
import { renderToString as _r } from "react-dom/server";
import {
Alert,
App,
Avatar,
Button,
@@ -23,6 +24,7 @@ import {
ConfigProvider,
Descriptions,
Drawer,
Dropdown,
Empty,
Form,
Image,
@@ -31,6 +33,7 @@ import {
Layout,
Menu,
Modal,
Pagination,
Popconfirm,
Row,
Select,
@@ -40,13 +43,15 @@ import {
Table,
Tabs,
Tag,
Tooltip,
Tree,
Typography,
} from "antd";
import { createCache, StyleProvider, extractStyle } from "@ant-design/cssinjs";
/** # 成员变量 与 admin.tsx 完全一致的主题配置(改动后必须重新烘焙)
* cssVar.key 固定为 "dusun":变量作用域类名确定,烘焙 CSS 与运行时 DOM 一致 **/
const THEME = { token: { colorPrimary: "#1677ff" }, cssVar: { key: "dusun" } };
const THEME = { token: { colorPrimary: "#1677ff", fontSize: 15 }, cssVar: { key: "dusun" } };
/** # 组件 覆盖后台全部 AntD 组件的样例树(每个组件至少渲染一次以注册其样式) **/
function Showcase() {
@@ -158,6 +163,20 @@ function Showcase() {
<Drawer open title="抽屉" width={120}>
内容
</Drawer>
{/* v0.16.0 后台新增组件:Dropdown(用户菜单)/ Tooltip(编辑器工具栏)/ Tree(权限页)/ Alert / Pagination */}
<Dropdown menu={{ items: [{ key: "a", label: "菜单项" }] }} open>
<Button>下拉</Button>
</Dropdown>
<Tooltip title="提示" open>
<span>悬停</span>
</Tooltip>
<Tree
checkable
defaultExpandAll
treeData={[{ title: "分组", key: "g", children: [{ title: "子项", key: "c" }] }]}
/>
<Alert type="info" showIcon message="提示" style={{ marginTop: 8 }} />
<Pagination size="small" total={50} style={{ marginTop: 8 }} />
</Layout.Content>
<Layout.Footer>F</Layout.Footer>
</Layout>