extJs 2.0学习笔记-------Ext.Panel

论坛 期权论坛     
选择匿名的用户   2021-6-2 17:31   133   0
<div class="cnt" id="blog_text">
这一篇翻译自
<strong style="background-color: #ffff66; color: black;">extJs</strong> 2.0官方文档。花了我一个晚上加一个上午的时间才搞定。这篇是关于config的。
<p>  <span style="color: #ff00ff;"><strong>我在网上查了很久,关于<strong style="background-color: #ffff66; color: black;">ExtJs</strong>的core部分的中文文档还是<a name="baidusnap3"></a><strong style="background-color: #ff9999; color: black;">有</strong>不少,但是关于panel,window这些呢就好像不大齐全,而且,在js堂,它的文档翻译还在1.1。所以呢想翻译出来,以<a name="baidusnap2"></a><strong style="background-color: #99ff99; color: black;">后</strong>大家也好查阅。</strong></span></p>
<p><span style="color: #ff00ff;"><strong>  本人js水平、英文水平都<strong style="background-color: #ff9999; color: black;">有</strong>限,还好,通过看源代码两相印证,终于还是搞出来了。欢迎各位提出宝贵的意见。事实上,只要搞定了panel,其也组件的config差不多。大同小异。嘿嘿。一通百通啊。</strong></span></p>
<p>activeItem : String/Number<br>用于设置当前活动的子组件,取值为此子组件的序号或者是id。但是它只能应用于那种一次只能显示一个子组件的布局类,例如:Ext.layout.Accordion, Ext.layout.CardLayout和Ext.layout.FitLayout。</p>
<p>allowDomMove;Boolean<br>是否可以在组件呈现的过程中移动组件的dom节点。默认值为true。</p>
<p>animCollapse : Boolean<br>设置是否在面板收缩时起用动画,如果Ext.Fx<strong style="background-color: #ff9999; color: black;">有</strong>效(被包含进来)则默认为true,否则为false。</p>
<p>applyTo:Mixed<br>x-panel对应的div的id。</p>
<p><br>autoDestroy : Boolean<br>如果要把一个子组件从panel中移除且此值为true,则在移除的过程中自动会销毁此组件,返之,则不会,必须要手工销毁,默认值为true。</p>
<p><br>autoHeight : Boolean<br>如果为true,把this.el.dom.style.height&#61;&amp;apos;auto&amp;apos;。默认值为false。</p>
<p>autoScroll : Boolean<br>为true时,则把this.body.dom.style.overflow&#61;&amp;apos;auto&amp;apos;。默认值为false。</p>
<p>autoShow : Boolean<br>为true时,检查组件是否被设成<a name="baidusnap1"></a><strong style="background-color: #a0ffff; color: black;">隐藏</strong>,如果<strong style="background-color: #ff9999; color: black;">有</strong>,则移除这个效果。</p>
<p>autoWidth : Boolean<br>同autoHeight一样。。</p>
<p>baseCls : String<br>this.baseCls的class(默认值为&amp;apos;x-panel&amp;apos;)</p>
<p>bbar : Object/Array<br>面板底部的工具栏。它可是一个Ext.Toolbar对象,也可以是一个toolbar的 config对象,或者是一个要加入到工具栏的按钮的config的数组。注意:这个属性在render<strong style="background-color: #99ff99; color: black;">后</strong>就无效了,如果要在render<strong style="background-color: #99ff99; color: black;">后</strong>使用它,请使用 getBottomToolbar获得引用。</p>
<p>bodyBorder : Boolean<br>如果为true则为this.el对应的元素显示边框,默认值为true。这只在border&#61;&#61;true时才<strong style="background-color: #ff9999; color: black;">有</strong>效。如果border&#61;&#61;true且bodyBorder&#61;&#61;false,那么将显示1px的inset边框。给予this.el inset的效果。</p>
<p>bodyStyle : String/Object/Function<br>要应用到this.el上的css class。它的格式需求与Ext.Element.applyStyle一样,默认值为null。</p>
<p>border : Boolean<br>也是设this.body的边框的,默认值为true,此时,默认情况下边框为2px。当然,它还会被bodyBorder影响。</p>
<p>buttonAlign : String<br>加入到面板中的按钮的对齐方式,合法值为:&amp;apos;right&amp;apos;,&amp;apos;left&amp;apos;,&amp;apos;cente&amp;apos;,默认值为&amp;apos;right&amp;apos;。</p>
<p>buttons : Array<br>Ext.Button的config数组,用于加入按钮到面板的footer中。</p>
<p>cls : String<br>this.el的class。</p>
<p>collapseFirst : Boolean<br>当显示title bar时,是否总把收缩、展开按钮放在所<strong style="background-color: #ff9999; color: black;">有</strong>其他按钮的前面。默认值为true。</p>
<p>collapsed : Boolean<br>在呈现时,是收缩还是展开。为true则收缩,默认值为false。</p>
<p><br>collapsedCls : String<br>当面板处于收缩状态时,this.el所对应的class,默认值为&amp;apos;x-panel-collapsed&amp;apos;。</p>
<p>collapsible : Boolean<br>此面板是否可收缩或者说是否能显示收缩、伸展按钮。真为显示。默认值为false。</p>
<p>contentEl : String<br>一个已存在的dom的id。作用是用于在afterRender<strong style="background-color: #99ff99; color: black;">后</strong>把它this.body.dom.appendChild掉。默认值为&amp;apos;&amp;apos;。</p>
<p>ctCls : String<br>设this.container的class。</p>
<p>defaultType : String<br>当在构
分享到 :
0 人收藏
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

积分:3875789
帖子:775174
精华:0
期权论坛 期权论坛
发布
内容

下载期权论坛手机APP