|
@@ -412,7 +412,19 @@ const TaskModal: React.FC<Props> = ({ initialValues, visible, onChange, onClose
|
|
<Form.Item
|
|
<Form.Item
|
|
label={<strong>素材尺寸</strong>}
|
|
label={<strong>素材尺寸</strong>}
|
|
name="size"
|
|
name="size"
|
|
- rules={[{ required: true, message: '请选择素材比例!' }]}
|
|
|
|
|
|
+ rules={[
|
|
|
|
+ {
|
|
|
|
+ required: true,
|
|
|
|
+ validator: async (rule, value) => {
|
|
|
|
+ if (!value?.[0]) {
|
|
|
|
+ throw new Error('请填写最小尺寸!');
|
|
|
|
+ }
|
|
|
|
+ if (!value?.[1]) {
|
|
|
|
+ throw new Error('请填写最大尺寸!');
|
|
|
|
+ }
|
|
|
|
+ },
|
|
|
|
+ },
|
|
|
|
+ ]}
|
|
>
|
|
>
|
|
<Interval unit="*" placeholder={['720', '1280']} />
|
|
<Interval unit="*" placeholder={['720', '1280']} />
|
|
</Form.Item>
|
|
</Form.Item>
|
|
@@ -420,7 +432,19 @@ const TaskModal: React.FC<Props> = ({ initialValues, visible, onChange, onClose
|
|
label={<strong>素材大小</strong>}
|
|
label={<strong>素材大小</strong>}
|
|
name="extent"
|
|
name="extent"
|
|
tooltip="单位(MB)"
|
|
tooltip="单位(MB)"
|
|
- rules={[{ required: true, message: '请选择素材比例!' }]}
|
|
|
|
|
|
+ rules={[
|
|
|
|
+ {
|
|
|
|
+ required: true,
|
|
|
|
+ validator: async (rule, value) => {
|
|
|
|
+ if (!value?.[0]) {
|
|
|
|
+ throw new Error('请填写最小素材大小!');
|
|
|
|
+ }
|
|
|
|
+ if (!value?.[1]) {
|
|
|
|
+ throw new Error('请填写最大素材大小!');
|
|
|
|
+ }
|
|
|
|
+ },
|
|
|
|
+ },
|
|
|
|
+ ]}
|
|
>
|
|
>
|
|
<Interval placeholder={['20M', '40M']} />
|
|
<Interval placeholder={['20M', '40M']} />
|
|
</Form.Item>
|
|
</Form.Item>
|