Merge branch '20230626-高质量运营-配置页标题文字限制修改' into 'master'

【生产】7.3版本同步到Master 高质量运营-配置页标题文字限制修改

See merge request eshop/fe_service_ebtp_frontend!293
This commit is contained in:
jl-zhoujl2
2023-07-05 01:31:14 +00:00

View File

@ -18,6 +18,7 @@ const validateMessages = {
};
const modalHeight = window.innerHeight * 96 / 100;
const InsertNumMap = [20, 25, 21, 60, 46];//字数限制
interface EventMaintenanceModalProps {
modalVisible: boolean;
@ -128,6 +129,7 @@ const EventMaintenanceModal: React.FC<EventMaintenanceModalProps> = (props) => {
})
};
const onTypeChage = (value: any) => {
typeSelect != '' && form.resetFields(["title"]);
setTypeSelect(value);
};
@ -193,17 +195,18 @@ const EventMaintenanceModal: React.FC<EventMaintenanceModalProps> = (props) => {
<Form.Item
name="title"
label="标题名称"
rules={[{ required: !readOnly }, { max: typeSelect == "2" || typeSelect == "" ? 18 : 30, message: `此项不允许超过${typeSelect == "2" || typeSelect == "" ? 18 : 30}个汉字` }]}
tooltip={`此项不允许超过${typeSelect == "2" || typeSelect == "" ? 18 : 30}个汉字`}
rules={[{ required: !readOnly }, { max: typeSelect == "" ? InsertNumMap[0] : InsertNumMap[typeSelect], message: `此项不允许超过${typeSelect == "" ? InsertNumMap[0] : InsertNumMap[typeSelect]}个汉字` }]}
tooltip={`此项不允许超过${typeSelect == "" ? InsertNumMap[0] : InsertNumMap[typeSelect]}个汉字`}
>
<Input disabled={readOnly} placeholder={`请填写标题(不超过${typeSelect == "2" || typeSelect == "" ? 18 : 30}个汉字)`} />
<Input disabled={readOnly} placeholder={`请填写标题(不超过${typeSelect == "" ? InsertNumMap[0] : InsertNumMap[typeSelect]}个汉字)`} />
</Form.Item>
{(typeSelect == "2" || typeSelect == "4") && <Form.Item
name="secordTitle"
label="副标题名称"
rules={[{ max: 120, message: `此项不允许超过120个汉字` }]}
tooltip="此项不超过120个汉字"
>
<TextArea autoSize maxLength={120} disabled={readOnly} placeholder="请填写副标题不超过120个汉字" />
<TextArea autoSize disabled={readOnly} placeholder="请填写副标题不超过120个汉字" />
</Form.Item>}
{(isNotEmpty(typeSelect) && typeSelect != "3" && typeSelect != "4") && <Form.Item
name="image"