<view  style="display:  {{ 条件? 'block' :  'none' }}"/> 

只需注意style处的““和‘’的使用。

TAG标签: 微信小程序style标签

http://www.xiaochengxub.com/read-99695.html