项目经验
frontShiQian
这个作者很懒,什么都没留下…
展开
-
遍历对象键值
遍历对象键值 tDog = { "name": "neo", "legs": 3, "tails": 5, "friends": ['xxx','yy'] }; 遍历对象属性 Object.keys(tDog)//获取对象属性 作为数组 ...> (4) ['name', 'legs', 'tails', 'friends'] //控制台打印结果 遍历对象值 Object.keys(tDog).forEach(x=> console.log(tDog[x]))//获取对象值 ...&g原创 2021-12-18 13:59:19 · 367 阅读 · 0 评论 -
选中项高亮显示
选中项高亮显示 <div style="border: 1px solid red; height: 200px"> <div :class="{'active':index == current}" v-for="(item, index) in data" :key="index" @click="change(index)">{{ item.text }}</div> </div> ... current: null,//选中项原创 2021-12-16 20:50:59 · 605 阅读 · 0 评论 -
vue项目
项目规范 vue项目中,尽量避免一个div中只嵌套一个div原创 2021-12-16 19:56:52 · 81 阅读 · 0 评论