king
2019-11-26 07acb5f4dc11e484801ccfcd95eee8845128c62a
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>