1.效果图:
![](https://img-blog.csdnimg.cn/20210824143016912.gif)
2.上代码
<!--
usage:
num:显示的数字
color:字体颜色
width:每个数字的宽度
height:字体高度
fontSize:字体大小
<countup :num="123.453" color="#ff9e50" width='13' height='23' fontSize='23'></countup>
-->
<template>
<view class="number-box">
<block v-for="(myIndex, index) in indexArr" :key="index">
<swiper class="swiper" vertical="true" :current="myIndex" circular="true"
v-bind:style="{color: color,width:myIndex == 10||myIndex == 11 ? '16rpx' : width+'rpx',height:height+'rpx',lineHeight:fontSize+'rpx',fontSize:fontSize+'rpx'}">
<swiper-item>