EquipmentManagement/js/treeview_C.js
(开头部分) 6KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
function TreeView(obj,target){
this.obj=obj;
this.target = 'midFrame';
this.root=new node(0);
this.nodes=[]
this.currentNode=null;
this.html=""
this.config={
root :'images/tree/web.gif',
open :'images/tree/open.gif',
close :'images/tree/close.gif',
file :'images/tree/file.gif',
join :'images/tree/T.gif',
joinbottom :'images/tree/L.gif',
plus :'images/tree/Tplus.gif',
plusbottom :'images/tree/Lplus.gif',
minus :'images/tree/Tminus.gif',
minusbottom :'images/tree/Lminus.gif',
blank :'images/tree/empty.gif',
line :'images/tree/dd.gif'
}
for(i in this.config){var tem=this.config[i];this.config[i]=new Image();this.config[i].src=tem}
}
function node(id,pid,txt,link,s,title,target){
this.s=s
this.id=id
this.pid=pid
this.txt=txt
this.link=link
this.title=title
this.target=target
this.indent=""
this.lastNode=false;
this.open=false;
this.hasNode=false
}
TreeView.prototype.getP=function(nid){
var nNode=this.nodes[nid]
for(var i=0;i<this.nodes.length;i++)
if(this.nodes[i].id==nNode.pid)return i
return null
}
TreeView.prototype.add=function(id,pid,txt,link,s,title,target){
var itemTxt=txt?txt:"New Item"
var itemLink=link?link:''
var items=s?s:'';
var itemTitle=title?title:itemTxt;
var itemTarget=target?target:this.target;
this.nodes[this.nodes.length]=new node(id,pid,itemTxt,itemLink,items,itemTitle,itemTarget)
pid==this.root.id?this.nodes[this.nodes.length-1].open=true:''
}
TreeView.prototype.DrawTree=function(pNode){
var str=""
for(var i=0;i<this.nodes.length;i++){
if(this.nodes[i].pid==pNode.id){
str+=this.DrawNode(i)
后面还有 139 行代码,购买后查看完整代码
24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明
AI 解读 AI
登录后可用,每次 10 算力,解读结果公开显示在下面。
还没有人解读过这个文件。