|
|
@@ -7,6 +7,7 @@ import {
|
|
|
Card,
|
|
|
Typography,
|
|
|
Space,
|
|
|
+ Spin,
|
|
|
message,
|
|
|
Modal,
|
|
|
} from 'antd';
|
|
|
@@ -214,9 +215,10 @@ const VideoSelectModal: React.FC<VideoSelectModalProps> = ({ planType, visible,
|
|
|
onChange={e => setSearchTerm(e.target.value)}
|
|
|
/>
|
|
|
</div>
|
|
|
- <Button type="primary" onClick={handleSearch}>搜索</Button>
|
|
|
+ <Button type="primary" loading={loading} onClick={handleSearch}>搜索</Button>
|
|
|
</div>
|
|
|
|
|
|
+ <Spin spinning={loading}>
|
|
|
<div className="grid grid-cols-1 sm:grid-cols-2 md:grid-cols-3 gap-4">
|
|
|
{videoList.map((video) => {
|
|
|
const isSelected = selectedVideoIds.has(video.videoId);
|
|
|
@@ -257,6 +259,7 @@ const VideoSelectModal: React.FC<VideoSelectModalProps> = ({ planType, visible,
|
|
|
<div ref={sentinelRef} className="text-center py-4 text-gray-400 text-xs">
|
|
|
{loading ? '加载中...' : loadingMore ? '加载中...' : !hasMore && videoList.length > 0 ? '— 没有更多了 —' : ''}
|
|
|
</div>
|
|
|
+ </Spin>
|
|
|
</Drawer>
|
|
|
|
|
|
<Modal
|