Commit 5fe16b42 by 芋道源码 Committed by Gitee

!760 fix(bpm):缺少了subString 方法,应该是商城功能改subString这个工具类,不小心影响了bpm的功能

Merge pull request !760 from 徐煜东/fix-bpm-20250405
parents 94dc68d4 15d4fc2b
......@@ -536,3 +536,18 @@ export const sliceName = (name: string, start: number, end: number) => {
}
return name
}
/**
* 截取字符串
*
* @param str 字符串
* @param start 开始位置
* @param end 结束位置
*/
export const subString = (str: string, start: number, end: number) => {
if (str.length > end) {
return str.slice(start, end)
}
return str
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment