mirror of
https://github.com/Jerryplusy/rc-plugin.git
synced 2025-10-14 08:09:19 +00:00
🎈 pref: V1.5.8 优化哔哩哔哩简介限制算法
This commit is contained in:
parent
4f7d31c124
commit
698a64e179
@ -6,7 +6,7 @@ translateAppId: '' # 百度翻译APP ID
|
||||
translateSecret: '' # 百度翻译密匙
|
||||
|
||||
biliSessData: '' # 哔哩哔哩的SESSDATA
|
||||
biliIntroLenLimit: 50 # 哔哩哔哩简介长度限制
|
||||
biliIntroLenLimit: 50 # 哔哩哔哩简介长度限制,填 0 或者 -1 可以不做任何限制,显示完整简介
|
||||
biliDuration: 480 # 哔哩哔哩限制的最大视频时长(默认8分钟),单位:秒
|
||||
|
||||
douyinCookie: '' # douyin's cookie, 格式:odin_tt=xxx;sessionid_ss=xxx;ttwid=xxx;passport_csrf_token=xxx;msToken=xxx;
|
@ -105,7 +105,7 @@ export function supportGuoba() {
|
||||
component: "Input",
|
||||
required: false,
|
||||
componentProps: {
|
||||
placeholder: "请输入哔哩哔哩的简介长度限制(默认50个字符)",
|
||||
placeholder: "请输入哔哩哔哩的简介长度限制(默认50个字符),填 0 或者 -1 可以不做任何限制,显示完整简介",
|
||||
},
|
||||
},
|
||||
{
|
||||
|
@ -287,7 +287,9 @@ export function containsChineseOrPunctuation(str) {
|
||||
* @returns {*|string}
|
||||
*/
|
||||
export function truncateString(inputString, maxLength = 50) {
|
||||
if (inputString.length <= maxLength) {
|
||||
if (maxLength === 0 || maxLength === -1) {
|
||||
return inputString;
|
||||
} else if (inputString.length <= maxLength) {
|
||||
return inputString;
|
||||
} else {
|
||||
// 截取字符串,保留前面 maxLength 个字符
|
||||
|
Loading…
x
Reference in New Issue
Block a user