B组件代码
<template>
<div>
<div id="m_app_left">
aa
</div>
</div>
</template>
<script type="text/ecmascript-6">
export default{
props:[]
}
</script>
A组件
<template id="app">
<div>
<!--这个是组件名字-->
<fotteRsleft></fotteRsleft>
<div class="link" id="link">
<div class="left link-sub">
<ul>
<li>
<router-link to="/index" class="toggle">首页</router-link>
</li>
<li>
<router-link to="/article">文章</router-link>
</li>
<li>
<router-link to="/search">搜索</router-link>
</li>
<li>
<router-link to="/resource">资源</router-link>
</li>
</ul>
</div>
<router-view class="toggle-routes"></router-view>
</div>
</div>
</template>
<script type="text/ecmascript-6">
<!--左侧数据显示区-->
import fottersleft from '../components/m_LeftTab'
export default{
props:[],
}
//左侧
components:{
fottersleft
}
</script>
<script src="../../static/public/javascript/m_index.js"></script>
<style scoped>
@import "../../static/public/css/custom/reset.css";
@import "../../static/public/css/thirdparty/m_index.css";
@import "../../static/public/css/thirdparty/m_common.css";
</style>
<style>
Mleft{
height: 30px;
display: block
}
</style>
b组件中的数据,无法发送给a组件中,提示说,组件未注册成功,b组件的数据无法在a组件中显示,请各位大神帮下看看,应该怎么解决这个问题,谢谢了
组件你如果用的是驼峰命名在使用的时候要写成