<div class="swiper-pagination swiper-pagination-fraction">
<div>
<span class="swiper-pagination-current">1</span>
<span class="swiper-pagination-total">5</span>
<span class="swiper-pagination-all">12</span>
</div>
</div>
<script>
document.querySelectorAll("span").forEach(el => el.textContent = el.textContent.padStart(2, "0"))
</script>
бежит время, а ранее мы так делали
el.textContent = ("0" + el.textContent).substr(-2)