fix: 修复选集点击偏移问题,调整跳过配置面板位置以避免覆盖

This commit is contained in:
katelya
2025-09-03 21:52:08 +08:00
parent 9aeef4bc63
commit f0bbcf00dc
4 changed files with 87 additions and 12 deletions
+3 -8
View File
@@ -321,7 +321,7 @@ const EpisodeSelector: React.FC<EpisodeSelectorProps> = ({
</div>
{/* 集数网格 */}
<div className='flex flex-wrap justify-start gap-3 overflow-y-auto h-full pb-4'>
<div className='grid grid-cols-[repeat(auto-fill,minmax(40px,1fr))] auto-rows-[40px] gap-x-3 gap-y-3 overflow-y-auto h-full pb-4'>
{(() => {
const len = currentEnd - currentStart + 1;
const episodes = Array.from({ length: len }, (_, i) =>
@@ -333,18 +333,13 @@ const EpisodeSelector: React.FC<EpisodeSelectorProps> = ({
return (
<button
key={episodeNumber}
onClick={(e) => {
e.preventDefault();
e.stopPropagation();
handleEpisodeClick(episodeNumber);
}}
className={`w-12 h-10 flex items-center justify-center text-sm font-medium rounded-md transition-all duration-200 cursor-pointer border-0 outline-none focus:ring-2 focus:ring-green-400 flex-shrink-0
onClick={() => handleEpisodeClick(episodeNumber)}
className={`h-10 flex items-center justify-center text-sm font-medium rounded-md transition-all duration-200
${
isActive
? 'bg-green-500 text-white shadow-lg shadow-green-500/25 dark:bg-green-600'
: 'bg-gray-200 text-gray-700 hover:bg-gray-300 hover:scale-105 dark:bg-white/10 dark:text-gray-300 dark:hover:bg-white/20'
}`.trim()}
type="button"
>
{episodeNumber}
</button>