From 1fe8b214471854c770591d028b2a2e081d3d53a0 Mon Sep 17 00:00:00 2001 From: sight <1453017105@qq.com> Date: Sat, 2 Dec 2023 05:22:07 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=20table=20=E8=A1=A8=E5=A4=B4?= =?UTF-8?q?=E5=B1=9E=E6=80=A7=20`templet`=20=E4=BD=BF=E7=94=A8=E6=A8=A1?= =?UTF-8?q?=E6=9D=BF=E5=AD=97=E7=AC=A6=E4=B8=B2=E6=97=B6=EF=BC=8C=E4=B8=80?= =?UTF-8?q?=E4=BA=9B=E7=89=B9=E6=AE=8A=E7=9A=84=E8=87=AA=E5=AE=9A=E4=B9=89?= =?UTF-8?q?=20laytpl=20=E7=95=8C=E5=AE=9A=E7=AC=A6=E8=A2=AB=E8=BD=AC?= =?UTF-8?q?=E4=B9=89=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 例如使用 `<% %>` 作为界定符时,`<` 和 `>` 会被转义 close https://gitee.com/layui/layui/issues/I8L3OC --- src/modules/table.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/modules/table.js b/src/modules/table.js index 2b0d7ef4..08dcb4f9 100644 --- a/src/modules/table.js +++ b/src/modules/table.js @@ -97,7 +97,7 @@ layui.define(['lay', 'laytpl', 'laypage', 'form', 'util'], function(exports){ if(templet){ content = typeof templet === 'function' ? templet.call(item3, obj.tplData, obj.obj) - : laytpl($(templet).html() || String(content)).render($.extend({ + : laytpl((templet[0] === '#' ? $(templet).html() : templet) || String(content)).render($.extend({ LAY_COL: item3 }, obj.tplData)); }