Unable to load any icons after changing routes
yjw113080 opened this issue · comments
Hi i try to customize the menus from this amazing template,
but for some reason I couldn't load any icons and my customized logo img (in static folder).
I just fixed few lines of 'routes.js' and 'src/components/UIComponents/SidebarPlugin/index.js'.
could you help me to figure out the logic to load icons and give a hint to fix my messed up code?
// routes.js
import NotFound from '../components/GeneralViews/NotFoundPage.vue'
import DetailedView from 'src/components/Dashboard/Views/DetailedView'
import Dashboard from 'src/components/Dashboard/Views/Dashboard'
import Icons from 'src/components/Dashboard/Views/Icons'
const routes = [
{
path: '/',
component: DashboardLayout,
redirect: '/admin/detail'
},
{
path: '/admin',
component: DashboardLayout,
redirect: '/admin/detail',
children: [
{
path: 'dashboard',
name: 'Dashboard',
component: Dashboard
},
{
path: 'detail',
name: 'Detailed View',
component: DetailedView
},
{
path: 'icons',
name: 'icons',
component: Icons
}
]
},
{ path: '*', component: NotFound }
]
export default routes
// index.js
import Sidebar from './SideBar.vue'
const SidebarStore = {
showSidebar: false,
sidebarLinks: [
{
name: 'Dashboard',
icon: 'ti-panel',
path: '/admin/dashboard'
},
{
name: 'Detailed View',
icon: 'ti-user',
path: '/admin/detail'
},
{
name: 'Icons',
icon: 'ti-pencil-alt2',
path: '/admin/icons'
}
],
displaySidebar (value) {
this.showSidebar = value
}
}
const SidebarPlugin = {
install (Vue) {
Vue.mixin({
data () {
return {
sidebarStore: SidebarStore
}
}
})
Object.defineProperty(Vue.prototype, '$sidebar', {
get () {
return this.$root.sidebarStore
}
})
Vue.component('side-bar', Sidebar)
}
}
export default SidebarPlugin
self-resolved