Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

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

weex 在list中如何根据请求到的数据显示不同的cell

在消息列表中,分为普通消息和提醒消息,展示时的cell不同,如何将请求得到的数据展示到不同的cell 上


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

1 Answer

0 votes
by (71.8m points)

用一个cell展示两种不同的样式?在你自定义的组件的内部,创建两个同级的div,分别把两种布局完成,然后两个div都绑定v-if='show',根据传入的消息类型就可以自动显示和隐藏某一个div了


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...