feat: mobile Profile page

This commit is contained in:
Tim
2025-07-18 15:40:04 +08:00
parent 342e944984
commit 8719fcc155
3 changed files with 57 additions and 7 deletions

View File

@@ -16,3 +16,12 @@ export function stripMarkdown(text) {
el.innerHTML = html
return el.textContent || el.innerText || ''
}
export function stripMarkdownLength(text, length) {
const plain = stripMarkdown(text)
if (!length || plain.length <= length) {
return plain
}
// 截断并加省略号
return plain.slice(0, length) + '...'
}