From 07acb5f4dc11e484801ccfcd95eee8845128c62a Mon Sep 17 00:00:00 2001 From: king <18310653075@163.com> Date: 星期二, 26 十一月 2019 22:41:29 +0800 Subject: [PATCH] 2019-11-26-01 --- src/tabviews/commontable/mainAction/index.jsx | 25 ++++++++----------------- 1 files changed, 8 insertions(+), 17 deletions(-) diff --git a/src/tabviews/commontable/mainAction/index.jsx b/src/tabviews/commontable/mainAction/index.jsx index 49dc310..5ba5f08 100644 --- a/src/tabviews/commontable/mainAction/index.jsx +++ b/src/tabviews/commontable/mainAction/index.jsx @@ -10,7 +10,7 @@ class MainAction extends Component { static propTpyes = { - MenuNo: PropTypes.string, + MenuID: PropTypes.string, actions: PropTypes.array, // 鎼滅储鏉′欢鍒楄〃 dict: PropTypes.object, // 瀛楀吀椤� fixed: PropTypes.any @@ -157,28 +157,19 @@ this.formRef.handleReset() } - UNSAFE_componentWillMount () { - - } - - // shouldComponentUpdate (nextProps, nextState) { - // console.log(!is(fromJS(this.props), fromJS(nextProps)) || !is(fromJS(this.state), fromJS(nextState))) - // return true - // } - render() { if (this.props.fixed) { // 鎸夐挳鏄惁鍥哄畾鍦ㄥご閮� return ( <Affix offsetTop={48}> - <div className="button-list" id={this.props.MenuNo + 'mainaction'}> + <div className="button-list" id={this.props.MenuID + 'mainaction'}> {this.props.actions.map((item, index) => { return ( <Button - className={'mk-btn ' + item.CssClass} - icon={item.Icon} + className={'mk-btn mk-' + item.class} + icon={item.icon} key={'action' + index} onClick={() => {this.actionTrigger(item)}} - >{item.MenuName}</Button> + >{item.label}</Button> ) })} {this.getModels()} @@ -191,11 +182,11 @@ {this.props.actions.map((item, index) => { return ( <Button - className={'mk-btn ' + item.CssClass} - icon={item.Icon} + className={'mk-btn mk-' + item.class} + icon={item.icon} key={'action' + index} onClick={() => {this.actionTrigger(item)}} - >{item.MenuName}</Button> + >{item.label}</Button> ) })} </div> -- Gitblit v1.8.0