GithubHelp home page GithubHelp logo

-react-amis-admin's Introduction

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

使用方法

npm i
npm start

即可访问页面

如何新增一个Amis页面?

如果想阅读更多react-amis-admin开发说明,请参考在线文档

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

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

其中schema即amis的JSON代码,具体可以参考 官方文档

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

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.