From 47728370e8ac3e272c3a61c0e15a6bbef17a74a0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=B4=A4=E5=BF=83?= <3277200+sentsim@users.noreply.github.com> Date: Fri, 28 Jun 2024 16:53:32 +0800 Subject: [PATCH] =?UTF-8?q?fix(table):=20=E4=BF=AE=E5=A4=8D=E6=97=A0?= =?UTF-8?q?=E6=95=B0=E6=8D=AE=E6=97=B6=EF=BC=8C=E7=82=B9=E5=87=BB=E5=8F=B3?= =?UTF-8?q?=E4=B8=8A=E8=A7=92=E5=B7=A5=E5=85=B7=E6=A0=8F=E5=9B=BE=E6=A0=87?= =?UTF-8?q?=E5=87=BA=E7=8E=B0=E6=8F=90=E7=A4=BA=E9=94=99=E4=BD=8D=E7=9A=84?= =?UTF-8?q?=E9=97=AE=E9=A2=98=20(#2067)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/modules/table.js | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/src/modules/table.js b/src/modules/table.js index 9c4a37f1..bcdf6277 100644 --- a/src/modules/table.js +++ b/src/modules/table.js @@ -706,10 +706,11 @@ layui.define(['lay', 'laytpl', 'laypage', 'form', 'util'], function(exports){ var data = obj.data; var options = obj.config; var openPanel = obj.openPanel; + var elem = obj.elem; - if (!data.length) return layer.tips('当前表格无数据', this, {tips: 3}); + if (!data.length) return layer.tips('当前表格无数据', elem, {tips: 3}); if(device.ie){ - layer.tips('导出功能不支持 IE,请用 Chrome 等高级浏览器导出', this, { + layer.tips('导出功能不支持 IE,请用 Chrome 等高级浏览器导出', elem, { tips: 3 }); } else { @@ -736,8 +737,9 @@ layui.define(['lay', 'laytpl', 'laypage', 'form', 'util'], function(exports){ onClick: function(obj) { var data = obj.data; var options = obj.config; + var elem = obj.elem; - if (!data.length) return layer.tips('当前表格无数据', this, {tips: 3}); + if (!data.length) return layer.tips('当前表格无数据', elem, {tips: 3}); var printWin = window.open('about:blank', '_blank'); var style = ['