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

Commit 5561aba

Browse files
fix(vue-class-component): path attachment to route components (#32)
closes #31
1 parent b19adc2 commit 5561aba

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)

AltStyle によって変換されたページ (->オリジナル) /