基于vue脚手架练习3
<template> <div> <first-page-3 :person="person" ></first-page-3> </div> </template> <script> import FirstPage3 from './FirstPage3.vue' export default { components: { FirstPage3 }, data(){ return { person:{ name:'王菁菁', sex:'武装直升机', starchair:'一等座', carflag:'冀8LONG666' } } } } </script> <style scoped> .project{ background-color: #e6eee4; margin: 5px; padding: 20px; } </style>
<template> <div class="div__"> <h3>信息表</h3> <div><span>姓名:{{ person.name }}</span></div> <div><span>性别:{{ person.sex }}</span></div> <div><span>星座:{{ person.starchair }}</span></div> <div><span>车牌:{{ person.carflag }}</span></div> </div> </template> <script> export default { props:['person'] } </script> <style scoped> .div__{ border: 2px solid black; width: 200px; height: 150px; } </style>