js:
Math.ceil();向上舍入,比如Math.ceil(3/2)=2;
Math.floor();向下舍入,比如Math.floor(3/2)=1;
Math.round();四舍五入,比如Math.round(3/2)=2;Math.round(5/2)=2;
vue:
v-for 截取数组
<div v-for="(item, index) in articleList.slice(0,1)"
:key="index">
数组{{index}}
</div>
<div v-for="(item, index) in articleList"
v-if="index < 1"
:key="index">
数组{{index}}
</div>
v-for 循环纯数字
<svg class="icon" aria-hidden="true" v-for="index of 5" :key="index">
</svg>