84669 person learning
152542 person learning
20005 person learning
5487 person learning
7821 person learning
359900 person learning
3350 person learning
180660 person learning
48569 person learning
18603 person learning
40936 person learning
1549 person learning
1183 person learning
32909 person learning
如下:
蒙牛3日 6日 8日 9日 30日伊利4日 5日特仑苏 5日 10日 18日
这种形式应该如何循环?json数组怎么写呢?
认证0级讲师
I will do like this.
html
{{p.value}} {{c.value}}
{{p.value}}
script
$scope.data = [ { key: 1, value: '蒙牛', children: [ { key: 11, value: '3日', } ] }, { key: 2, value: '伊利', children: [ { key: 21, value: '4日', } ] } ];
首先你这个东西如果存矩阵的话 [[{month:1月},{day:xx}],[{month:2月},{day:'2日'}]] 可以很方便的去除所有的日 或者所有的月 存对象的话更简单 {{month:1,childs:[1,2,3]},{month:2,childs:[1,2,3]}}
I will do like this.
html
script
首先你这个东西如果存矩阵的话 [[{month:1月},{day:xx}],[{month:2月},{day:'2日'}]] 可以很方便的去除所有的日 或者所有的月 存对象的话更简单 {{month:1,childs:[1,2,3]},{month:2,childs:[1,2,3]}}