react headtop title 截取

render() {
    const nav = this.props.nav
    const text = nav && nav.length > 5 ? this.strHandle(nav,5)+'......' : nav;
    return (
       <div className="navhead" onClick={this.props.onHandle}>
        <NavBar
	      mode="dark"
	      icon={<Icon type="left" />}
      	  onLeftClick={() => window.history.back() }
        leftContent="返回"
        style={{background:'#c7010f'}}
	    >{ text }</NavBar>
      </div>
    );
  }

  

posted @ 2017-12-27 09:26  winyh  阅读(356)  评论(0编辑  收藏  举报