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

Categories

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


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

1 Answer

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


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share

548k questions

547k answers

4 comments

86.3k users

...