最近使用elment ui和vue.js,遇到需要像c:foreach类似的效果,就找了
vue的API:https://cn.vuejs.org/v2/guide/list.html#v-for-with-v-if
element ui:http://element.eleme.io/#/zh-CN/component/input
用法:
{{ index }} - {{ month.C_YEAR_MONTH }} 月度目标
index就是索引,从0开始,v-if="index==0"就是获取数据集合的第一个,如果展示全部就不要加此条件