/*<!-- fullScreenStatus.hot为true,则展现class='fullscreen' -->*/
<div id="right-top" :class="[fullScreenStatus.hot ? 'fullscreen' : '']">
<Hot ref="hot"></Hot>
<div class="resize">
<!-- icon-compress-alt -->
<!-- fullScreenStatus.hot为true,展现class='icon-compress-alt',否则展现class='icon-expand-alt' -->
<span @click="changeSize('hot')"
:class="['iconfont', fullScreenStatus.hot ? 'icon-compress-alt' : 'icon-expand-alt']"></span>
</div>
</div>
vue在结构中绑定动态class,实现三元表达式切换不同class
最新推荐文章于 2024-07-06 16:47:02 发布