我是一个概念脚本加载器的新手,我正在尝试用RequireJS加载jQuery和easyUI。在加载jQuery之后,我不确定如何引入easyUI。有没有人能简单解释一下我需要做什么?
requirejs.config({
"baseUrl": "app/lib",
"paths": {
"app": "/app",
"jquery": "//ajax.googleapis.com/ajax/libs/jquery/2.1.3/jquery.min",
"easyui": "app/lib/jquery-easyui/jquery.easyui.min"
}
});
define(["jquery"], function($){
console.log($);
//Not sure how to link in the easyUI
});发布于 2015-02-27 20:27:22
在定义了jQuery之后,您可以只使用require()来请求easyui
define(["jquery"], function($){
require(["easyui"], function () {
//easyui is now usable
});
});https://stackoverflow.com/questions/28765015
复制相似问题