fineui是帆软报表和BI产品线所使用的前端框架。
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

131 lines
2.6 KiB

7 years ago
// 定义Model路由
7 years ago
var modelRouter = new (BI.inherit(BI.WRouter, {
routes: {
"": "index"
},
index: function () {
return {};
}
}));
7 years ago
// 定义View路由
7 years ago
var viewRouter = new (BI.inherit(BI.WRouter, {
routes: {
"": "TestView",
"/setget": "SetGetView",
"/local": "LocalView",
"/skipTo": "SkipToView",
"/skipTo/:child": "getSkipToView",
"/change": "ChangeView",
"/change/inner": "ChangeInnerView",
"/static": "StaticView",
"/event": "EventView",
"/layer": "LayerView",
"/masker": "MaskerView",
"/floatbox": "FloatBoxView",
"/spliceDuplicate": "SpliceDuplicateView",
"/spliceDuplicate/sdSub": "SDSubView",
"/tmp": "TmpView",
"/tmp/child": "TmpChildView",
7 years ago
"/tmp/child/child": "TmpChildChildView"
7 years ago
},
getSkipToView: function (v) {
switch (v) {
case "red":
return "SkipToRedView";
case "blue":
return "SkipToBlueView";
case "green":
return "SkipToGreenView";
case "yellow":
return "SkipToYellowView";
default :
return "SkipToRedView";
}
}
}));
7 years ago
// 注册路由
7 years ago
BI.View.registerVMRouter(viewRouter, modelRouter);
7 years ago
Demo.FIX_CONFIG = [{
7 years ago
id: 6,
7 years ago
text: "数据流框架fix-1.0"
7 years ago
}, {
pId: 6,
text: "set,get方法",
value: "demo.setget"
}, {
pId: 6,
text: "local函数",
value: "demo.local"
}, {
pId: 6,
text: "skipTo函数",
value: "demo.skipTo"
}, {
pId: 6,
text: "change函数",
value: "demo.change"
}, {
pId: 6,
text: "splice和duplicate函数",
value: "demo.spliceDuplicate"
}, {
pId: 6,
text: "tmp方法",
value: "demo.tmp"
7 years ago
}, {
id: 7,
text: "数据流框架fix-2.0"
}, {
id: 71,
pId: 7,
7 years ago
text: "定义响应式数据",
7 years ago
value: "demo.fix_define"
7 years ago
}, {
id: 72,
pId: 7,
7 years ago
text: "state属性",
7 years ago
value: "demo.fix_state"
7 years ago
}, {
id: 73,
7 years ago
pId: 7,
7 years ago
text: "计算属性",
7 years ago
value: "demo.fix_computed"
7 years ago
}, {
id: 74,
7 years ago
pId: 7,
text: "store",
7 years ago
value: "demo.fix_store"
7 years ago
}, {
id: 75,
7 years ago
pId: 7,
7 years ago
text: "watcher且或表达式",
7 years ago
value: "demo.fix_watcher"
7 years ago
}, {
id: 76,
7 years ago
pId: 7,
7 years ago
text: "watcher星号表达式",
7 years ago
value: "demo.fix_global_watcher"
7 years ago
}, {
id: 77,
7 years ago
pId: 7,
7 years ago
text: "context",
value: "demo.fix_context"
}, {
id: 78,
7 years ago
pId: 7,
7 years ago
text: "一个混合的例子",
7 years ago
value: "demo.fix"
}, {
id: 79,
pId: 7,
text: "场景",
value: "demo.fix_scene"
7 years ago
}];