mirror of
https://gitee.com/vant-contrib/vant.git
synced 2025-04-05 19:41:42 +08:00
feat(CollapseItem): add lazy-render prop (#10279)
Co-authored-by: MozartHero <liulu06@qianxin.com>
This commit is contained in:
parent
5ba64ae8e1
commit
1d6a333791
@ -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 (
|
||||
<div
|
||||
vShow={this.show}
|
||||
|
@ -127,6 +127,7 @@ export default {
|
||||
| border | Whether to show inner border | _boolean_ | `true` |
|
||||
| disabled | Whether to disabled collapse | _boolean_ | `false` |
|
||||
| is-link | Whether to show link icon | _boolean_ | `true` |
|
||||
| lazy-render `v2.12.43` | Whether to lazy render util opened | _boolean_ | `true` |
|
||||
| title-class | Title className | _string_ | - |
|
||||
| value-class | Value className | _string_ | - |
|
||||
| label-class | Label className | _string_ | - |
|
||||
|
@ -129,6 +129,7 @@ export default {
|
||||
| border | 是否显示内边框 | _boolean_ | `true` |
|
||||
| is-link | 是否展示标题栏右侧箭头并开启点击反馈 | _boolean_ | `true` |
|
||||
| disabled | 是否禁用面板 | _boolean_ | `false` |
|
||||
| lazy-render `v2.12.43` | 是否在首次展开时才渲染面板内容 | _boolean_ | `true` |
|
||||
| title-class | 左侧标题额外类名 | _string_ | - |
|
||||
| value-class | 右侧内容额外类名 | _string_ | - |
|
||||
| label-class | 描述信息额外类名 | _string_ | - |
|
||||
|
Loading…
x
Reference in New Issue
Block a user