优化进度条动画
All checks were successful
Gitea Actions Official-website / deploy-dev (push) Successful in 2s

This commit is contained in:
2025-12-20 15:32:04 +08:00
parent 77e84f1086
commit 64e5c4fe26

View File

@@ -904,28 +904,6 @@
document.addEventListener('DOMContentLoaded', initInterfaceElement); document.addEventListener('DOMContentLoaded', initInterfaceElement);
})(); })();
// 进度条动画
// function animateProgressBars (container)
// {
// if (container._isAnimating) return;
// container._isAnimating = true;
// const progressFills = container.querySelectorAll('.progress-fill');
// progressFills.forEach(fill =>
// {
// clearTimeout(fill._animateTimer);
// fill.style.width = '0';
// fill._animateTimer = setTimeout(() =>
// {
// const targetValue = fill.getAttribute('data-value');
// fill.style.width = targetValue + '%';
// setTimeout(() =>
// {
// container._isAnimating = false;
// }, 500);
// }, 100);
// });
// }
// 进度条动画 - 零HTML改动仅优化性能 // 进度条动画 - 零HTML改动仅优化性能
function animateProgressBars (container){ function animateProgressBars (container){
// 性能优化1用WeakMap管理状态避免污染DOM属性 // 性能优化1用WeakMap管理状态避免污染DOM属性