Welcome to WuJiGu Developer Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
309 views
in Technique[技术] by (71.8m points)

vue for循环 每6个元素循环一次

html结构如下:
<ul>

<li>xxx1</li>
<li>xxx2</li>
<li>xxx3</li>
<li>xxx4</li>
<li>xxx5</li>
<li>xxx6</li>

</ul>
<ul>

<li>xxx7</li>
<li>xxx8</li>
<li>xxx9</li>
<li>xxx10</li>

</ul>

数据结构如下:
[

{'title': 'xxx1'},
{'title': 'xxx2'},
{'title': 'xxx3'},
{'title': 'xxx4'},
{'title': 'xxx5'},
{'title': 'xxx6'},
{'title': 'xxx7'},
{'title': 'xxx8'},
{'title': 'xxx9'},
{'title': 'xxx10'},

]

这种循环是需要循环两次吗


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

把这个数组变成一个二维数组,既然是数据驱动,就在数据上下功夫


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to WuJiGu Developer Q&A Community for programmer and developer-Open, Learning and Share
...