GithubHelp home page GithubHelp logo

duanguang / middle-core Goto Github PK

View Code? Open in Web Editor NEW
0.0 2.0 0.0 114 KB

主要封装一些一些通用的工具函数方法,如http请求(get,post),react by router,实体映射,store操作类等。

JavaScript 100.00%

middle-core's Introduction

middle-core

主要封装一些一些通用的工具函数方法,如http请求(get,post),react by router,实体映射,store操作类等。

use

npm install legions --save 
 or
yarn add legions

API

  • classnames
    import classnames from 'legions/classnames'
    
  • create
    import create from 'legions';
    const app = create({router: true,history:false});//history :false createHashHistory
    app.start(App, '#app2'); //App 容器组件
    
  • invariant
    import invariant from 'legions/invariant'
    
  • warning
    import warning from 'legions/warning'
    
  • store
    import {computed,action,observable,autorun,asMap} from 'middle-core/lib/store';//直接暴露mobx里面API接口
    
    import {Lifecycle} from 'legions/store'; //状态周期 {Application: 0, History: 1, Location: 2};
    
    import {resource} from 'legions/store';//事件操作类 一般我们定义事件操作有三种Created,Updated,Deleted
    
  • store-react
    import { observer , bind } from 'legions/store-react' ; 
    // bind 我们重写了mobx-react inject,observer 参考mobx-react
    
  • request
    import {post,get} from 'legions/request';
    get('url',parms,headerOptions) //返回值:Promise
    post('url',parms,headerOptions) // 返回值:Promise
    
  • json-mapper-object
    import {JsonProperty,MapperEntity} from 'legions/json-mapper-object';
    
  • observableViewModel
    import {observablePromise} from "legions/store-utils";

Licensing

MIT license

middle-core's People

Contributors

duanguang 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.