GZMachinesWeb/WebContent/static/js/index.js

30 lines
1.3 KiB
JavaScript
Raw Permalink Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

/**
* layui的主入口模块
*/
layui.define(['layer', 'form', 'element', 'table'], function(exports){
var $ = layui.jquery,
layer = layui.layer,
form = layui.form,
element = layui.element,
table = layui.table;
// 定义全局变量
var global = {
// 公共事件监听
eventListener: function() {
// 返回按钮事件监听
$(document).on('click', '.js-back', function() {
history.back(-1);
});
},
// 初始化方法
init: function() {
this.eventListener();
}
};
// 对外输出全局对象
exports('index', global);
});