|
@@ -285,10 +285,24 @@ const AddPunlishPlanModal: React.FC<AddPunlishPlanModalProps> = ({ visible, isSu
|
|
|
{
|
|
{
|
|
|
selectVideoType === 0 ?
|
|
selectVideoType === 0 ?
|
|
|
(<div className="flex flex-wrap gap-4 max-h-[660px] overflow-y-auto pr-2">
|
|
(<div className="flex flex-wrap gap-4 max-h-[660px] overflow-y-auto pr-2">
|
|
|
- {selectedVideos.map((video) => (
|
|
|
|
|
|
|
+ {selectedVideos.map((video, index) => (
|
|
|
<Card
|
|
<Card
|
|
|
key={video.videoId}
|
|
key={video.videoId}
|
|
|
className="w-[240px] relative group"
|
|
className="w-[240px] relative group"
|
|
|
|
|
+ draggable
|
|
|
|
|
+ onDragStart={(e) => e.dataTransfer.setData('index', index.toString())}
|
|
|
|
|
+ onDragOver={(e) => e.preventDefault()}
|
|
|
|
|
+ onDrop={(e) => {
|
|
|
|
|
+ const fromIndex = parseInt(e.dataTransfer.getData('index'));
|
|
|
|
|
+ if (fromIndex !== index) {
|
|
|
|
|
+ setSelectedVideos(prev => {
|
|
|
|
|
+ const newVideos = [...prev];
|
|
|
|
|
+ const [draggedVideo] = newVideos.splice(fromIndex, 1);
|
|
|
|
|
+ newVideos.splice(index, 0, draggedVideo);
|
|
|
|
|
+ return newVideos;
|
|
|
|
|
+ });
|
|
|
|
|
+ }
|
|
|
|
|
+ }}
|
|
|
>
|
|
>
|
|
|
<Button
|
|
<Button
|
|
|
shape="circle"
|
|
shape="circle"
|
|
@@ -324,7 +338,7 @@ const AddPunlishPlanModal: React.FC<AddPunlishPlanModalProps> = ({ visible, isSu
|
|
|
</div>
|
|
</div>
|
|
|
</Card>
|
|
</Card>
|
|
|
))}
|
|
))}
|
|
|
-
|
|
|
|
|
|
|
+
|
|
|
{/* Add Video Button - Conditionally Rendered */}
|
|
{/* Add Video Button - Conditionally Rendered */}
|
|
|
{selectedVideos.length < (planType === GzhPlanType.自动回复 ? 3 : 20) && (
|
|
{selectedVideos.length < (planType === GzhPlanType.自动回复 ? 3 : 20) && (
|
|
|
<div
|
|
<div
|