摘要: 父组件 App.vue <template> <div> <header-vue :msg="msg"></header-vue> <body-vue></body-vue> <footer-vue></footer-vue> </div></template> <script> export de 阅读全文
posted @ 2017-10-09 16:47 ZBB0304 阅读(125) 评论(0) 推荐(0) 编辑
摘要: main.js // The Vue build version to load with the `import` command// (runtime-only or standalone) has been set in webpack.base.conf with an alias.impo 阅读全文
posted @ 2017-10-09 16:28 ZBB0304 阅读(181) 评论(0) 推荐(0) 编辑
摘要: 1.子组件header.vue <template> <div>头部</div></template> <script> export default{ data(){ return{ } } }</script> <style scoped> div{ background: blue; }</s 阅读全文
posted @ 2017-10-09 15:43 ZBB0304 阅读(155) 评论(0) 推荐(0) 编辑
摘要: <template> <div> <ul> <li v-for="(item,index) in cartoon" :key="index" :class="{'A':'red','B':'green','C':'yellow','D':'blue','E':'pink '}[item.score] 阅读全文
posted @ 2017-10-09 14:15 ZBB0304 阅读(602) 评论(0) 推荐(0) 编辑