vue-skeleton-webpack-plugin
vue-skeleton-webpack-plugin copied to clipboard
路由history模式下,不支持路由base
路由设置了history模式,并且设置了基准路径,无法显示骨架屏
如:
router: { mode: 'history', base: '/test/', routes: [{ path: '/list', skeletonId: 'list-skeleton' }, { path: '/', skeletonId: 'index-skeleton' }] }
看了一下源码是直接拿location.pathname 与path匹配导致匹配不成功,可否增加个base参数, isMatched函数中路径加上base路径后再匹配?
请问,能不能提个 PR
有空再提交一下哈,现在暂时在path写正则,所有正则都加上了base这个前缀,暂时可以解决
好,提前感谢
现在 支持base了么