UNPKG

cjd-parkball

Version:

> 中后台业务组件库,中后台就像公园,进入需要买门票(登录),所以以 Parkball(公园球) 命名,公园内必定捕获!作为一个组件库,提供使用方法文档,方便开发者的调用

54 lines (48 loc) 945 B
--- order: 0 title: 基本 title_en: Basic --- 最简单的用法。 The simplest usage. ````jsx import { Affix, Button } from 'antd'; class Demo extends React.Component { state = { top: 10, bottom: 10, } render() { return ( <div> <Affix offsetTop={this.state.top}> <Button type="primary" onClick={() => { this.setState({ top: this.state.top + 10, }); }} > Affix top </Button> </Affix> <br /> <Affix offsetBottom={this.state.bottom}> <Button type="primary" onClick={() => { this.setState({ bottom: this.state.bottom + 10, }); }} > Affix bottom </Button> </Affix> </div> ); } } ReactDOM.render(<Demo />, mountNode); ````