html:
<span v-for="i in numArr">{{i}}</span>
data: numArr: [], methods: perNum() { var $random2 = parseInt(Math.random() * 5) + 1; this.$randomPer += $random2; this.$obj = String(this.$randomPer); this.numArr = this.$obj.split(''); setTimeout(this.perNum, 2000); } created: this.$randomPer = parseInt(((new Date().getTime() - new Date(new Date().setHours(0, 0, 0, 0)).getTime()) / 1000)) + 1000; this.perNum();
效果: