Commit 8478b05c authored by 前端-黄佳鑫's avatar 前端-黄佳鑫

fix: 修复bug 注册必填带星号 20568

parent 7a77a892
......@@ -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: '*';
}
}
}
......@@ -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}`,
......
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 to comment