Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit5561aba

Browse files
authored
fix(vue-class-component): path attachment to route components (#32)
closes#31
1 parentb19adc2 commit5561aba

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

‎index.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,10 @@ export default function install(Vue, {routes}) {
1111

1212
Object.keys(routes).map(path=>{
1313
routes[path].component.__path=path
14+
// this is required to attach the path to vue-class-components. See #31
15+
if(routes[path].component.options){
16+
routes[path].component.options.__path=path;
17+
}
1418
})
1519

1620
Vue.mixin({

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp