Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
micro-customization-system
/
system
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit 012ee6af
authored
Mar 01, 2022
by
张杰
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
修改角色、用户登录名特殊字符、长度限制
1 parent
238de570
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
3 additions
and
3 deletions
src/utils/common.js
src/views/role/index.vue
src/views/user/index.vue
src/utils/common.js
View file @
012ee6a
...
...
@@ -102,7 +102,7 @@ export const Common = {
* 中文英文数字下划线括号
*/
checkName
(
rule
,
value
,
callback
)
{
var
rxp
=
/^
[\u
4e00-
\u
9fa5_a-zA-Z0-9.
\\
()
\\
()
]
+$/
;
var
rxp
=
/^
[\u
4e00-
\u
9fa5_
-
a-zA-Z0-9.
\\
()
\\
()
]
+$/
;
if
(
!
rule
.
required
)
{
if
(
!
value
)
{
callback
();
...
...
src/views/role/index.vue
View file @
012ee6a
...
...
@@ -284,7 +284,7 @@ export default {
roleName
:
[
{
required
:
true
,
message
:
"请输入角色名称"
,
trigger
:
"blur"
},
{
validator
:
this
.
$Common
.
checkName
,
trigger
:
"blur"
},
{
min
:
5
,
max
:
50
,
message
:
"长度在 5
到 50 个字符"
,
trigger
:
"blur"
}
{
min
:
3
,
max
:
50
,
message
:
"长度在 3
到 50 个字符"
,
trigger
:
"blur"
}
],
enableStatus
:
[{
required
:
true
}],
roleVisibility
:
[
...
...
src/views/user/index.vue
View file @
012ee6a
...
...
@@ -316,7 +316,7 @@ export default {
account
:
[
{
required
:
true
,
message
:
"请输入登录名称"
,
trigger
:
"blur"
},
{
validator
:
this
.
$Common
.
checkName
,
trigger
:
"blur"
},
{
min
:
5
,
max
:
50
,
message
:
"长度在 5
到 50 个字符"
,
trigger
:
"blur"
}
{
min
:
2
,
max
:
50
,
message
:
"长度在 2
到 50 个字符"
,
trigger
:
"blur"
}
],
departmentName
:
[
{
required
:
true
,
message
:
"请选择部门名称"
,
trigger
:
"change"
}
...
...
Write
Preview
Markdown
is supported
Attach a file
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 post a comment