<p class="answerNum2" v-text="iteme.sel_num" :class="{letter: num }"></p> //自定义,如果num为true,添加letter
<p class="answerNum2" v-text="iteme.sel_num" :class="{letter: iteme.sel_num == iteme.ok_num }"></p>  如果iteme.sel_num与iteme.ok_num相等,添加letter为true,添加letter
<p class="answerNum2" v-text="iteme.sel_num" :class="{letter: textIndex == index }"></p>自定义textIndex 如果textIndex 与index 相等,添加letter为true,添加letter
<p class="answerNum2" v-text="iteme.sel_num" :class="{letter: iteme.sel_num == iteme.ok_num, errorLetter: iteme.sel_num != iteme.ok_num}"></p> 如果iteme.sel_num与iteme.ok_num相等,添加letter为true,添加letter,如果iteme.sel_num与iteme.ok_num不相等,添加letter为true,添加errorLetter
<p class="answerNum2" v-text="iteme.sel_num" :class="{iteme.sel_num == iteme.ok_num ?letter:errorLetter}"></p>  如果iteme.sel_num与iteme.ok_num相等,添加letter为true,添加letter,如果iteme.sel_num与iteme.ok_num不相等,添加letter为true,添加errorLetter

转载于:https://www.cnblogs.com/gqx-html/p/7574791.html

Logo

前往低代码交流专区

更多推荐