Element: How can the [feature request] tree form be expanded and folded dynamically through JavaScript?

Created on 28 Oct 2019  ·  5Comments  ·  Source: ElemeFE/element

Existing Component

Component Name

el-table

Description

希望能够添加方法动态展开与折叠树形表格

stale

Most helpful comment

@moabtools

Define a reactive property, such as isExpanded.

Then force the table to render

this.isExpanded = false
this.$nextTick(() => this.isExpanded = true)

All 5 comments

Translation of this issue:

Existing component

yes

Component name

El-table

Description

Hope to add methods to expand and collapse tree table dynamically

Now, I can only use V-IF to force the refresh of subcomponents to dynamically expand and collapse the tree list.

How to use V-IF for that?

@moabtools

Define a reactive property, such as isExpanded.

Then force the table to render

this.isExpanded = false
this.$nextTick(() => this.isExpanded = true)

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

Kingwl picture Kingwl  ·  3Comments

makunsusu picture makunsusu  ·  3Comments

chao-hua picture chao-hua  ·  3Comments

FranzSkuffka picture FranzSkuffka  ·  3Comments

yubo111 picture yubo111  ·  3Comments