代码片段: https://developers.weixin.qq.com/s/uH5UnAmu7m3Y
flex-direction:row 碰上wx:for 无效lex-direction:row 碰上wx:for 无效,求大神帮忙!!!谢谢 index.js [代码]data: {[代码][代码] [代码][代码]bgColor:[[代码][代码]'bc_red'[代码][代码], [代码][代码]'bc_yellow'[代码][代码], [代码][代码]'bc_green'[代码][代码]][代码][代码] [代码][代码]},[代码]index.wxml [代码]<[代码][代码]view[代码] [代码]class[代码][代码]=[代码][代码]"flex-wrap"[代码] [代码]wx:for[代码][代码]=[代码][代码]"{{bgColor}}"[代码][代码]>[代码][代码] [代码][代码]<[代码][代码]view[代码] [代码]class[代码][代码]=[代码][代码]"flex-item {{item}}"[代码][代码]></[代码][代码]view[代码][代码]>[代码][代码]</[代码][代码]view[代码][代码]>[代码]index.wxss [代码].flex-wrp{[代码][代码] [代码][代码]display[代码][代码]:flex;[代码][代码] [代码][代码]flex-[代码][代码]direction[代码][代码]: row;[代码][代码] [代码][代码]background-color[代码][代码]: [代码][代码]#FFFFFF[代码][代码];[代码][代码]}[代码][代码].flex-item{[代码][代码] [代码][代码]width[代码][代码]: [代码][代码]100px[代码][代码];[代码][代码] [代码][代码]height[代码][代码]: [代码][代码]100px[代码][代码];[代码][代码]}[代码]效果 [图片]
2018-10-31