Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
391 views
in Technique[技术] by (71.8m points)

vue组件注册问题

使用的是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)


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

components写错了,少个n


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...