acdr-ui/dist/dev/mp-weixin/utils/strings.js.map

1 line
642 B
Plaintext

{"version":3,"file":"strings.js","sources":["../../../../src/utils/strings.js"],"sourcesContent":["export function truncateString(str) {\r\n // 设置最大字符长度\r\n const maxLength = 400\r\n\r\n // 检查字符串长度是否超过最大长度\r\n if (str.length > maxLength) {\r\n // 如果超过,截断字符串并添加省略号\r\n return str.substring(0, maxLength) + '...'\r\n }\r\n\r\n // 如果没有超过,直接返回原字符串\r\n return str\r\n}\r\n"],"names":[],"mappings":";AAAO,SAAS,eAAe,KAAK;AAElC,QAAM,YAAY;AAGlB,MAAI,IAAI,SAAS,WAAW;AAE1B,WAAO,IAAI,UAAU,GAAG,SAAS,IAAI;AAAA,EACtC;AAGD,SAAO;AACT;;"}