javascript - How to deal with two v-ifs in vue.js?
为情所困
为情所困 2017-07-05 10:50:33
0
2
844
 <span><i class="fz14 oStatus" v-if="site.order_status === 1">+</i>{{site.order_amount}}</span><br>        
       <span><i class="fz14 oStatus" v-if="site.order_status === 2">-</i>{{site.order_amount}}</span><br>


Why does it appear twice? I only want data with or -, what should I do?

为情所困
为情所困

reply all(2)
滿天的星座

Your v-if was added in the wrong position, it should be added on <span>.

typecho

It would be better to use if-else

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!