使用bootstrap treeview插件使用addNode添加循環(huán)添加子節(jié)點時,當(dāng)添加的節(jié)點數(shù)量很大時瀏覽器很容易卡死,怎么解決添加大量子節(jié)點時慢的問題
1 回答

尚方寶劍之說
TA貢獻(xiàn)1788條經(jīng)驗 獲得超4個贊
//結(jié)點json數(shù)據(jù)
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']
- 1 回答
- 0 關(guān)注
- 609 瀏覽
添加回答
舉報
0/150
提交
取消