20260820223837
This commit is contained in:
1 parent
68ac5db038
commit
45854b0570
48 files changed
+7545
-650
No files matched your search
+25
-27
@@ -1,32 +1,30 @@
|
||||
# React + TypeScript + Vite
|
||||
# FMS 配置中心 Demo
|
||||
|
||||
This template provides a minimal setup to get React working in Vite with HMR and some Oxlint rules.
|
||||
这是一个用于验证 FMS 新系统元数据维护方式的前端演示。业务域和实体在同一棵配置树中展示:业务域表达归属,实体表达数据边界,实体的主从关系可以继续嵌套,普通引用关系在实体详情中配置。
|
||||
|
||||
Currently, two official plugins are available:
|
||||
## 启动
|
||||
|
||||
- [@vitejs/plugin-react](https://github.com/vitejs/vite-plugin-react/blob/main/packages/plugin-react) uses [Oxc](https://oxc.rs)
|
||||
- [@vitejs/plugin-react-swc](https://github.com/vitejs/vite-plugin-react/blob/main/packages/plugin-react-swc) uses [SWC](https://swc.rs/)
|
||||
|
||||
## React Compiler
|
||||
|
||||
The React Compiler is not enabled on this template because of its impact on dev & build performances. To add it, see [this documentation](https://react.dev/learn/react-compiler/installation).
|
||||
|
||||
## Expanding the Oxlint configuration
|
||||
|
||||
If you are developing a production application, we recommend enabling type-aware lint rules by installing `oxlint-tsgolint` and editing `.oxlintrc.json`:
|
||||
|
||||
```json
|
||||
{
|
||||
"$schema": "./node_modules/oxlint/configuration_schema.json",
|
||||
"plugins": ["react", "typescript", "oxc"],
|
||||
"options": {
|
||||
"typeAware": true
|
||||
},
|
||||
"rules": {
|
||||
"react/rules-of-hooks": "error",
|
||||
"react/only-export-components": ["warn", { "allowConstantExport": true }]
|
||||
}
|
||||
}
|
||||
```bash
|
||||
pnpm install
|
||||
pnpm dev
|
||||
```
|
||||
|
||||
See the [Oxlint rules documentation](https://oxc.rs/docs/guide/usage/linter/rules) for the full list of rules and categories.
|
||||
浏览器访问 `http://localhost:3000/`。
|
||||
|
||||
## 使用流程
|
||||
|
||||
1. 在“业务域与实体”中选择或创建业务域,并直接维护该域下的实体、数据源、主键和字段。
|
||||
2. 在“菜单与权限”中维护菜单树。选中菜单后,通过页签同时维护页面绑定、动作权限、角色授权和数据范围。
|
||||
3. 在“角色与用户”中维护角色本身及其成员,具体菜单授权仍在菜单工作区完成。
|
||||
4. 顶部“保存”用于模拟保存配置;菜单权限工作区的“发布”用于模拟发布。
|
||||
|
||||
## 对应核心表
|
||||
|
||||
| 工作区 | 主要表 |
|
||||
| --- | --- |
|
||||
| 业务模型树 | `s_module`、`s_entity`、`s_relation` |
|
||||
| 实体与字段 | `s_entity`、`s_field_group`、`s_field`、`s_field_list`、`s_field_edit`、`s_field_query` |
|
||||
| 菜单与页面 | `s_menu` |
|
||||
| 权限 | `s_role`、`s_user_role`、`s_power`、`s_role_power` |
|
||||
|
||||
Demo 当前使用内存状态模拟维护,不连接后端接口;刷新页面会恢复示例数据。
|
||||
Reference in new issue
Block a user