2017年9月19日
摘要: APP.vue <template> <div id="app"> <componentsA v-bind:number=123456></componentsA> </template> <script>import componentsA from './components/A.vue'/* 阅读全文
posted @ 2017-09-19 18:09 前端小猿 阅读(119) 评论(0) 推荐(0) 编辑
摘要: 1.在自定义组件上使用了v-bind: class="HELLO" HELLO是一个对象,或者v-bind:style="WORLD" WORLD也是一个对象,在自定义组件定义的时候,data这个构造参数内必须这么写 data:function(){ return{ HELLO:'hello', W 阅读全文
posted @ 2017-09-19 15:50 前端小猿 阅读(155) 评论(0) 推荐(0) 编辑
摘要: v-for 渲染数组时,<li v-for="(list,index) in lists">{{list.name}}-{{list.age}}-{{index}}</li> v-for 使用在你将要循环的元素上而不是挂载在父元素上 渲染对象时,<li v-for="(value,key) in t 阅读全文
posted @ 2017-09-19 14:55 前端小猿 阅读(156) 评论(0) 推荐(0) 编辑