Giter Site home page Giter Site logo

rmm's Introduction

rmm

一个管理/后台系统模板,使用:

使用

npm install
npm run start

npm run build

特性

有些简单的封装

serviceFactory

使用 serviceFactory 简化 service 的创建

export default serviceFactory({
  query: 'post /api/roles',
  read: 'get /api/roles/:id',
  create: 'post /api/roles',
  update: 'put /api/roles/:id',
  remove: 'delete /api/roles/:id'
})

modelFactory

使用 modelFactory 简化 model 的创建

const baseModel = modelFactory({
  namespace: 'users',
  service
});

schema mapping

自定义 schema 使界面可配置化

<NormalFormModal schema={schema} editing={editing} data={data} />
schema: {
  name: 'users',
  label: '用户',
  fields: {
    'name': {
      type: 'string',
      label: '用户名',
      rules: [{
        required: true,
        len: 5
      }]
    },
    'nickname': {
      type: 'string',
      label: '昵称'
    },
    'password': {
      type: 'string',
      label: '密码',
      uihint: 'password'
    }
  },
  views: {
    add: ['name', 'nickname', 'password'],
    edit: ['nickname']
  }
}

另外,还有:

  • 导航通过 Router 元数据生成
  • 全局的 async-validator 验证信息替换
  • 以及可能的一些公共的 dispatch

截图

screenshot

screenshot

rmm's People

Contributors

youchant avatar

Stargazers

chengzi avatar

Watchers

James Cloos avatar  avatar

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.