fix: 修复过长设定发不出来的。后续用图片

This commit is contained in:
ikechan8370 2023-03-14 20:36:05 +08:00
parent c781df07a1
commit 83c789baf4
3 changed files with 13 additions and 4 deletions

View file

@ -374,3 +374,11 @@ export async function isCN () {
}
}
}
export function limitString(str, maxLength) {
if (str.length <= maxLength) {
return str;
} else {
return str.slice(0, maxLength) + '...';
}
}