parent
7613d098c5
commit
01294ad47b
|
@ -17,6 +17,11 @@ export default {
|
|||
value: 'zhinan',
|
||||
label: '指南',
|
||||
children: [
|
||||
{
|
||||
value: 'quick-started',
|
||||
label: '快速开始',
|
||||
children: []
|
||||
},
|
||||
{
|
||||
value: 'anzhuang',
|
||||
label: '安装',
|
||||
|
|
|
@ -45,7 +45,7 @@ export default class Node {
|
|||
const childrenKey = config.children
|
||||
const childrenData = this.data[childrenKey]
|
||||
|
||||
this.hasChildren = Array.isArray(childrenData)
|
||||
this.hasChildren = Array.isArray(childrenData) && childrenData.length > 0
|
||||
this.children = (childrenData || []).map((child) => new Node(child, config, this))
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue