利用三元运算符来写
<div
:class="[needTagsView ? 'hasTagsView' : '',(roleType=='webvpn'&&CurrentRoutesIndex === '/')?'webvpnHeader':'',roleType=='webvpn'?'webvpn':'']"
class="main-container"
>
利用三元运算符来写
<div
:class="[needTagsView ? 'hasTagsView' : '',(roleType=='webvpn'&&CurrentRoutesIndex === '/')?'webvpnHeader':'',roleType=='webvpn'?'webvpn':'']"
class="main-container"
>
本文标题:Vue绑定多个class
本文链接:https://www.haomeiwen.com/subject/qcxfoktx.html
网友评论