我想用 dojox/app 编写简单的应用程序,但不是针对移动设备(每个示例都是针对移动应用程序)。首先我通过设置这个配置文件来修改实际的应用程序:
{
"id": "simpleModelApp",
"name": "Simple Model App",
"description": "A simple app to show how to use different types of Stores and Models",
"splash": "splash",
"dependencies": [
"dojo/parser",
"dijit/layout/ContentPane",
"dojo/store/Memory",
"dojo/data/ItemFileWriteStore",
"dojo/store/JsonRest",
"dojox/app/utils/mvcModel",
"dojox/mvc/EditStoreRefListController",
"dojo/store/DataStore"
],
"modules": [],
"controllers": [
"dojox/app/controllers/Load",
"dojox/app/controllers/Transition",
"dojox/app/controllers/Layout"
],
//stores we are using
"stores": {
},
"models": {
},
"has" : {
"ie9orLess" : {
"controllers": [
"dojox/app/controllers/HistoryHash"
]
},
"!ie9orLess" : {
"controllers": [
"dojox/app/controllers/History"
]
}
},
"defaultView": "home",
"defaultTransition": "slide",
"views": {
"home": {
"dependencies":["dojo/parser", "dijit/layout/ContentPane", "dijit/layout/BorderContainer"],
"template": "./main/main.html"
}
}
}
然后我为视图模板编写简单的 html:
<div data-dojo-type="dijit/layout/BorderContainer" data-dojo-props="design:'sidebar', gutters:true, liveSplitters:true" id="borderContainer">
<div data-dojo-type="dijit/layout/ContentPane" data-dojo-props="splitter:true, region:'leading'" style="width: 100px;">Hi, I'm leading pane</div>
<div data-dojo-type="dijit/layout/ContentPane" data-dojo-props="splitter:true, region:'center'">Hi, I'm center pane</div>
并使用定义的配置文件运行应用程序:
var cfg = jsonRef.fromJson(config);
Application(cfg);
应用程序应该有由拆分器(BorderContainier)拆分的widnow(浏览器),但id不起作用。是否可以使用普通的 wigets 创建桌面应用程序女巫?还是只有手机?(我使用的是dojo 1.9.1)