Ver código fonte

单次选视频上限 3 → 20:weCom/weGZH 选视频弹窗 MAX_SELECTION 同步上调,创建/编辑发布弹窗已选区域加 max-h-[660px] 滚动避免高度爆破。

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
刘立冬 1 semana atrás
pai
commit
ffe994df80

+ 2 - 2
src/views/publishContent/weCom/components/addPlanModal/index.tsx

@@ -120,7 +120,7 @@ const AddPlanModal: React.FC<{
 				/>
 			</Form.Item>
 			<Form.Item label="发布内容" required>
-				<div className="flex flex-wrap gap-4">
+				<div className="flex flex-wrap gap-4 max-h-[660px] overflow-y-auto pr-2">
 						{selectedVideos.map((video) => (
 							<Card
 								key={video.videoId}
@@ -167,7 +167,7 @@ const AddPlanModal: React.FC<{
 						))}
 
 						{/* Add Video Button - Conditionally Rendered */}
-						{selectedVideos.length < 3 && (
+						{selectedVideos.length < 20 && (
 							<div
 								className="w-[240px] h-[316px] flex flex-col justify-center items-center  border border-dashed border-gray-300 rounded cursor-pointer dark:border-gray-600  hover:border-blue-500 hover:text-blue-500"
 								onClick={openVideoSelector} // Open the drawer on click

+ 1 - 1
src/views/publishContent/weCom/components/videoSelectModal/index.tsx

@@ -148,7 +148,7 @@ const VideoSelectModal: React.FC<VideoSelectModalProps> = ({ visible, onClose, o
 	const currentPageRef = useRef(1);
 	const getVideoListRef = useRef<(pageNum: number, mode: LoadMode) => Promise<void>>();
 	const reqIdRef = useRef(0);
-	const MAX_SELECTION = 3;
+	const MAX_SELECTION = 20;
 	const { uploadLogVideoPlay, uploadLogVideoPlayEnd, uploadLogVideoCollect, uploadLogVideoListQuery } = useLogger();
 	const debouncedUploadLogVideoListQuery = useMemo(() => debounce(uploadLogVideoListQuery, 500), [uploadLogVideoListQuery]);
 

+ 2 - 2
src/views/publishContent/weGZH/components/publishPlanModal/index.tsx

@@ -284,7 +284,7 @@ const AddPunlishPlanModal: React.FC<AddPunlishPlanModalProps> = ({ visible, isSu
 					<Form.Item label="发布内容" required>
 						{ 
 							selectVideoType === 0 ?
-								(<div className="flex flex-wrap gap-4">
+								(<div className="flex flex-wrap gap-4 max-h-[660px] overflow-y-auto pr-2">
 									{selectedVideos.map((video) => (
 										<Card
 											key={video.videoId}
@@ -326,7 +326,7 @@ const AddPunlishPlanModal: React.FC<AddPunlishPlanModalProps> = ({ visible, isSu
 									))}
 		
 									{/* Add Video Button - Conditionally Rendered */}
-									{selectedVideos.length < 3 && (
+									{selectedVideos.length < 20 && (
 										<div
 											className={`w-[240px] h-[316px] flex flex-col justify-center items-center border border-dashed rounded ${accountId ? 'border-gray-300 cursor-pointer dark:border-gray-600 hover:border-blue-500 hover:text-blue-500' : 'border-gray-200 text-gray-300 cursor-not-allowed bg-gray-50'}`}
 											onClick={openVideoSelector} // Open the drawer on click

+ 1 - 1
src/views/publishContent/weGZH/components/videoSelectModal/index.tsx

@@ -146,7 +146,7 @@ const VideoSelectModal: React.FC<VideoSelectModalProps> = ({ planType, visible,
 	const currentPageRef = useRef(1);
 	const getVideoListRef = useRef<(pageNum: number, mode: LoadMode) => Promise<void>>();
 	const reqIdRef = useRef(0);
-	const MAX_SELECTION = 3;
+	const MAX_SELECTION = 20;
 
 	useEffect(() => { hasMoreRef.current = hasMore; }, [hasMore]);
 	useEffect(() => { loadingRef.current = loading; }, [loading]);