Angularivh-treeview所有节点默认展开
Angular ivh-treeview all nodes expand by default
正在处理 AngularJS ivh-treeview。
我想看到默认展开的所有子节点。
目前这是我的树结构:
$rootScope.nodes= [{
label: 'node1',
value: 'node1',
enable:true,
children: [{
label: 'child1',
value: 'child1',
enable:true,
children: [{
label: 'child2',
value: 'child2',
enable:true,
}]
},{
label: 'node2',
value: 'node2',
enable:true,
}]
}];
目前在 child1 标签的左侧有一个 + 标志。
它还有一个子子项 child2 但我必须单击
+ 符号查看它。
另外,当我在 child1 中拖动一个节点时,我看不到它
我必须点击 + 符号才能查看。
我想默认查看所有子节点。我的意思是应该没有
当我拖动一个新节点时需要点击 + 符号。
我找到了一个解决方案:
ivh-treeview-expand-to-depth="2"
但是在这里我们必须指定一个值...就像上面...我想要
像这样传递一些东西
ivh-treeview-expand-to-depth="*" 或 ivh-treeview-expand-to-depth="infinite"
这样我就可以默认查看所有子节点,或者当我拖动一个新节点时它应该是可见的。
您可以使用ivh-treeview-expand-to-depth="-1"
默认展开所有节点。请参阅项目自述文件的 默认展开 部分:https://github.com/iVantage/angular-ivh-treeview#expanded-by-default。这就是您要找的吗?
正在处理 AngularJS ivh-treeview。
我想看到默认展开的所有子节点。
目前这是我的树结构:
$rootScope.nodes= [{
label: 'node1',
value: 'node1',
enable:true,
children: [{
label: 'child1',
value: 'child1',
enable:true,
children: [{
label: 'child2',
value: 'child2',
enable:true,
}]
},{
label: 'node2',
value: 'node2',
enable:true,
}]
}];
目前在 child1 标签的左侧有一个 + 标志。 它还有一个子子项 child2 但我必须单击 + 符号查看它。
另外,当我在 child1 中拖动一个节点时,我看不到它 我必须点击 + 符号才能查看。
我想默认查看所有子节点。我的意思是应该没有 当我拖动一个新节点时需要点击 + 符号。
我找到了一个解决方案:
ivh-treeview-expand-to-depth="2"
但是在这里我们必须指定一个值...就像上面...我想要 像这样传递一些东西
ivh-treeview-expand-to-depth="*" 或 ivh-treeview-expand-to-depth="infinite"
这样我就可以默认查看所有子节点,或者当我拖动一个新节点时它应该是可见的。
您可以使用ivh-treeview-expand-to-depth="-1"
默认展开所有节点。请参阅项目自述文件的 默认展开 部分:https://github.com/iVantage/angular-ivh-treeview#expanded-by-default。这就是您要找的吗?