From 245cd9ddb7321782c1ad94c05bcd7432b02ee756 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=AD=A3=E5=9C=A3=E5=8D=8E?= <752718920@qq.com> Date: Thu, 7 Nov 2019 14:11:22 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E5=85=AC=E5=85=B1js=E7=9A=84?= =?UTF-8?q?bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- erp_web/js/common/common.js | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/erp_web/js/common/common.js b/erp_web/js/common/common.js index 7c57f2fb..fb9f6ba6 100644 --- a/erp_web/js/common/common.js +++ b/erp_web/js/common/common.js @@ -57,10 +57,12 @@ } function dgResize() { var searchTabHeight = $('#searchTable').height(); - $('#tableData').datagrid('resize', { - width: $(window).width() - 6, - height: $(window).height() - searchTabHeight -46 - }); + if($('#tableData').length) { + $('#tableData').datagrid('resize', { + width: $(window).width() - 6, + height: $(window).height() - searchTabHeight -46 + }); + } } $(window).resize(function () { dgResize();