优化进度条动画
All checks were successful
Gitea Actions Official-website / deploy-dev (push) Successful in 2s
All checks were successful
Gitea Actions Official-website / deploy-dev (push) Successful in 2s
This commit is contained in:
@@ -904,28 +904,6 @@
|
||||
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改动,仅优化性能
|
||||
function animateProgressBars (container){
|
||||
// 性能优化1:用WeakMap管理状态,避免污染DOM属性
|
||||
|
||||
Reference in New Issue
Block a user