渲染的数据结构如下:
这是一个只有两层的列表数据
WXML的代码如下:
就是一个简单的view里套了一个scroll-view组件
效果如下:
(WXSS略)
我的问题是:为什么第二层循环拿不到数据?或者拿到的数据是NAN?
【wx:for嵌套循环】第二层循环渲染出的数据为空值(NAN)?[wx:for nested loop] The data rendered by the second layer of loop is null (NAN)?
【wx:for嵌套循环】第二层循环渲染出的数据为空值(NAN)?渲染的数据结构如下:
这是一个只有两层的列表数据
WXML的代码如下:
就是一个简单的view里套了一个scroll-view组件
效果如下:
(WXSS略)
我的问题是:为什么第二层循环拿不到数据?或者拿到的数据是NAN?
The rendered data structure is as follows: This is a list data with only two layers. The code of wxml is as follows: a scroll view component is set in a simple view. The effect is as follows: (wxss omitted) my question is: why can't the second layer loop get the data? Or is the data obtained Nan?
回答:
item-child -> itemChild 这样试试
item-child 变量名不能用-