我想創建一個可編輯的SlickGrid(它使用jquery-ui),也使用Dojo。錯誤:從Dojo和jQuery UI衝突multipleDefine
當我的頁面包含
<script src="../../bower_components/dojo/dojo.js"></script>
<script src="../../bower_components/SlickGrid/lib/jquery-ui-1.11.3.js"></script>
<script src="../../mlads/fillDemo/FillDemo.js"></script>
控制檯顯示
Error: multipleDefine
return mix(new Error(error), {src:"dojoLoader", info:info}); dojo.js (line 106)
src: dojoLoader dojo.js (line 1896)
info: Object { pid="dijit", mid="dijit/_WidgetsInTemplateMixin", pack={...}, more...}
如果我註釋掉了jQuery UI的線,錯誤消失。
FillDemo.js是我的源代碼,這與
require(
[ "dojo/_base/declare",
"dijit/_WidgetBase",
"dijit/_TemplatedMixin",
"dijit/_WidgetsInTemplateMixin",
"dijit/registry",
"dijit/form/Button",
"dijit/form/DropDownButton",
將jQuery UI移動到腳本列表的頂部爲我工作! – Mycah