He creado mi componente menu
de esta manera :
vgc components/nav
En src/App.vue
:
<template>
<div id="app mt-0 ">
<menu></menu>
</div>
</template>
<script>
import menu from './components/'
export default {
name: 'App',
components: {
menu //Esta subrayado en rojo, dice que no esta siendo usado.
}
}
</script>
<style>
#app {
font-family: Avenir, Helvetica, Arial, sans-serif;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
text-align: center;
color: #2c3e50;
margin-top: 60px;
}
</style>
En mi fichero main.js
import 'bootstrap-vue/dist/bootstrap-vue.css'
Vue.config.productionTip = false
// Make BootstrapVue available throughout your project
Vue.use(BootstrapVue)
// Optionally install the BootstrapVue icon components plugin
Vue.use(IconsPlugin)
new Vue({
render: h => h(App),
}).$mount('#app')
Me da este error, me dice que no se esta usando pero como veis tengo el component ahi:
Failed to compile.
./src/App.vue
Module Error (from ./node_modules/eslint-loader/index.js):
...\PROYECTOS\VUEJS\to_do_list_front\src\App.vue
14:5 error The "menu" component has been registered but not used vue/no-unused-components
✖ 1 problem (1 error, 0 warnings)