如题在github上看了一些源码,不怎么看得懂...<template> <Header></Header> <div class="wrap"> <siteInfo></siteInfo> <div class="main"> <div class="list"> <h2> <span class="title-ico"></span> <span class="list-close"></span> </h2> <hotGame></hotGame> </div> </div> </div> <Footer></Footer></template><script> import Header from './components/header.vue' import Footer from './components/footer.vue' let siteInfo = { template: ` <div class="website-info"> 今日: <em>$websiteInfoNum</em> | 昨日: <em>$websiteInfoNum</em> | 帖子: <em>$websiteInfoNum</em> | 欢迎新会员: <em>$newMember</em> </div>` }; export default { components: { siteInfo: siteInfo } } </script>比如定义了一个siteInfo的组件,怎么往里面填充数据?ajax?
添加回答
举报
0/150
提交
取消