欧美bbbwbbbw肥妇,免费乱码人妻系列日韩,一级黄片

EasyUI Tree樹組件無(wú)限循環(huán)的解決方法

 更新時(shí)間:2017年09月27日 15:30:24   作者:randeexiong  
這篇文章主要介紹了EasyUI Tree樹組件無(wú)限循環(huán)的解決方法,需要的朋友可以參考下

在學(xué)習(xí)jquery easyui的tree組件的時(shí)候,在url為鏈接地址的時(shí),發(fā)現(xiàn)如果最后一個(gè)節(jié)點(diǎn)的state為closed時(shí),未節(jié)點(diǎn)顯示為文件夾,單擊會(huì)重新加載動(dòng)態(tài)(Url:鏈接地址)形成無(wú)限循環(huán)。如:

tree.json

[{ 
  "id":1, 
  "text":"Folder1", 
  "iconCls":"icon-save", 
  "children":[{ 
    "text":"File1", 
    "checked":true 
  },{ 
    "text":"Books", 
    "state":"open", 
    "attributes":{ 
      "url":"/demo/book/abc", 
      "price":100 
    }, 
    "children":[{ 
      "text":"PhotoShop", 
      "checked":true,
      "state":"closed"      
    },{ 
      "id": 8, 
      "text":"Sub Bookds", 
      "state":"open" 
    }] 
  }] 
}] 
$('#box').tree({
    url :"tree.json",
    cascadeCheck : false,
    onlyLeafCheck : true,
    lines : true,
    formatter : function (node) {
      return '[' + node.text + ']';
    }
  });

tree組件無(wú)限循環(huán)截圖

這里寫圖片描述

解決方法:把末節(jié)點(diǎn)State狀態(tài)設(shè)為open可正常顯示

總結(jié)

以上所述是小編給大家介紹的EasyUI Tree樹組件無(wú)限循環(huán)的解決方法,希望對(duì)大家有所幫助,如果大家有任何疑問(wèn)請(qǐng)給我留言,小編會(huì)及時(shí)回復(fù)大家的。在此也非常感謝大家對(duì)腳本之家網(wǎng)站的支持!

相關(guān)文章

最新評(píng)論