浏览代码

fix 公众号搜索页码

jihuaqiang 2 天之前
父节点
当前提交
929cc14363
共有 1 个文件被更改,包括 5 次插入2 次删除
  1. 5 2
      src/views/publishContent/weGZH/components/videoSelectModal/index.tsx

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

@@ -78,8 +78,9 @@ const VideoSelectModal: React.FC<VideoSelectModalProps> = ({ visible, onClose, o
 
 	const handleSearch = () => {
 		console.log('Searching for:', { category, searchTerm });
-		setCurrentPage(1);
-		getVideoList();
+		const currentPage = 1
+		setCurrentPage(currentPage);
+		getVideoList(currentPage);
 	};
 
 	const handleSelectVideo = (videoId: number) => {
@@ -164,6 +165,8 @@ const VideoSelectModal: React.FC<VideoSelectModalProps> = ({ visible, onClose, o
 							placeholder="搜索视频标题"
 							style={{ width: 200 }}
 							value={searchTerm}
+							onPressEnter={handleSearch}
+							allowClear
 							onChange={e => setSearchTerm(e.target.value)}
 						/>
 					</div>