可以使用countupjs
cnpm i countup.js --save
import { CountUp } from 'countup'; const countUp1 = new CountUp('userTotal', 5234); if (!countUp1.error) { countUp1.start(); } else { console.error(countUp1.error); }
← 1px 滚动条 →