Просмотр исходного кода

粉丝喜欢/已发优质相似 Tab 暂置灰,Tooltip 提示功能正在完善中

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
刘立冬 4 дней назад
Родитель
Сommit
c50e11c1cc

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

@@ -15,6 +15,7 @@ import {
 	Tabs,
 	Popover,
 	Descriptions,
+	Tooltip,
 } from 'antd';
 import { CheckCircleFilled, CaretRightFilled, HeartOutlined, HistoryOutlined, FireOutlined } from '@ant-design/icons';
 import { VideoListResponse } from '@src/views/publishContent/weGZH/components/types';
@@ -29,10 +30,10 @@ console.log('[VideoSelectModal] MODE=', import.meta.env.MODE, 'IS_NON_PROD=', IS
 
 type LoadMode = 'replace' | 'append' | 'jump';
 
-const SOURCE_TABS = [
+const SOURCE_TABS: { key: string; label: string; disabled?: boolean }[] = [
 	{ key: '', label: '全部' },
-	{ key: 'prior', label: '粉丝喜欢' },
-	{ key: 'posterior', label: '已发优质相似' },
+	{ key: 'prior', label: '粉丝喜欢', disabled: true },
+	{ key: 'posterior', label: '已发优质相似', disabled: true },
 	{ key: 'hot', label: '票圈热门' },
 ];
 const SOURCE_LABEL: Record<string, string> = { prior: '粉丝喜欢', posterior: '已发优质相似', hot: '票圈热门' };
@@ -392,7 +393,13 @@ const VideoSelectModal: React.FC<VideoSelectModalProps> = ({ visible, onClose, o
 				<Tabs
 					activeKey={source}
 					onChange={handleChangeSource}
-					items={SOURCE_TABS.map(t => ({ key: t.key, label: t.label }))}
+					items={SOURCE_TABS.map(t => ({
+						key: t.key,
+						disabled: t.disabled,
+						label: t.disabled
+							? <Tooltip title="功能正在完善中"><span>{t.label}</span></Tooltip>
+							: t.label,
+					}))}
 					className="!mb-3"
 				/>
 				<div className="flex flex-wrap gap-2 mb-6">

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

@@ -15,6 +15,7 @@ import {
 	Tabs,
 	Popover,
 	Descriptions,
+	Tooltip,
 } from 'antd';
 import { CheckCircleFilled, CaretRightFilled, HeartOutlined, HistoryOutlined, FireOutlined } from '@ant-design/icons';
 import { VideoItem, VideoListResponse } from '../types';
@@ -30,10 +31,10 @@ const IS_NON_PROD = import.meta.env.MODE !== 'production';
 
 type LoadMode = 'replace' | 'append' | 'jump';
 
-const SOURCE_TABS = [
+const SOURCE_TABS: { key: string; label: string; disabled?: boolean }[] = [
 	{ key: '', label: '全部' },
-	{ key: 'prior', label: '粉丝喜欢' },
-	{ key: 'posterior', label: '已发优质相似' },
+	{ key: 'prior', label: '粉丝喜欢', disabled: true },
+	{ key: 'posterior', label: '已发优质相似', disabled: true },
 	{ key: 'hot', label: '票圈热门' },
 ];
 const SOURCE_LABEL: Record<string, string> = { prior: '粉丝喜欢', posterior: '已发优质相似', hot: '票圈热门' };
@@ -393,7 +394,13 @@ const VideoSelectModal: React.FC<VideoSelectModalProps> = ({ planType, visible,
 				<Tabs
 					activeKey={source}
 					onChange={handleChangeSource}
-					items={SOURCE_TABS.map(t => ({ key: t.key, label: t.label }))}
+					items={SOURCE_TABS.map(t => ({
+						key: t.key,
+						disabled: t.disabled,
+						label: t.disabled
+							? <Tooltip title="功能正在完善中"><span>{t.label}</span></Tooltip>
+							: t.label,
+					}))}
 					className="!mb-3"
 				/>
 				<div className="flex flex-wrap gap-2 mb-6">