Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
J
jinfa-platform
Project
Project
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
陈智峰
jinfa-platform
Commits
8478b05c
Commit
8478b05c
authored
Feb 18, 2022
by
前端-黄佳鑫
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: 修复bug 注册必填带星号 20568
parent
7a77a892
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
45 additions
and
0 deletions
+45
-0
index.less
src/pages/user/index.less
+42
-0
index.tsx
src/utils/index.tsx
+3
-0
No files found.
src/pages/user/index.less
View file @
8478b05c
...
...
@@ -332,3 +332,45 @@
}
.is_required {
.mega-layout-item-content {
position: relative;
display: inline-flex;
align-items: center;
max-width: 100%;
// height: 32px;
color: rgba(0, 0, 0, 0.85);
font-size: 12px;
&::before {
display: inline-block;
margin-right: 4px;
color: #ff4d4f;
font-size: 12px;
font-family: SimSun, sans-serif;
line-height: 1;
content: '*';
}
}
}
.no_required {
.mega-layout-item-content {
position: relative;
display: inline-flex;
align-items: center;
max-width: 100%;
// height: 32px;
color: rgba(0, 0, 0, 0.85);
font-size: 12px;
&::before {
display: inline-block;
margin-right: 4px;
color: transparent;
font-size: 12px;
font-family: SimSun, sans-serif;
line-height: 1;
content: '*';
}
}
}
src/utils/index.tsx
View file @
8478b05c
...
...
@@ -419,6 +419,9 @@ export const getFieldType = (field) => {
]
:
[],
// .concat([{ required: field.fieldEmpty === 0 }, { max: field.fieldLength }]),
maxLength
:
field
.
fieldLength
,
'x-props'
:
{
itemClassName
:
field
.
fieldEmpty
===
0
?
'is_required'
:
'no_required'
},
"x-component-props"
:
{
help
:
field
.
fieldRemark
,
placeholder
:
`
${
intl
.
formatMessage
({
id
:
'common.form.input.placeholder'
})}${
field
.
fieldLocalName
||
field
.
fieldCNName
}
`
,
...
...
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