6.26 高质量运营-配置页标题文字限制修改
This commit is contained in:
@ -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"
|
||||
|
Reference in New Issue
Block a user