throttle m.route redraws
This commit is contained in:
parent
7368cf6f26
commit
2ffd2fb7e4
9 changed files with 161 additions and 119 deletions
|
|
@ -17,11 +17,11 @@ module.exports = function($window, redrawService) {
|
|||
current.resolve = null
|
||||
redrawService.render(root, current.render(Vnode(component, undefined, params)))
|
||||
}
|
||||
var run = routeService.defineRoutes(routes, function(component, params, path, route, isRouteChange) {
|
||||
var run = routeService.defineRoutes(routes, function(component, params, path, route, isAction) {
|
||||
if (component.view) render({}, component, params, path)
|
||||
else {
|
||||
if (component.onmatch) {
|
||||
if (isRouteChange === false && current.path === path || current.resolve != null) render(current, current.component, params)
|
||||
if (isAction === false && current.path === path || current.resolve != null) render(current, current.component, params)
|
||||
else {
|
||||
current.resolve = function(resolved) {
|
||||
render(component, resolved, params, path)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue