完善uniapp
This commit is contained in:
@@ -111,7 +111,7 @@ function clearSearch() {
|
||||
}
|
||||
|
||||
function preview(content) {
|
||||
const text = (content || '').replace(/\s+/g, ' ').trim()
|
||||
const text = (content || '').replace(/<[^>]+>/g, '').replace(/ /g, ' ').replace(/\s+/g, ' ').trim()
|
||||
if (!text) return '暂无内容'
|
||||
return text.length > 60 ? `${text.slice(0, 60)}...` : text
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user