|
@@ -1,5 +1,5 @@
|
|
|
-import { CloseCircleOutlined, DeleteOutlined, PlusOutlined } from "@ant-design/icons"
|
|
|
-import { Button, Card, Dropdown, Empty, Form, InputNumber, Modal, Popconfirm, Space, message } from "antd"
|
|
|
+import { CloseCircleOutlined, DeleteOutlined, PlusOutlined, RetweetOutlined } from "@ant-design/icons"
|
|
|
+import { Button, Card, Dropdown, Empty, Form, InputNumber, Modal, Popconfirm, Space, Tooltip, message } from "antd"
|
|
|
import React, { useEffect, useState } from "react"
|
|
|
import styles from './index.less'
|
|
|
import VideoNews from "@/pages/launchSystemNew/components/newsModal/videoNews"
|
|
@@ -225,7 +225,20 @@ const AddMaterial: React.FC<Props> = ({ creativeTemplateId, materialData, delive
|
|
|
}, 100)
|
|
|
}}>批量添加图片素材</Button>}
|
|
|
</> : <>
|
|
|
- <InputNumber size="small" min={1} style={{ width: 50 }} value={mCount} max={15} onChange={(e) => setMCount(e || 0)} />
|
|
|
+ <Space size={2}>
|
|
|
+ <InputNumber size="small" min={1} style={{ width: 50 }} value={mCount} max={15} onChange={(e) => setMCount(e || 0)} />
|
|
|
+ {mediaType !== 2 && <Tooltip title="以该数重新分组">
|
|
|
+ <a onClick={() => {
|
|
|
+ const dynamicGroupTotalData = dynamicGroup?.reduce((totalData: any[], item: any) => {
|
|
|
+ return totalData.concat(item?.list || [])
|
|
|
+ }, [])
|
|
|
+ const newDynamicGroup = chunkArray1(dynamicGroupTotalData, mCount).map((item: any) => {
|
|
|
+ return { list: item }
|
|
|
+ })
|
|
|
+ form.setFieldsValue({ dynamicGroup: newDynamicGroup })
|
|
|
+ }}><RetweetOutlined /></a>
|
|
|
+ </Tooltip>}
|
|
|
+ </Space>
|
|
|
<Button
|
|
|
type="link"
|
|
|
onClick={() => {
|