美文网首页
问题记录2019-04-23

问题记录2019-04-23

作者: ClarkM | 来源:发表于2019-04-23 11:10 被阅读0次

<i v-show="String(item.price).split('.')[1]">.{{String(item.price).split(".")[1]}}</i>
单引号中双引号。反之亦然
<p v-if="item.tags">
<span v-show="item.tags[0]" class="teMai">{{item.tags[0]}}</span>
<span v-show="item.tags[1]" class="New">{{item.tags[1]}}</span>
</p>
遍历判断用if不用show不然会一直循环,判断[0]is undefined

相关文章

网友评论

      本文标题:问题记录2019-04-23

      本文链接:https://www.haomeiwen.com/subject/kuomgqtx.html