EasyUI Forum
February 23, 2020, 12:18:16 AM *
Welcome, Guest. Please login or register.

Login with username, password and session length
News:
 
   Home   Help Search Login Register  
Pages: [1]
  Print  
Author Topic: expandAll and collapseAll in Vue EasyUI  (Read 693 times)
bbones
Newbie
*
Posts: 11


View Profile Email
« on: January 31, 2020, 05:20:54 AM »

Hi!

Is it possible to make expandAll and collapseAll in EasyUI for Vue tree component?

Or more general question how to call components methods that vue component wrapper doesn't have?

BR
Billy
Logged
jarry
Administrator
Hero Member
*****
Posts: 1783


View Profile Email
« Reply #1 on: February 02, 2020, 09:27:32 PM »

Change the state of a node to 'open' to expand and 'closed' to collapse it.
Code:
expand() {
this.data[0].children.forEach(node=>{
this.$set(node,'state','open');
})
},
collapse(){
this.data[0].children.forEach(node=>{
this.$set(node,'state','closed');
})
},
Logged
bbones
Newbie
*
Posts: 11


View Profile Email
« Reply #2 on: February 03, 2020, 04:49:26 AM »

Thank you, Jarry!

In my case
Code:
this.data.forEach(...

BR
Logged
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines Valid XHTML 1.0! Valid CSS!