摘要: 效果图: 代码部分: index.html <div id="app"> <div v-if="books.length"> <table> <thead> <tr> <th></th> <th>书籍名称</th> <th>出版日期</th> <th>价格</th> <th>购买数量</th> <t 阅读全文
posted @ 2021-08-22 13:15 JamieChyi 阅读(21) 评论(0) 推荐(0)
摘要: 条件判断 v-if的使用 <div id="app"> <h1 v-if="scope>20">{{message}}</h1> </div> <script src="../js/vue.js"></script> <script> const app = new Vue({ el: '#app' 阅读全文
posted @ 2021-08-22 13:05 JamieChyi 阅读(39) 评论(0) 推荐(0)
摘要: 计算属性 1、基本使用 <div id="app"> <h2>{{getName()}}</h2> <!--计算属性--> <h2>{{fullName}}</h2> </div> <script src="../js/vue.js"></script> <script> const app = n 阅读全文
posted @ 2021-08-22 12:46 JamieChyi 阅读(19) 评论(0) 推荐(0)