0.0.1-alpha01 • Published 4 years ago

jupiter-anui v0.0.1-alpha01

Weekly downloads
-
License
MIT
Repository
-
Last release
4 years ago

该项目是基于 Create React App.

  • public/index.html 项目模板文件;
  • src/index.js 项目入口文件.
  • node(>=8.9.4)

运行:

npm start

启动开发模式 在浏览器打开 http://localhost:3000 .

npm run build

编译项目到build文件夹

浏览器支持情况

默认使用react最新版本

你可以打开react文档到(https://reactjs.org/docs/react-dom.html#browser-support) 获取更多react对浏览器支持信息.

技术栈

react@16.x react-router@4.x react-loadable@1.x webpack@3.8.x antd@3.x axios@0.18 sass

页面生成配置项说明:

{
    "system": "/trade-credit/", // 系统文件夹名称
    "folder": "test-customer",// 当前业务文件夹名称
    // 首页分为三种类型:配置平台(index)、带模糊搜索的(index2)、树形(indexTree)
    "files": ["indexTree", "scss", "modal", "api"],
    "apiKey": "tmColumns", // 后端接口前缀(通常是bean名称)
    "listCfg": { // 首页配置项
        "tableName": "TM_COLUMNS", // index2需要
        "searchKey": "tmColumns",// 查询列表是传入的bean名称
        "searchs": [{// index 需要,搜索条件配置
            "type": "text",
            "name": "username",
            "label": "用户名"
        }],
        "columns": [{ // index 列配置方式
                isIndex: true
            }, {
                title: "用户id",
                dataIndex: "userid"
            }, {
                title: "操作",
                dataIndex: "id",
                key: "action",
                actions: ["edit", "delete"]
            }],
        "columns": {// index2 配置方式
            start: [{ // 列配置
                isIndex: true
            }],
            end: [{
                title: "操作",
                dataIndex: "id",
                key: "action",
                actions: ["edit", "delete"]
            }]
        },
        fields: [{ // indexTree时需要,右侧详细信息
            name: "userid",
            label: "用户id"
        }]
    },
    "formCfg": { // 更改modal表单配置项
        "cols": 1,// 2时为两列排列
        "antdComp": [],// 需要引入的antd 组件
        "jruiComp": ["JRTextbox"],// 需要引入的jrui组件
        "fields": [{ // 表单项
                type: "text",
                label: "文本",
                name: "userid"
            }, {
                type: "date",
                label: "时间",
                name: "dateField"
            },
            {
                type: "int",
                label: "数字",
                name: "num"
            },
            {
                type: "select",
                label: "下拉框",
                name: "selectfield"
            }
        ]
    }
}
``` javascript