2013-05-28 99 views
0

我是Dojo的新手,正在開發一個項目,預計道場會1.8。看起來我必須轉向dojo 1.6。我將不勝感激如何將我的代碼更改爲1.6更新代碼以使用dojo 1.6

require(["dojo/request","dojo/ready", "dojo/dom", "dojo/dom-construct","dojo/_base/array", "dojo/json","dojo/io-query","dojo/domReady!"], 
function(request,ready,dom, domConst, arrayUtil,json,ioQuery){ 
ready(function(){ 

是我如何從1.8開始編碼。如何在1.6

回答

1

做到這一切「老道場」教程仍處於 http://dojotoolkit.org/documentation/?ver=1.6(看頂部的選擇框,指定版本)

傳統道場裝載機dojo.require和道場訪問。提供功能。本教程(http://dojotoolkit.org/documentation/tutorials/1.6/hello_dojo/)採取

<!-- load Dojo --> 
<script src="//ajax.googleapis.com/ajax/libs/dojo/1.6.1/dojo/dojo.xd.js"></script> 
<script> 
    // New: Require in the dojo.fx module 
    dojo.require("dojo.fx"); 

    // Remember, dojo.ready waits for both the DOM and all dependencies 
    dojo.ready(function(){ 
     // The piece we had before - change our innerHTML 
     dojo.byId("greeting").innerHTML += ", from " + dojo.version; 
     // Now, slide the greeting 
     dojo.fx.slideTo({ 
      top: 100, 
      left: 200, 
      node: dojo.byId("greeting") 
     }).play(); 

    }); 
</script> 

反正 代碼,我會強烈建議您升級到道場的新版本。