From 0c17aa8e554d968a53cc596fbc05dc084c358a92 Mon Sep 17 00:00:00 2001 From: erdanergou Date: Sat, 6 May 2023 09:29:54 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9F=A5=E8=AF=A2=E6=97=B6=E6=B7=BB=E5=8A=A0?= =?UTF-8?q?=E6=9F=A5=E8=AF=A2=E6=89=80=E6=9C=89=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../static/lib/layui-v2.6.3/layui.js | 42 ++++++++++++++----- .../pages/depository/table-stock.html | 2 +- 2 files changed, 32 insertions(+), 12 deletions(-) diff --git a/src/main/resources/static/lib/layui-v2.6.3/layui.js b/src/main/resources/static/lib/layui-v2.6.3/layui.js index 5620bb10..6b1eaf99 100644 --- a/src/main/resources/static/lib/layui-v2.6.3/layui.js +++ b/src/main/resources/static/lib/layui-v2.6.3/layui.js @@ -469,7 +469,18 @@ layui.define(function (e) { if ("object" == typeof e.elem) return void 0 === e.elem.length ? 2 : 3 }, u.prototype.view = function () { var e = this, a = e.config, t = a.groups = "groups" in a ? 0 | a.groups : 5; - a.layout = "object" == typeof a.layout ? a.layout : ["prev", "page", "next"], a.count = 0 | a.count, a.curr = 0 | a.curr || 1, a.limits = "object" == typeof a.limits ? a.limits : [10, 20, 30, 40, 50], a.limit = 0 | a.limit || 10, a.pages = Math.ceil(a.count / a.limit) || 1, a.curr > a.pages && (a.curr = a.pages), t < 0 ? t = 1 : t > a.pages && (t = a.pages), a.prev = "prev" in a ? a.prev : "上一页", a.next = "next" in a ? a.next : "下一页"; + a.layout = "object" == typeof a.layout ? a.layout : ["prev", "page", "next"], + a.count = 0 | a.count, a.curr = 0 | a.curr || 1, + a.limits = "object" == typeof a.limits ? a.limits : [10, 20, 30, 40, 50], + a.limit = 0 | a.limit || 10, + a.pages = Math.ceil(a.count / a.limit) || 1, + a.curr > a.pages && (a.curr = a.pages), + t < 0 ? t = 1 : t > a.pages && (t = a.pages), + a.prev = "prev" in a ? a.prev : "上一页", + a.next = "next" in a ? a.next : "下一页"; + if (a.limits.indexOf("all") === -1) { + a.limits.push("all"); + } var n = a.pages > t ? Math.ceil((a.curr + (t > 1 ? 1 : 0)) / (t > 0 ? t : 1)) : 1, i = { prev: function () { return a.prev ? '' + a.prev + "" : "" @@ -492,8 +503,10 @@ layui.define(function (e) { limit: function () { var e = ['" + if (n !== "all") { + e.push('") + } + }), e.push(''), e.join("") + "" }(), refresh: ['', '', ""].join(""), skip: function () { @@ -520,7 +533,13 @@ layui.define(function (e) { }); p && s.on(p, "change", function () { var e = this.value; - i.curr * e > i.count && (i.curr = Math.ceil(i.count / e)), i.limit = e, t.render() + if(e === "all"){ + e = i.count + } + i.curr * e > i.count && (i.curr = Math.ceil(i.count / e)), + i.limit = e, + + t.render() }), u && s.on(u, "click", function () { c() }) @@ -3702,18 +3721,18 @@ layui.define(function (e) { var t = this, a = function () { - r.ready(function () { - t.creat() - }) - }; + r.ready(function () { + t.creat() + }) + }; t.index = ++r.index, t.config.maxWidth = i(n).width() - 30, t.config = i.extend({}, t.config, o.config, e), document.body ? a() : setTimeout(function () { - a() - }, 30) + a() + }, 30) }; s.pt = s.prototype; var l = ["layui-layer", ".layui-layer-title", ".layui-layer-main", ".layui-layer-dialog", "layui-layer-iframe", "layui-layer-content", "layui-layer-btn", "layui-layer-close"]; @@ -6019,7 +6038,8 @@ layui.define(["laytpl", "laypage", "layer", "form", "util"], function (e) { var r = {}; r[l.pageName] = e, r[l.limitName] = a.limit; var d = t.extend(r, a.where); - a.contentType && 0 == a.contentType.indexOf("application/json") && (d = JSON.stringify(d)), i.loading(), t.ajax({ + a.contentType && 0 == a.contentType.indexOf("application/json") && (d = JSON.stringify(d)), i.loading(), + t.ajax({ type: a.method || "get", url: a.url, contentType: a.contentType, diff --git a/src/main/resources/templates/pages/depository/table-stock.html b/src/main/resources/templates/pages/depository/table-stock.html index f58bd789..23711663 100644 --- a/src/main/resources/templates/pages/depository/table-stock.html +++ b/src/main/resources/templates/pages/depository/table-stock.html @@ -260,7 +260,7 @@ {title: '操作', minWidth: 250, toolbar: '#currentTableBar', align: "center"} ] ], - limits: [10, 15, 20, 25, 50, 100], + limits: [10, 20, 50, 100], limit: 10, page: true, skin: 'line',