新增定位当前播放歌曲
This commit is contained in:
@@ -4,11 +4,12 @@ import Router from 'vue-router'
|
||||
import paths from './paths'
|
||||
|
||||
|
||||
function route(path, view, name, meta) {
|
||||
function route(path, view, name, meta, props) {
|
||||
return {
|
||||
name: name || view,
|
||||
path,
|
||||
meta,
|
||||
props,
|
||||
component: (resovle) => import(
|
||||
`../views/${view}.vue`
|
||||
).then(resovle),
|
||||
@@ -19,7 +20,7 @@ Vue.use(Router)
|
||||
|
||||
const router = new Router({
|
||||
mode: 'hash',
|
||||
routes: paths.map(path => route(path.path, path.view, path.name, path.meta)).concat([
|
||||
routes: paths.map(path => route(path.path, path.view, path.name, path.meta, path.props)).concat([
|
||||
{ path: '*', redirect: '/search' },
|
||||
]),
|
||||
linkActiveClass: 'active-link',
|
||||
|
||||
@@ -26,6 +26,7 @@ export default [
|
||||
path: '/list',
|
||||
name: 'list',
|
||||
view: 'List',
|
||||
// props: true,
|
||||
},
|
||||
{
|
||||
path: '/download',
|
||||
|
||||
Reference in New Issue
Block a user