D
D
denis-chenykh2021-09-17 03:24:40
Vue.js
denis-chenykh, 2021-09-17 03:24:40

Why are vue components not showing up?

I don’t quite understand why the vue components are not displayed
Now everything is uploaded to the https://feed-streamer.ru/
domain The data from the incoming index.vue is displayed, but the router-view does not want to display anything in it

The routers themselves are designed in this way

import {createRouter, createWebHistory} from "vue-router"

// Page
import Home from '../components/Page/Home'
import About from '../components/Page/About'

const routes = [
    {
        path: '/',
        component: Home,
        meta: {
            auth: false,
            admin: false
        }
    },
    {
        path: '/about',
        component: About,
        meta: {
            auth: false,
            admin: false
        }
    },
]

const router = createRouter({
    mode: 'history',
    routes,
    history: createWebHistory()
})

export default router;


Connected in app.js like this
// Global Boostrap
require('./bootstrap')

import { createApp } from 'vue'
import Index from './components/Index'
import router from './router/router'
import components from './components/UI/index'

import store from './store'

import axios from 'axios'

const app = createApp(Index)

components.forEach(component => {
    app.component(component.name, component)
})

app
    .use(store)
    .use(router)
    .mount('#content')

app.config.globalProperties.$axios = axios

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question