From 36172098749dde2213a2bacffc6982137ca403fa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=B4=A4=E5=BF=83?= <3277200+sentsim@users.noreply.github.com> Date: Thu, 17 Apr 2025 23:16:17 +0800 Subject: [PATCH] =?UTF-8?q?fix(component):=20=E4=BC=98=E5=8C=96=20render,?= =?UTF-8?q?=20events=20=E6=89=A7=E8=A1=8C=E7=9A=84=E6=9D=A1=E4=BB=B6=20(#2?= =?UTF-8?q?643)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/modules/component.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/modules/component.js b/src/modules/component.js index 6a5b46f1..29c1fa2a 100644 --- a/src/modules/component.js +++ b/src/modules/component.js @@ -152,14 +152,14 @@ layui.define(['jquery', 'lay'], function(exports) { } // 渲染 - if (typeof settings.render === 'function') { + if (typeof that.render === 'function') { component.cache.id[options.id] = null; // 记录所有实例 id,用于批量操作(如 resize) elem.attr(MOD_ID, options.id); // 目标元素已渲染过的标记 that.render(rerender); // 渲染核心 } // 事件 - typeof settings.events === 'function' && that.events(); + typeof that.events === 'function' && that.events(); }; // 组件必传项