From 528e8e8c7740ad182b6756e52d280ab8721e413c Mon Sep 17 00:00:00 2001 From: Diyar-IT <136627746+Diyar-IT@users.noreply.github.com> Date: Tue, 22 Aug 2023 16:11:49 +0800 Subject: [PATCH] =?UTF-8?q?table.js=E5=A2=9E=E5=8A=A0=E4=BA=86=E5=B0=8F?= =?UTF-8?q?=E6=8F=90=E7=A4=BA^=5F^?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/modules/table.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/modules/table.js b/src/modules/table.js index 09cbf755..50525a40 100644 --- a/src/modules/table.js +++ b/src/modules/table.js @@ -1845,6 +1845,7 @@ layui.define(['lay', 'laytpl', 'laypage', 'form', 'util'], function(exports){ switch(events){ case 'LAYTABLE_COLS': // 筛选列 + if (!table.cache[options.id].length) return layer.msg('暂时没有数据,不能使用筛选列功能!', {icon: 5}); openPanel({ list: function(){ var lis = []; @@ -1890,6 +1891,7 @@ layui.define(['lay', 'laytpl', 'laypage', 'form', 'util'], function(exports){ }); break; case 'LAYTABLE_EXPORT': // 导出 + if (!table.cache[options.id].length) return layer.msg('暂时没有数据,不能使用导出功能!', {icon: 5}); if(device.ie){ layer.tips('导出功能不支持 IE,请用 Chrome 等高级浏览器导出', this, { tips: 3 @@ -1912,6 +1914,7 @@ layui.define(['lay', 'laytpl', 'laypage', 'form', 'util'], function(exports){ } break; case 'LAYTABLE_PRINT': // 打印 + if (!table.cache[options.id].length) return layer.msg('暂时没有数据,不能使用打印功能!', {icon: 5}); var printWin = window.open('about:blank', '_blank'); var style = ['