js代码
// 字数限制30字,超出不显示 fontNumber (date) { const length = date.length if (length > 30) { var str = '' str = date.substring(0, 30) + '......' return str } else { return date } }
js代码
// 字数限制30字,超出不显示 fontNumber (date) { const length = date.length if (length > 30) { var str = '' str = date.substring(0, 30) + '......' return str } else { return date } }