import React, { Component } from "react"; import styles from "../index.less"; import $ from 'jquery'; import { windowEventHandler,setFontColorSize } from '@utils/tools'; class AssistName extends Component { constructor(props) { super(props); this.state = { }; this.$assistName = React.createRef(); this.splitName = this.splitName.bind(this); } splitName(name){ let wid = this.props.winWidth; if(name.length>15 && wid>1150){ let tmpStr = name.substr(0,15) return tmpStr+'...' }else{ return name } } render() { const { winWidth, name, getInfomation,normal } = this.props; return ( {name&&this.splitName(name)}: getInfomation({ name: name, position: 1, type: 6 })}> ); } } export default AssistName;