mirror of
https://github.com/songquanpeng/one-api.git
synced 2025-09-28 06:06:39 +08:00
6 lines
136 B
JavaScript
6 lines
136 B
JavaScript
export function renderText(text, limit) {
|
|
if (text.length > limit) {
|
|
return text.slice(0, limit - 3) + '...';
|
|
}
|
|
return text;
|
|
} |