alibaba/Tangram-iOS

采用type为 container-flow 的布局会cpu98%主线程一直卡着动不了

eric1202 opened this issue · 3 comments

items 是6个元素
想一行内放置六个

json 数据是大概是这样的

{
"icon": "URL111",
"style": {
"margin": "[20,0,0,0]"
},
"text": "辅材快速采购",
"type": "container-flow",!!!!
"items": [
{
"icon": "URL1",
"text": "水",
"action":"https://www.baidu.com",
"type": "AuxItemChild"
},
{
"icon": "URL1",
"text": "电",
"type": "AuxItemChild"
},
{
"icon": "URL1",
"text": "瓦",
"type": "AuxItemChild"
},
{
"icon": "URL1",
"text": "木",
"type": "AuxItemChild"
},
{
"icon": "URL1",
"text": "油",
"type": "AuxItemChild"
},
{
"icon": "URL1",
"text": "五金/工具",
"type": "AuxItemChild"
}
]
}

如果 container-flow 改为 container-threeColumn 就没有问题,所以应该不是json的格式问题

真机可以复现,排查中

和之前的问题一样:#45

需要设置列数,给style里面加一段

"style": {
                  "margin": "[20,0,0,0]",
                  "column": "2"
                  },

确实如此 需要在style 中加 column": ""