Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
S
szse
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
zhaochengxiang
szse
Commits
f64fe1c5
Commit
f64fe1c5
authored
Jun 10, 2023
by
zhaochengxiang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
资产编码限制
parent
5739529f
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
5 deletions
+5
-5
UpdateDirectoryModal.jsx
...iew/Manage/AssetManage/Component/UpdateDirectoryModal.jsx
+5
-5
No files found.
src/view/Manage/AssetManage/Component/UpdateDirectoryModal.jsx
View file @
f64fe1c5
...
...
@@ -15,14 +15,14 @@ const CodeInput = ({ value = '', onChange, restrict = false, action }) => {
const
onCodeChange
=
(
e
)
=>
{
if
(
!
restrict
||
(
restrict
&&
(
e
.
target
.
value
===
''
||
/^
[
a-z
A-Z
]
+$/
.
test
(
e
.
target
.
value
))
restrict
&&
(
e
.
target
.
value
===
''
||
/^
[
A-Z
]
+$/
.
test
(
e
.
target
.
value
))
))
{
onChange
?.(
e
.
target
.
value
);
}
}
return
<
Input
placeholder=
"请输入编号"
placeholder=
"请输入编号
(只允许输入大写英文字母,并且最多3个)
"
disabled=
{
action
!==
'add'
}
maxLength=
{
restrict
?
3
:
null
}
value=
{
value
}
...
...
@@ -173,9 +173,9 @@ const UpdateDirectoryModal = (props) => {
if
(
action
===
'add'
)
{
if
(
changedValues
.
type
===
'theme'
)
{
setIsThemeAdd
(
true
);
if
(
allValues
.
code
?.
length
>
3
||
!
(
/^
[
a-z
A-Z
]
+$/
.
test
(
allValues
.
code
)))
{
form
.
setFieldsValue
({
code
:
''
});
}
// if (allValues.code?.length > 3 || !(/^[
A-Z]+$/.test(allValues.code))) {
//
form.setFieldsValue({ code: '' });
//
}
}
else
if
(
changedValues
.
type
===
'directory'
)
{
setIsThemeAdd
(
false
);
}
...
...
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