vue 中动态绑定class 和 style的方法

 

先列举一些例子

:class="['content',{'radioModel':checkType}]"  
:class
="['siteAppListDirNode',{open:appitem.open==true}]"

:class="['portalCenterMenu',{showNav:!showHideNav,hideNav:showHideNav}]"

:class="{shortcutMenuShow:!showHideNav,shortcutMenuHide:showHideNav}"

:style="{height:checkType?'423px':'385px'}"

:src="userInfo.userFace?userInfo.userFace:defaultHead"

转载: https://blog.csdn.net/weixin_42333548/article/details/80537917

posted @ 2019-01-26 17:35  暗恋桃埖源  阅读(2190)  评论(0编辑  收藏  举报