Existing Component
Yes
Component Name
el-tree
Description
Now data (multi-level)
let treeData = [
{
label: 'level-1',
children: [
{
label: 'level-2',
children: [ ... ]
}
]
}
]
Maybe Better data (single-level)
let treeData = [
{
label: 'label-1',
parentLabel: null
},
{
label: 'label-2',
parentLabel: 'label-1'
},
{
label: 'label-3',
parentLabel: 'label-2'
}
]
Why we need single-level data?
Single-level data useful for F2E state management (Vuex, Redux or Flux) and B2E SQL normal response data.
单层数组对前端状态管理(Vuex,Redux 和 Flux)和后端默认 SQL 返回值更加友好。
2条答案
按热度按时间aamkag611#
Translation of this issue:
Existing Component
Yes
Component Name
el-tree
Description
Now data (multi-level)
Maybe Better data (single-level)
Why we need single-level data?
Single-level data useful for F2E state management (Vuex, Redux or Flux) and B2E SQL normal response data.
Single layer array is more friendly for front-end state management (vuex, Redux and flux) and back-end SQL default return value.
bqujaahr2#
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.