fix: gif-player 修复_abort误杀异步回调导致彻底不播放 + 加载中提示

This commit is contained in:
2026-07-22 17:01:53 +08:00
parent f0f5c915d4
commit ca0af6f7d2
3 changed files with 48 additions and 16 deletions

View File

@@ -1,2 +1,22 @@
.gif-player { width: 100%; height: 100%; }
.gif-player { width: 100%; height: 100%; position: relative; }
.canvas { width: 100%; height: 100%; display: block; }
/* 加载中提示:居中、半透明,避免用户误以为动图没播 */
.gif-loading {
position: absolute; left: 0; right: 0; bottom: 24rpx;
display: flex; align-items: center; justify-content: center; gap: 12rpx;
pointer-events: none;
}
.gif-loading__dot {
width: 18rpx; height: 18rpx; border-radius: 999rpx;
background: var(--gold, #c9a24b);
animation: gif-pulse 1s ease-in-out infinite;
}
.gif-loading__txt {
font-size: 22rpx; color: rgba(255,255,255,0.82);
text-shadow: 0 1rpx 4rpx rgba(0,0,0,0.5);
}
@keyframes gif-pulse {
0%, 100% { opacity: 0.35; transform: scale(0.8); }
50% { opacity: 1; transform: scale(1.1); }
}