
main.js
import Vue from 'vue'
import VueRouter from 'vue-router'
import routes from './router/'
import store from './store/'
import './config/flexible'
Vue.use(VueRouter)
const router = new VueRouter({
routes,
mode: 'history',
strict: process.env.NODE_ENV !== 'production'
})
new Vue({
el: '#app',
router,
store
})
router
import App from '../App'
const home = r => require.ensure([], () => r(require('@/components/home/home')), 'home')
export default [{
path: '/',
component: App,
children: [
{
path: '',
redirect: '/home'
},
{
path: '/home',
component: home
}
]
}]
App.vue
home.vue
{{ msg }}
Copyright 2014-2025 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号
这一步有问题啊,没把app.vue渲染上去啊