0.0.2 • Published 4 years ago

ying-react-walk v0.0.2

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

基于 react 的 游走组件, 在线 demo

Installation

npm install ying-react-walk --save

Usage

import React from 'react'
import Walk from 'ying-react-walk'

class Demo extends React.Component {
  onChange(pos){
	  console.log(pos);
  }
  render() {
      return (<Walk onChange={this.onChange}><div>您好!</div></Walk>)
   }
}

API

对于游走组件可以设置一些自定义属性,具体如下:

属性说明类型返回值
onChange位置回调function{X,Y}

License

MIT