簡體   English   中英

Extjs-面板底部的停靠按鈕

[英]Extjs - Dock Button to bottom of the Panel

我想在extjs中將“ 憑據”按鈕對齊到面板的底部,是否有任何特定屬性可僅對面板內部的按鈕執行此操作。 這里沒有工具欄的參與:

在此處輸入圖片說明

小提琴鏈接: https : //jsfiddle.net/arya9/rmad2cpb/

檢查這個小提琴。 您只需要在面板的dockedItems中添加該按鈕

{
        xtype: 'panel',
        renderTo: Ext.getBody(),
        layout: 'vbox',
        height: 400,
        padding: 20,
        defaults: {
            xtype: 'button',
            margin: '0 0 12 0'
        },

        items: [{
            text: 'Normal Button'

        }, {
            text: 'Basic Button'
        }],

        dockedItems: [{
            xtype: 'button',
            dock: 'bottom',
            text: 'Docked Button',
            margin: '0 0 12 0'
        }]
    }

https://fiddle.sencha.com/#view/editor&fiddle/25aa

希望以下代碼可以根據您的要求為您提供幫助。

 Ext.create('Ext.Window',{
        width:200,
        height:400,
        layout:'vbox',
        items:[{
         xtype:'button',
         text:'First'
        },{
          xtype:'panel',
          flex:1
        },{
         xtype:'button',
         text:'Second'
        }]
    }).show();

您可以在sencha小提琴中檢查它是否正常工作https://fiddle.sencha.com/#view/editor&fiddle/25a9

使用工具欄,將xtype:' spacer '更改為xtype:' tbfill '

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM