gm-util

5.12.9 • Public • Published

gm-util

Request

Request RequestInterceptor

timeSync

timeSync

param

废弃,使用query-string

isElementInViewport

element整个界面是否在视窗内

isElementInViewport

element是否存在界面在视窗内

is

  • weixin
  • mac

contains

contains(domA, domB) domA 是否包含 domB

getElementPosition

获取元素的位置

Bundle

配合react-router做异步加载的一个组件

processReactRouterProps

react-router从2切4过程中,props会有变动,此方法做个兼容过度,具体见代码

processHistory

同上

keyMirror

keyMirror({A: null}) // 返回 {A: 'A'}

injectStore

配合 mobx 把 store 注入 组件

@injectStore({aStore})
class A extends React.Component {
    render(){
        console.log(this.props.aStore);
        // ...
    }
}

groupByWithIndex

迁移 lodash 的时候 xxxBy 方法并没有提供所有, 估这里封装下

Readme

Keywords

none

Package Sidebar

Install

npm i gm-util

Weekly Downloads

15

Version

5.12.9

License

ISC

Unpacked Size

68.1 kB

Total Files

52

Last publish

Collaborators

  • gmfe