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] 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 @@
- +
@@ -78,7 +78,7 @@
- +
diff --git a/src/modules/table.js b/src/modules/table.js index 2bcf1498..97acb8ad 100644 --- a/src/modules/table.js +++ b/src/modules/table.js @@ -124,6 +124,7 @@ layui.define(['laytpl', 'laypage', 'form', 'util'], function(exports){ ,ELEM_SORT = '.layui-table-sort' ,ELEM_EDIT = 'layui-table-edit' ,ELEM_HOVER = 'layui-table-hover' + ,ELEM_COL_SPECIAL = 'layui-table-col-special' ,DATA_MOVE_NAME = 'LAY_TABLE_MOVE_DICT' @@ -976,7 +977,7 @@ layui.define(['laytpl', 'laypage', 'form', 'util'], function(exports){ }() +' class="'+ function(){ //追加样式 var classNames = []; if(item3.hide) classNames.push(HIDE); //插入隐藏列样式 - if(!item3.field) classNames.push('layui-table-col-special'); //插入特殊列样式 + if(!item3.field) classNames.push(ELEM_COL_SPECIAL); //插入特殊列样式 return classNames.join(' '); }() +'">' ,'
' ,'
联系人