现实字段的string 比如说是 ShowStr ,你这样写就好了,ShowStr = (ShowStr.length>10)?ShowStr:ShowStr.Substring(0,9)+"....";采纳哦