// 要展示的文本(nickName)
this.nickName = '風一樣的女子鳳一樣的我,有想認識嘛~~'
if (this.nickName.length > 10) {
this.nickName = this.nickName.substring(0, 10) + "...";
console.log('00', this.nickName)
}
備注:
substring() 方法用於提取字符串中介於兩個指定下標之間的字符。