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