摘要: <div v-if='score >= 90'>优秀</div> <div v-else-if='score >= 80'>良</div> <div v-else-if='score >= 60'>及格</div> <div v-else>不及格</div> 每个条件语句都需要一个前缀V 阅读全文
posted @ 2021-09-06 17:50 何歡 阅读(41) 评论(0) 推荐(0)
摘要: <h2>{{aa()}}</h2> <h2>{{aa()}}</h2> <h2>{{aa()}}</h2> <h2> {{ name }}</h2> <h2> {{ name }}</h2> <h2> {{ name }}</h2> methods: { aa() { console.log(111 阅读全文
posted @ 2021-09-06 17:14 何歡 阅读(33) 评论(0) 推荐(0)
摘要: 数组增加元素push:修改原数组,返回值为增加的数 var arr = [1, 2, 3, 4, 5]; let a = arr.push(6) console.log(arr);//[1, 2, 3, 4, 5, 6] console.log(a);//6 数组增加元素concat:不修改原数组, 阅读全文
posted @ 2021-09-06 15:09 何歡 阅读(11) 评论(0) 推荐(0)