-
Notifications
You must be signed in to change notification settings - Fork 97
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
大大,代码有两处好像有点小问题 #29
Comments
感谢反馈
redirectDelegate: function (emitter, dispatcher) {
;['navigateTo', 'redirectTo', 'switchTab', 'reLaunch'].forEach(function (k) {
emitter.on(k, function (url) {
var name = getPageName(url)
name && dispatcher.emit(k+':'+name, url, fns.queryParse(url.split('?')[1]))
})
})
}
A({
config: {
route: ['/page/$page', '/pages/$page'],
resolvePath: function (name) {
return `/page/${name}`
}
}
}); |
soga 大大,那个第一点,就是
然后在 因为
都执行一个方法,只是没影响,因为并不需要知道他是哪种方法触发 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
因为我们的项目是 很多目录层级这样,看之前的issues,似乎不太适合,因此想改改,看代码过程中有几点疑惑
大大 一个是 可能监听了无效事件,根源在redirector.route 方法永远只 emit navigateTo事件
因此在bridge也只emit navigateTo 事件,
因此 option.onNavigate 下 就
dispatcher.on('navigateTo:'+name, onNavigateHandler)
起作用,虽然不影响,因为反正都执行还有就是 component 下 ,那个name 感觉是 undefined,
component.js 中 bridge.ref(component.getRef) 和 page.js 下bridge.ref(C.getRef) 是不是重复了
message.js 下 assign
执行到 wait应该是undefined,不晓得,我猜的
还有大大, 下面的代码这种写法看不懂
brideg.js的route
The text was updated successfully, but these errors were encountered: