当我使用链接(href)导航时,http://localhost:8080/user/profile页面可以工作,但是如果刷新页面(Ctrl + F5),它会显示内容,但是样式丢失。有想法吗?
{
path: '/user',
name: 'Dashboard',
component: require('./components/pages/Dashboard'),
meta: {
requiresAuth: false
},
props: { bcName: "Dashboard" },
children: [
{
path: 'profile',
name: 'Profile',
components: {
mainarea: require('./components/pages/Profile'),
}
}
]
}
<template>
<!-- Content Column -->
<div class="col-lg-9 mb-4">
<router-view name="mainarea"> </router-view>
</div>
</template>
<template>
<!-- Content Row -->
<div class="row">
<user-sidebar></user-sidebar>
<user-main></user-main>
</div>
</template>
<template>
<div class="test">Profile page {{layout}}</div>
</template>