vue2.0中现有模拟数据,请问拿到数据的时候怎么给数据分类呢?每个id相同的为一类
数据如下
articleList:[
{id:1,name:"小红",user:456312,Occupation:"教练"},
{id:2,name:"小张",user:456321,Occupation:"歌手"},
{id:5,name:"小强",user:456312,Occupation:"老师"},
{id:2,name:"小分",user:456312,Occupation:"同事"},
{id:5,name:"小撒",user:456132,Occupation:"总经理"},
{id:2,name:"小看",user:456132,Occupation:"程序猿"},
{id:5,name:"小贫",user:451632,Occupation:"演员"}
],
每个id相同的是一类,最终页面渲染的时候会把相同一类的渲染在一个div里面,
请大神赐教,
(有多少个不等的id就有几个大的div);
潇潇雨雨
相关分类