From 1d6a333791b9ccc6a5dad2aee8a2b3585c1d7ceb Mon Sep 17 00:00:00 2001 From: MozartHero <34850028+MozartHero@users.noreply.github.com> Date: Thu, 10 Feb 2022 19:53:18 +0800 Subject: [PATCH] feat(CollapseItem): add lazy-render prop (#10279) Co-authored-by: MozartHero --- src/collapse-item/index.js | 6 +++++- src/collapse/README.md | 1 + src/collapse/README.zh-CN.md | 1 + 3 files changed, 7 insertions(+), 1 deletion(-) diff --git a/src/collapse-item/index.js b/src/collapse-item/index.js index 08542e809..251d31036 100644 --- a/src/collapse-item/index.js +++ b/src/collapse-item/index.js @@ -20,6 +20,10 @@ export default createComponent({ ...cellProps, name: [Number, String], disabled: Boolean, + lazyRender: { + type: Boolean, + default: true, + }, isLink: { type: Boolean, default: true, @@ -155,7 +159,7 @@ export default createComponent({ }, genContent() { - if (this.inited) { + if (this.inited || !this.lazyRender) { return (