jQuery EasyUI 基础插件 - Easyloader 加载器

jQuery EasyUI 教程 · 2019-04-07 10:37:01

用法

加载 EasyUI 模块

easyloader.base = '../'; // 设置 easyui 的基本目录
easyloader.load('messager', function(){ // 加载指定的模块
    $.messager.alert('Title', 'load ok');
});

通过绝对 url 加载脚本

using('http://code.jquery.com/jquery-1.4.4.min.js', function(){
    // ...
});

通过相对 url 加载脚本

// 脚本相对于 easyui 目录的路径
using('./myscript.js', function(){
    // ...
});

属性

名称 类型 描述 默认值
modules object 预定义的模块。
locales object 预定义的语言环境。
base string easyui 的基本目录,必须以 '/' 结尾。 基本目录将被自动相对于 easyload.js 进行设置
theme string 定义在 'themes' 目录下的主题名称。 default
css boolean 定义当加载模块的时候是否加载 css 文件。 true
locale string 语言环境名称。 null
timeout number 以毫秒为单位的超时值,如果超时发生就触发。 2000

定义的语言环境

  • af
  • bg
  • ca
  • cs
  • cz
  • da
  • de
  • en
  • es
  • fr
  • nl
  • tr
  • zh_CN
  • zh_TW

事件

名称 参数 描述
onProgress name 当一个模块被成功加载的时候触发。
onLoad name 当一个模块和它的依赖被成功加载的时候触发。

方法

名称 参数 描述
load module, callback 加载指定模块。当加载成功的时候一个回调函数将被调用。
module 参数的有效类型是:
单个 module 名称
一个 module 数组
用 '.css' 结尾的 css 文件
用 '.js' 结尾的 js 文件

点击查看所有 jQuery EasyUI 教程 文章: https://codercto.com/courses/l/42.html

查看所有标签

Pro Git (Second Edition)

Pro Git (Second Edition)

Scott Chacon、Ben Straub / Apress / 2014-11-9 / USD 59.99

Scott Chacon is a cofounder and the CIO of GitHub and is also the maintainer of the Git homepage ( git-scm.com ) . Scott has presented at dozens of conferences around the world on Git, GitHub and the ......一起来看看 《Pro Git (Second Edition)》 这本书的介绍吧!

JSON 在线解析
JSON 在线解析

在线 JSON 格式化工具

在线进制转换器
在线进制转换器

各进制数互转换器

XML 在线格式化
XML 在线格式化

在线 XML 格式化压缩工具