// 要展示的文本(nickName) this.nickName = \'风一样的女子凤一样的我,有想认识嘛~~\' if (this.nickName.length > 10) { this.nickName = this.nickName.substring(0, 10) + "..."; console.log(\'00\', this.nickName) } 备注: substring() 方法用于提取字符串中介于两个指定下标之间的字符。 相关文章: 2022-02-27 2021-11-29 2022-12-23 2021-12-25 2021-12-28 2021-10-02 2021-12-25 2021-11-27