From 00d8ad2f7cbb43aba9e3f18ce43d036ce7c793ab Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=B4=A4=E5=BF=83?= <3277200+sentsim@users.noreply.github.com> Date: Wed, 6 Jul 2022 08:56:32 +0800 Subject: [PATCH 1/2] update --- examples/table-test.html | 4 ++-- src/modules/laydate.js | 2 +- src/modules/table.js | 1 + 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/examples/table-test.html b/examples/table-test.html index ca2a8955..8e53c8f0 100644 --- a/examples/table-test.html +++ b/examples/table-test.html @@ -171,7 +171,7 @@ layui.use(['table', 'dropdown'], function(){ ]] //,autoSort: false // 禁用前端自动排序,由服务的完成排序 - ,initSort11111: { // 初始排序状态 + ,initSort: { // 初始排序状态 field: 'experience' //排序字段,对应 cols 设定的各字段名 ,type: 'desc' //排序方式 asc: 升序、desc: 降序、null: 默认排序 } @@ -263,7 +263,7 @@ layui.use(['table', 'dropdown'], function(){ //,url: '404' //,elem: null //,page: {curr: 5, limit: 20} - //,scrollPos: 'fixed' // 保持滚动条位置不变 + ,scrollPos: 'fixed' // 保持滚动条位置不变 }); break; case 'reloadData-deep': diff --git a/src/modules/laydate.js b/src/modules/laydate.js index 97a7be64..9bdb387a 100644 --- a/src/modules/laydate.js +++ b/src/modules/laydate.js @@ -816,7 +816,7 @@ }); return that; - } + }; //无效日期范围的标记 Class.prototype.limit = function(elem, date, index, time){ diff --git a/src/modules/table.js b/src/modules/table.js index add230be..403c5429 100644 --- a/src/modules/table.js +++ b/src/modules/table.js @@ -1315,6 +1315,7 @@ layui.define(['laytpl', 'laypage', 'form', 'util'], function(exports){ } else { //清除排序 thisData = layui.sort(data, table.config.indexName); delete that.sortKey; + delete options.initSort; } } From acc110c7f8eb8b9b47dc5eaf74c939d04855966c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=B4=A4=E5=BF=83?= <3277200+sentsim@users.noreply.github.com> Date: Wed, 6 Jul 2022 09:31:38 +0800 Subject: [PATCH 2/2] update --- examples/table-test.html | 2 +- examples/table.html | 4 ++-- src/modules/table.js | 17 ++++++++--------- 3 files changed, 11 insertions(+), 12 deletions(-) diff --git a/examples/table-test.html b/examples/table-test.html index 8e53c8f0..9cf2342a 100644 --- a/examples/table-test.html +++ b/examples/table-test.html @@ -171,7 +171,7 @@ layui.use(['table', 'dropdown'], function(){ ]] //,autoSort: false // 禁用前端自动排序,由服务的完成排序 - ,initSort: { // 初始排序状态 + ,initSort111: { // 初始排序状态 field: 'experience' //排序字段,对应 cols 设定的各字段名 ,type: 'desc' //排序方式 asc: 升序、desc: 降序、null: 默认排序 } diff --git a/examples/table.html b/examples/table.html index e890b28d..f1ab71cc 100644 --- a/examples/table.html +++ b/examples/table.html @@ -61,7 +61,7 @@