extjs中的Panel组件.docVIP

  1. 1、原创力文档(book118)网站文档一经付费(服务费),不意味着购买了该文档的版权,仅供个人/单位学习、研究之用,不得用于商业用途,未经授权,严禁复制、发行、汇编、翻译或者网络传播等,侵权必究。。
  2. 2、本站所有内容均由合作方或网友上传,本站不对文档的完整性、权威性及其观点立场正确性做任何保证或承诺!文档内容仅供研究参考,付费前请自行鉴别。如您付费,意味着您自己接受本站规则且自行承担风险,本站不退款、不进行额外附加服务;查看《如何避免下载的几个坑》。如果您已付费下载过本站文档,您可以点击 这里二次下载
  3. 3、如文档侵犯商业秘密、侵犯著作权、侵犯人身权等,请点击“版权申诉”(推荐),也可以打举报电话:400-050-0827(电话支持时间:9:00-18:30)。
  4. 4、该文档为VIP文档,如果想要下载,成为VIP会员后,下载免费。
  5. 5、成为VIP后,下载本文档将扣除1次下载权益。下载后,不支持退款、换文档。如有疑问请联系我们
  6. 6、成为VIP后,您将拥有八大权益,权益包括:VIP文档下载权益、阅读免打扰、文档格式转换、高级专利检索、专属身份标志、高级客服、多端互通、版权登记。
  7. 7、VIP文档为合作方或网友上传,每下载1次, 网站将根据用户上传文档的质量评分、类型等,对文档贡献者给予高额补贴、流量扶持。如果你也想贡献VIP文档。上传文档
查看更多
extjs中的Panel组件 今天介绍extjs中的Panel组件。 //html代码 div id=container ??? /div //js代码 var p = new Ext.Panel({ ??????? title: My Panel,//标题 ??????? collapsible:true,//右上角上的那个收缩按钮,设为false则不显示 ??????? renderTo: container,//这个panel显示在html中id为container的层中 ??????? width:400, ??????? height:200, ??????? html: p我是内容,我包含的html可以被执行!/p//panel主体中的内容,可以执行html代码 ??? }); 因为panel组件的子类组件包括TabPanel,GridPanel,FormPanel,TreePanel组件,所以非常有必要介绍Panel组件的配置参数和相关的属性、方法。 //配置参数(只列举部分常用参数) 1.autoLoad:有效的url字符串,把那个url中的body中的数据加载显示,但是可能没有样式和js控制,只是html数据 2.autoScroll:设为true则内容溢出的时候产生滚动条,默认为false 3.autoShow:设为true显示设为x-hidden的元素,很有必要,默认为false 4.bbar:底部条,显示在主体内,//代码:bbar:[{text:底部工具栏bottomToolbar}], 5.tbar:顶部条,显示在主体内,//代码:tbar:[{text:顶部工具栏topToolbar}], 6.buttons:按钮集合,自动添加到footer中(footer参数,显示在主体外)//代码:buttons:[{text:按钮位于footer}] 7.buttonAlign:footer中按钮的位置,枚举值为:left,right,center,默认为right 8.collapsible:设为true,显示右上角的收缩按钮,默认为false 9.draggable:true则可拖动,但需要你提供操作过程,默认为false 10.html:主体的内容 11.id:id值,通过id可以找到这个组件,建议一般加上这个id值 12.width:宽度 13.height:高度 13.title:标题 14.titleCollapse:设为true,则点击标题栏的任何地方都能收缩,默认为false. 15.applyTo:(id)呈现在哪个html元素里面 16.contentEl:(id)呈现哪个html元素里面,把el内的内容呈现 17.renderTo:(id)呈现在哪个html元素里面 //关于这三个参数的区别(个人认为:applyTo和RenderTo强调to到html元素中,contentEl则是html元素到ext组件中去): 英文如下(本人英语poor,不敢乱翻译): contentEl - This config option is used to take existing content and place it in the body of a new panel. It is not going to be the actual panel itself. (It will actually copy the innerHTML of the el and use it for the body). You should add either the x-hidden or the x-hide-display CSS class to prevent a brief flicker of the content before it is rendered to the panel. applyTo - This config option allows you to use pre-defined markup to create an entire Panel. By entire, I mean you can include the header, tbar, body, footer, etc. These elements must be in the correct order/hierarchy. Any components which are not found and need to be created will be autogenerated. renderTo - This config option allows you to render a Pan

文档评论(0)

df829393 + 关注
实名认证
文档贡献者

该用户很懒,什么也没介绍

1亿VIP精品文档

相关文档