前言
如何使用三元表达式动态渲染样式;
内容
1. style
<div class="button-item">
<button class="guess-button" :style="{'border': item.isClose === 0 ?'':'1px solid rgba(204,204,204,1)'}">style</button>
</div>
2. class
<div class="button-item">
<button :class="[item.isClose ? 'guess-button guess-button-board' : 'guess-button']" >class</button>
</div>