优化js语法,提高兼容性

This commit is contained in:
augushong
2024-06-01 09:36:56 +08:00
parent fee373f423
commit 592bc66704
2 changed files with 7 additions and 7 deletions

View File

@@ -1313,7 +1313,7 @@
//触发排序事件
table.on('sort(' + option.layFilter + ')', function (obj) { //注sort 是工具条事件名test 是 table 原始容器的属性 lay-filter="对应的值"
var lastWhere = lastTableWhere[option.id] ?? {};
var lastWhere = lastTableWhere[option.id] ? lastTableWhere[option.id] : {};
lastWhere.sort = {};
lastWhere.sort[obj.field] = obj.type;