Home > front end >  Element vud. Js tree with lazy loading data
Element vud. Js tree with lazy loading data

Time:12-05

USES the element table control, table shows multi-stage tree inside.
Example:
: data="https://bbs.csdn.net/topics/tableData1"
Style="width: 100%"
The row - key="id"
Border
Lazy
: the load="load"
: tree - props="{children: 'children, the hasChildren:' the hasChildren '}" & gt;
Prop="date"
Label="date"
Width="180" & gt;

Prop="name"
Label="name"
Width="180" & gt;

Prop="address"
Label="address" & gt;


Lazy properties that define the data for lazy loading mode. Click on the load node, triggering the load. Request the background data. Data lower load the tree node.



Requirements: there are multiple trees, needs a 1 key function, directly on the current layer all unexpanded node.
The
system at difficult points:Load (tree, treeNode, resolve) {
SetTimeout ()=& gt; {
Resolve ([
{
Id: 31,
Date: '2016-05-01',
Name: 'x.h.'
Address: 'jinshajiang road, putuo district, Shanghai 1519 lane'
}, {
Id: 32,
Date: '2016-05-01',
Name: 'x.h.'
Address: 'jinshajiang road, putuo district, Shanghai 1519 lane'
}
])
}, 1000)
}
Tree and node. But if 1 key, the system returns the multiple data how to mount the corresponding tree nodes below.

CodePudding user response:

Click one button, a root node first, to be the root node data loading is completed, to control the secondary child node button automatically click, click, when its parent data as parameters into the data and then returns the mount to have the child nodes of the attribute on the incoming parameters, so on,

CodePudding user response:

reference 1st floor baiy20151018b response:
1 button, click the first root node, to be the root node data loading is completed, and automatic control level 2 child node button click, click, when its parent data as parameters into the data and then returns the mount to have the child nodes of the attribute on the incoming parameters, so on,

How to automatically click has child nodes nodes?

CodePudding user response:

From the top...
  • Related