<div v-for="(item, index) in cMList" :key=index>
<div v-for="(items, indexs) in item.list" :key=indexs>
{{items.content}} //
</div>
</div
above, I can output all the data, but now I just want it to output the first three pieces of data. I changed it to
vmurf = "(items, indexs) in item.list.slice (0,2)"
but misreported TypeError: Cannot read property "slice" of undefined "
Why?
cMList: [
{
uid: 10001,
list: [
{nickname: "aaa", content: "666", time: "2019.2.12"},
{nickname: "aaa", content: "666", time: "2019.2.12"},
{nickname: "aaa", content: "666", time: "2019.2.12"},
{nickname: "aaa", content: "666", time: "2019.2.12"},
{nickname: "aaa", content: "666", time: "2019.2.12"},
{nickname: "aaa", content: "666", time: "2019.2.12"},
{nickname: "aaa", content: "666", time: "2019.2.12"}
]
}
]