使用的是vue脚手架里的webpack-simple。
在想在app.vue中引入一个v-footer组件。
app.vue:
import footer from './componets/footer/footer.vue';
export default {
name: 'app',
data () {
return {
}
},
componets: {
'v-footer':footer
}
}
footer.vue:
<template>
<div class="footer">
</div>
</template>
<script>
export default {};
</script>
<style lang="scss">
.footer {
height: 152px;
width: 100%;
background: blue;
}
</style>
在app.vue的template中使用v-footer标签 报这样的错误:
Unknown custom element: <v-footer> - did you register the
component correctly? For recursive components, make sure to provide
the "name" option. (found in <App> at
C:UsersZhangDesktoptestyipaosrcApp.vue)
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…