mirror of
https://github.com/flarum/framework.git
synced 2024-11-29 21:11:55 +08:00
Fix routeName attr not being passed into pages
This commit is contained in:
parent
ccf8b2448f
commit
2e1331b1fe
|
@ -24,11 +24,18 @@ export default class DefaultResolver {
|
|||
return this.routeName + JSON.stringify(m.route.param());
|
||||
}
|
||||
|
||||
makeAttrs(vnode) {
|
||||
return {
|
||||
...vnode.attrs,
|
||||
routeName: this.routeName,
|
||||
};
|
||||
}
|
||||
|
||||
onmatch(args, requestedPath, route) {
|
||||
return this.component;
|
||||
}
|
||||
|
||||
render(vnode) {
|
||||
return [{ ...vnode, routeName: this.routeName, key: this.makeKey() }];
|
||||
return [{ ...vnode, attrs: this.makeAttrs(vnode), key: this.makeKey() }];
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user