|
|
@ -9,8 +9,8 @@ BI.$(function () { |
|
|
|
}); |
|
|
|
}); |
|
|
|
var tree = BI.Tree.transformToTreeFormat(Demo.CONFIG); |
|
|
|
var tree = BI.Tree.transformToTreeFormat(Demo.CONFIG); |
|
|
|
|
|
|
|
|
|
|
|
var routes = [{
|
|
|
|
var routes = [{ |
|
|
|
path: '/',
|
|
|
|
path: '/', |
|
|
|
component: function(){ |
|
|
|
component: function(){ |
|
|
|
return Promise.resolve({ |
|
|
|
return Promise.resolve({ |
|
|
|
type: "demo.face" |
|
|
|
type: "demo.face" |
|
|
@ -20,13 +20,13 @@ BI.$(function () { |
|
|
|
|
|
|
|
|
|
|
|
BI.Tree.traversal(tree, function (index, node) { |
|
|
|
BI.Tree.traversal(tree, function (index, node) { |
|
|
|
if (!node.children || BI.isEmptyArray(node.children)) { |
|
|
|
if (!node.children || BI.isEmptyArray(node.children)) { |
|
|
|
routes.push({
|
|
|
|
routes.push({ |
|
|
|
path: '/' + node.text,
|
|
|
|
path: '/' + node.text, |
|
|
|
component: function(){ |
|
|
|
component: function(){ |
|
|
|
return Promise.resolve({ |
|
|
|
return Promise.resolve({ |
|
|
|
type: node.value |
|
|
|
type: node.value |
|
|
|
}) |
|
|
|
}) |
|
|
|
}
|
|
|
|
} |
|
|
|
}); |
|
|
|
}); |
|
|
|
} |
|
|
|
} |
|
|
|
}); |
|
|
|
}); |
|
|
@ -38,7 +38,7 @@ BI.$(function () { |
|
|
|
BI.createWidget({ |
|
|
|
BI.createWidget({ |
|
|
|
type: "bi.router", |
|
|
|
type: "bi.router", |
|
|
|
ref: function (_ref) { |
|
|
|
ref: function (_ref) { |
|
|
|
BI.router = _ref._router; |
|
|
|
BI.$router = _ref.$router; |
|
|
|
}, |
|
|
|
}, |
|
|
|
element: "#wrapper", |
|
|
|
element: "#wrapper", |
|
|
|
routes: routes, |
|
|
|
routes: routes, |
|
|
@ -50,6 +50,6 @@ BI.$(function () { |
|
|
|
ref = _ref; |
|
|
|
ref = _ref; |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
}
|
|
|
|
} |
|
|
|
}); |
|
|
|
}); |
|
|
|
}); |
|
|
|
}); |
|
|
|