0

这段代码

require([ "dojo","dojo/request/script", "dojo/parser", "dojox/mobile", "dojox/mobile/compat", "dojox/mobile/deviceTheme",
              "dojox/mobile/ScrollableView",
              "dojox/mobile/ScreenSizeAware",
              "dojox/mobile/FixedSplitter",
              "dojox/mobile/ContentPane",


              "dijit/form/Select"
              ],

              function(dojo) {

添加 Select 时生成脚本错误。为什么?我试试这个,但不工作!

Error: multipleDefine


...on(h){return"[object Array]"==l.call(h)},g=function(h,a){if(h)for(var c=0;c<h.le...

dojo.js (line 2)
Error: scriptError
4

2 回答 2

1

这适用于我在 WL6 中使用默认的 dojo 1.9 库:

function dojoInit() {
require([ "dojo", "dojo/ready", "dojo/parser", "dojox/mobile", "dojo/dom", "dijit/registry", "dojox/mobile/ScrollableView",
        "dijit/form/Select" ], function(dojo, ready) {
    ready(function() {

        new dijit.form.Select({
            name : "select2",
            options : [ {label : "TN",value : "Tennessee"}, 
                        {label : "VA",value : "Virginia",selected : true}, 
                        {llabel : "WA",value : "Washington"}, 
                        {label : "FL",value : "Florida"}, 
                        {label : "CA",value : "California"} ]
        }).placeAt(dojo.byId(view0));
    });
});
}

没有错误,尽管应用程序中的小部件显示似乎混乱了。(它有效,但看起来不正确)也许它需要一些 css

于 2013-08-06T14:43:59.887 回答
0

这通常意味着您在某处定义了不同版本的 dijit/form/Select 及其冲突

于 2013-08-06T15:04:51.400 回答