为了账号安全,请及时绑定邮箱和手机立即绑定

bootstrap treeview添加大量子节点 ?

bootstrap treeview添加大量子节点 ?

忽然笑 2018-11-16 19:15:12
使用bootstrap treeview插件使用addNode添加循环添加子节点时,当添加的节点数量很大时浏览器很容易卡死,怎么解决添加大量子节点时慢的问题
查看完整描述

1 回答

?
尚方宝剑之说

TA贡献1788条经验 获得超4个赞

//结点json数据
var defaultData = [
{
text: 'Parent 1',
href: '#parent1',
tags: ['4'],
state: {
checked: true,
},
nodes: [
{
text: 'Child 1',
href: '#child1',
tags: ['2'],
nodes: [
{
text: 'Grandchild 1',
href: '#grandchild1',
tags: ['0']
},
{
text: 'Grandchild 2',
href: '#grandchild2',
tags: ['0']



查看完整回答
反对 回复 2018-12-16
  • 1 回答
  • 0 关注
  • 555 浏览

添加回答

举报

0/150
提交
取消
意见反馈 帮助中心 APP下载
官方微信