mirror of
https://gitee.com/zoujingli/ThinkAdmin.git
synced 2025-04-05 19:41:44 +08:00
Update admin.js
This commit is contained in:
parent
6519a78e9b
commit
ba2d60fe57
@ -50,10 +50,40 @@ window.jQuery = window.$ = window.jQuery || window.$ || layui.$;
|
||||
|
||||
/*! 配置 require 参数 */
|
||||
require.config({
|
||||
baseUrl: baseRoot, waitSeconds: 60, map: {'*': {css: baseRoot + 'plugs/require/css.js'}}, paths: {
|
||||
'vue': ['plugs/vue/vue.min'], 'md5': ['plugs/jquery/md5.min'], 'json': ['plugs/jquery/json.min'], 'xlsx': ['plugs/jquery/xlsx.min'], 'excel': ['plugs/jquery/excel.xlsx'], 'base64': ['plugs/jquery/base64.min'], 'upload': [tapiRoot + '/api.upload/index?'], 'notify': ['plugs/notify/notify.min'], 'angular': ['plugs/angular/angular.min'], 'cropper': ['plugs/cropper/cropper.min'], 'echarts': ['plugs/echarts/echarts.min'], 'ckeditor4': ['plugs/ckeditor4/ckeditor'], 'ckeditor5': ['plugs/ckeditor5/ckeditor'], 'websocket': ['plugs/socket/websocket'], 'pcasunzips': ['plugs/jquery/pcasunzips'], 'sortablejs': ['plugs/sortable/sortable.min'], 'vue.sortable': ['plugs/sortable/vue.draggable.min'], 'jquery.ztree': ['plugs/ztree/ztree.all.min'], 'jquery.masonry': ['plugs/jquery/masonry.min'], 'jquery.cropper': ['plugs/cropper/cropper.min'], 'jquery.autocompleter': ['plugs/jquery/autocompleter.min'],
|
||||
baseUrl: baseRoot,
|
||||
waitSeconds: 60,
|
||||
map: {'*': {css: baseRoot + 'plugs/require/css.js'}},
|
||||
paths: {
|
||||
'vue': ['plugs/vue/vue.min'],
|
||||
'md5': ['plugs/jquery/md5.min'],
|
||||
'json': ['plugs/jquery/json.min'],
|
||||
'xlsx': ['plugs/jquery/xlsx.min'],
|
||||
'excel': ['plugs/jquery/excel.xlsx'],
|
||||
'base64': ['plugs/jquery/base64.min'],
|
||||
'upload': [tapiRoot + '/api.upload/index?'],
|
||||
'notify': ['plugs/notify/notify.min'],
|
||||
'angular': ['plugs/angular/angular.min'],
|
||||
'cropper': ['plugs/cropper/cropper.min'],
|
||||
'echarts': ['plugs/echarts/echarts.min'],
|
||||
'ckeditor4': ['plugs/ckeditor4/ckeditor'],
|
||||
'ckeditor5': ['plugs/ckeditor5/ckeditor'],
|
||||
'websocket': ['plugs/socket/websocket'],
|
||||
'pcasunzips': ['plugs/jquery/pcasunzips'],
|
||||
'sortablejs': ['plugs/sortable/sortable.min'],
|
||||
'vue.sortable': ['plugs/sortable/vue.draggable.min'],
|
||||
'jquery.ztree': ['plugs/ztree/ztree.all.min'],
|
||||
'jquery.masonry': ['plugs/jquery/masonry.min'],
|
||||
'jquery.cropper': ['plugs/cropper/cropper.min'],
|
||||
'jquery.autocompleter': ['plugs/jquery/autocompleter.min'],
|
||||
}, shim: {
|
||||
'excel': {deps: [baseRoot + 'plugs/layui_exts/excel.js']}, 'notify': {deps: ['css!' + baseRoot + 'plugs/notify/light.css']}, 'cropper': {deps: ['css!' + baseRoot + 'plugs/cropper/cropper.min.css']}, 'websocket': {deps: [baseRoot + 'plugs/socket/swfobject.min.js']}, 'ckeditor5': {deps: ['jquery', 'upload', 'css!' + baseRoot + 'plugs/ckeditor5/ckeditor.css']}, 'vue.sortable': {deps: ['vue', 'sortablejs']}, 'jquery.ztree': {deps: ['jquery', 'css!' + baseRoot + 'plugs/ztree/zTreeStyle/zTreeStyle.css']}, 'jquery.autocompleter': {deps: ['jquery', 'css!' + baseRoot + 'plugs/jquery/autocompleter.css']},
|
||||
'excel': {deps: [baseRoot + 'plugs/layui_exts/excel.js']},
|
||||
'notify': {deps: ['css!' + baseRoot + 'plugs/notify/light.css']},
|
||||
'cropper': {deps: ['css!' + baseRoot + 'plugs/cropper/cropper.min.css']},
|
||||
'websocket': {deps: [baseRoot + 'plugs/socket/swfobject.min.js']},
|
||||
'ckeditor5': {deps: ['jquery', 'upload', 'css!' + baseRoot + 'plugs/ckeditor5/ckeditor.css']},
|
||||
'vue.sortable': {deps: ['vue', 'sortablejs']},
|
||||
'jquery.ztree': {deps: ['jquery', 'css!' + baseRoot + 'plugs/ztree/zTreeStyle/zTreeStyle.css']},
|
||||
'jquery.autocompleter': {deps: ['jquery', 'css!' + baseRoot + 'plugs/jquery/autocompleter.css']},
|
||||
}
|
||||
});
|
||||
|
||||
@ -518,7 +548,7 @@ $(function () {
|
||||
/*! 表单转JSON */
|
||||
$.fn.formToJson = function () {
|
||||
var self = this, data = {}, push = {};
|
||||
var rules = {key: /[a-zA-Z0-9_]+|(?=\[])/g, push: /^$/, fixed: /^\d+$/, named: /^[a-zA-Z0-9_]+$/};
|
||||
var rules = {key: /\w+|(?=\[])/g, push: /^$/, fixed: /^\d+$/, named: /^\w+$/};
|
||||
this.build = function (base, key, value) {
|
||||
return (base[key] = value), base;
|
||||
}, this.pushCounter = function (name) {
|
||||
@ -765,14 +795,11 @@ $(function () {
|
||||
|
||||
/*! 显示任务进度消息 */
|
||||
$.loadQueue = function (code, doScript, element) {
|
||||
var doAjax = true, doReload = false;
|
||||
var doAjax = true, doReload = false, template = '<div class="padding-30 padding-bottom-0" data-queue-load="{{d.code}}"><div class="layui-elip notselect nowrap" data-message-title><b class="color-desc">...</b></div><div class="margin-top-15 layui-progress layui-progress-big" lay-showPercent="yes"><div class="layui-progress-bar transition" lay-percent="0.00%"></div></div>' + '<div class="margin-top-15"><code class="layui-textarea layui-bg-black border-0" style="resize:none;overflow:hidden;height:190px"></code></div></div>';
|
||||
layer.open({
|
||||
type: 1, title: false, area: ['560px', '315px'], anim: 2, shadeClose: false, end: function () {
|
||||
doAjax = false;
|
||||
if (doReload && doScript) {
|
||||
$.layTable.reload(((element || {}).dataset || {}).tableId || true);
|
||||
}
|
||||
}, content: '' + '<div class="padding-30 padding-bottom-0" data-queue-load="' + code + '">' + ' <div class="layui-elip notselect nowrap" data-message-title></div>' + ' <div class="margin-top-15 layui-progress layui-progress-big" lay-showPercent="yes"><div class="layui-progress-bar transition" lay-percent="0.00%"></div></div>' + ' <div class="margin-top-15"><code class="layui-textarea layui-bg-black border-0" disabled style="resize:none;overflow:hidden;height:190px"></code></div>' + '</div>', success: function ($elem) {
|
||||
doAjax = doReload && doScript && $.layTable.reload(((element || {}).dataset || {}).tableId || true), false;
|
||||
}, content: laytpl(template).render({code: code}), success: function ($elem) {
|
||||
new function () {
|
||||
var that = this;
|
||||
this.$box = $elem.find('[data-queue-load=' + code + ']');
|
||||
|
Loading…
x
Reference in New Issue
Block a user