Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
phsl
/
admin
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
15d4fc2b
authored
Apr 05, 2025
by
徐煜东
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix(bpm):缺少了subString 方法,应该是商城功能改subString这个工具类,不小心影响了bpm的功能
parent
e289d5c9
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
0 deletions
+15
-0
src/utils/index.ts
+15
-0
No files found.
src/utils/index.ts
View file @
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
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment