|
@@ -169,7 +169,7 @@ const NewText: React.FC<Props> = ({ visible, onClose, onChange, value, textData,
|
|
let count = dynamicMaterialDTos.dynamicGroup.length
|
|
let count = dynamicMaterialDTos.dynamicGroup.length
|
|
let oldtextDto: PULLIN.TextDtoProps[] = JSON.parse(JSON.stringify(textDto))
|
|
let oldtextDto: PULLIN.TextDtoProps[] = JSON.parse(JSON.stringify(textDto))
|
|
let length = oldtextDto.length
|
|
let length = oldtextDto.length
|
|
- if (value === 0) {
|
|
|
|
|
|
+ if (value === 0 || (mediaType === 2 && value === 2)) {
|
|
oldtextDto = [textDto[0] || {}]
|
|
oldtextDto = [textDto[0] || {}]
|
|
} else if (value === 1) {
|
|
} else if (value === 1) {
|
|
if (count > length) {
|
|
if (count > length) {
|
|
@@ -254,7 +254,7 @@ const NewText: React.FC<Props> = ({ visible, onClose, onChange, value, textData,
|
|
</div>
|
|
</div>
|
|
</Card>
|
|
</Card>
|
|
))}
|
|
))}
|
|
- {[3, 2, 4].includes(type) && !(type === 2 && textDto.length >= dynamicMaterialDTos.dynamicGroup.length) && <Form.Item style={{ marginTop: 10, marginBottom: 0 }}>
|
|
|
|
|
|
+ {[3, 2, 4].includes(type) && !(mediaType === 2 && type === 2) && !(type === 2 && textDto.length >= dynamicMaterialDTos.dynamicGroup.length) && <Form.Item style={{ marginTop: 10, marginBottom: 0 }}>
|
|
<Button type="primary" onClick={() => add(newText)} block icon={<PlusOutlined />} disabled={type === 3 && textDto.length >= 30}>
|
|
<Button type="primary" onClick={() => add(newText)} block icon={<PlusOutlined />} disabled={type === 3 && textDto.length >= 30}>
|
|
新增
|
|
新增
|
|
</Button>
|
|
</Button>
|