完善uniapp
This commit is contained in:
1 parent
61a937f7a3
commit
834c088aa2
29 files changed
+4444
-305
No files matched your search
@@ -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