EXTJS 代码:

第一种方法:

{
title: '汽车信息管理',
layout: 'fit',
items: [
{
xtype: 'treepanel',
border: 0,
rootVisible: false,
root: {
expanded: true,
children: [
{
text: '汽车信息管理1',
leaf: true,
id: '/UI/Page/ProductManagement/ui_html_PKU_Car/PM_CT_CarType.html'
}, {
text: '汽车信息管理2',
leaf: true,
id: '/UI/Page/ProductManagement/ui_html_PKU_Car/PM_CT_CarType.html1'
},
]
},
listeners: {
//添加节点点击事件
itemclick: function (v, r, item) {
var n = tab.getComponent(r.raw.id);
if (r.raw.id == 'root') {
return;
}
if (!n) { // 判断是否已经打开该面板
n = tab.add({
'id': r.raw.id,
'title': r.raw.text,
closable: true, // 通过html载入目标页
html: '<iframe scrolling="auto" frameborder="0" width="100%" height="100%" src="' + r.raw.id + '"></iframe>'
});
}
tab.setActiveTab(n);
}
}
}
]
},

第二种写法:

{
title: '实体商品订单管理',
xtype: 'treepanel',
expanded: true,
animate: true,
enableDD: false,
border: false,
containerScroll: true,
root: {
text: '实体商品订单管理',
id: 'root',
children: [{
text: '买家查看',
leaf: true,
id: '/UI/Page/ProductManagement/ui_html_Orders/ui_html_Orders_Real_byBuyer.html'
}, {
text: '卖家查看',
leaf: true,
id: '/UI/Page/ProductManagement/ui_html_Orders/ui_html_Orders_Real_bySeller.html'
}, {
text: '商品类型(汽车配件)',
leaf: true,
id: '/UI/Page/ProductManagement/ui_html_Orders/ui_html_Orders_Real_byProductModelForCarPart.html'
}, {
text: '商品类型(汽车用品)',
leaf: true,
id: '/UI/Page/ProductManagement/ui_html_Orders/ui_html_Orders_Real_byProductModelForCarAcce.html'
}]
},
listeners: {
//添加节点点击事件
itemclick: function (v, r, item) {
var n = tab.getComponent(r.raw.id);
if (r.raw.id == 'root') {
return;
}
if (!n) { // 判断是否已经打开该面板
n = tab.add({
'id': r.raw.id,
'title': r.raw.text,
closable: true, // 通过html载入目标页
html: '<iframe scrolling="auto" frameborder="0" width="100%" height="100%" src="' + r.raw.id + '"></iframe>'
});
}
tab.setActiveTab(n);
}
}
}

最新文章

  1. C++实现线程安全的单例模式
  2. .NET平台和C#编程的总结
  3. 利用for循环找出1000以内的质数
  4. Struts2入门(五)——OGNL和标签库
  5. jQuery 2.0.3 源码分析Sizzle引擎 - 解析原理
  6. 【python】global
  7. linux终端python自动提示
  8. Lucene实践
  9. AO创建IFeature的两种方法
  10. BOM 和 JavaScript 中的 trim
  11. Bayer RGB和RGB Raw
  12. reaver 使用方法和技巧
  13. redis内存管理代码的目光
  14. SpringMVC处理ajax请求的注意事项
  15. ELK学习笔记(三)单台服务器多节点部署
  16. JavaScript数据结构与算法(五) 数组基础算法
  17. HBase Region级别二级索引
  18. JNI技术简介-android学习之旅(92)
  19. CodeForces - 777B Game of Credit Cards 贪心
  20. 排序学习实践---ranknet方法

热门文章

  1. 【Irrlicht鬼火引擎】掌握引擎使用流程,入门程序HelloWorld
  2. 如何同时启动多个Tomcat服务器
  3. android输入框显示在软键盘上边
  4. %r与%s的区别
  5. Web前端开发:SQL Jsp小项目(一)
  6. Objective-C 【多个对象内存管理(野指针&amp;内存泄漏)】
  7. 前端笔记——获取url里面的参数值
  8. Smarty模板引擎技术
  9. 【转】JavaScript中undefined与null的区别
  10. MySQL的相关设置