Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

【开源自荐】Tushan: 五分钟构建一个后台管理平台 #3194

Open
moonrailgun opened this issue Jun 17, 2023 · 0 comments
Open

【开源自荐】Tushan: 五分钟构建一个后台管理平台 #3194

moonrailgun opened this issue Jun 17, 2023 · 0 comments
Labels

Comments

@moonrailgun
Copy link

简介

Tushan 是一个自由度极高的,基于React的,开箱即用的后台管理应用前端框架。

作为开发者, 你可以像是调用库一样快速创建一个可用的后台管理框架,包含了常见的增删改查等常规行为以及过滤、导出等常见需求。通过 Tushan 你可以把精力更多的放在核心的业务上而不是后台管理上。

一个简单的 Tushan 应用大概会长成以下样子:

import {
  createTextField,
  createEmailField,
  createUrlField,
  jsonServerProvider,
  ListTable,
  Resource,
  Tushan,
} from 'tushan';

const dataProvider = jsonServerProvider('https://jsonplaceholder.typicode.com');

function App() {
  return (
    <Tushan
      basename="/admin"
      dataProvider={dataProvider}
    >
      <Resource
        name="users"
        label="User"
        list={
          <ListTable
            fields={[
              createTextField('id', {
                label: 'ID',
              }),
              createTextField('name', {
                label: 'Name',
                list: {
                  sort: true,
                },
              }),
              createEmailField('email', {
                label: 'Email',
              }),
              createUrlField('website', {
                label: 'Website',
              }),
            ]}
            action={{ create: true, detail: true, edit: true, delete: true }}
          />
        }
      />
    </Tushan>
  );
}

export default App;

我们可以通过指定字段的类型来决定数据表格的表现形式,并且内置实现了常规的增删改查等操作。帮助开发者快速产出一个后端应用的 MVP。

效果预览

image

image

image

image

项目地址

https://github.com/msgbyte/tushan

官方文档

https://tushan.msgbyte.com/

@ruanyf ruanyf added the weekly label Jun 22, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants