aron0524 / react-amis-admin

Home Page:https://amis.iceq.cc

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

react-amis-admin

本仓库主要目的在于提供一个开箱可用的Amis + React 低代码开发环境。支持Amis低代码, 同时支持React原生方式开发或者可选支持Antd等组件来定制复杂页面,本工程不包含后端代码,前后端分离。

项目源码: https://github.com/iceqing/react-amis-admin

在线文档: https://docs.amis.iceq.cc

演示网站: https://amis.iceq.cc

使用方法

npm i
npm start

即可访问页面

如何新增一个Amis页面?

通过Amis只需要写JSON(或者根据拖拽生成的JSON)即可完成开发一个页面,极大减轻了后台页面前端工作量。

1、首先在pages下新增一个Hello.tsx页面

import schema2component from "@/utils/schema2component";

const schema = {
    "type": "page",
    "title": "hello",
    "body": {
        "label": "弹框",
        "type": "button",
        "actionType": "dialog",
        "dialog": {
            "title": "弹框",
            "body": "这是个简单的弹框。"
        }
    }
}

export default schema2component(schema);

2、增加路由配置

path2Compoment文件导入Hello组件

import Hello from "@/pages/Hello";

然后在path2components对象增加路由

{
        path: '/hello',
        component: Hello
}

3、启动项目,测试即可

通过npm start,然后输入 http://localhost:8080/hello即可访问刚刚新建的页面

Amis文档

Amis官方文档: https://baidu.github.io/amis/zh-CN/docs/index

Amis官方可视化编辑器: https://aisuda.github.io/amis-editor-demo/#/hello-world

参考

本仓库灵感来自于以下几个仓库:

https://github.com/baidu/amis

https://github.com/aisuda/amis-admin

https://github.com/aisuda/amis-react-starter

https://github.com/PanJiaChen/vue-element-admin

https://baidu.gitee.io/amis/examples/index

其他

图标网站: https://fontawesome.com/v5.15/icons?d=listing&p=2&s=solid&m=free

About

https://amis.iceq.cc


Languages

Language:TypeScript 90.7%Language:JavaScript 8.5%Language:HTML 0.6%Language:SCSS 0.2%