我嘗試添加提起文字和按鈕的網格面板中使用的ExtJS下面的代碼:如何將按鈕添加到extjs中的底部欄?
var shopIdInput = new Ext.form.TextField({
emptyText: "請輸入商戶Id",
width: 200
});
var deleteOneShopCacheBtn = new Ext.Button({
text : '刪除商戶緩存',
handler: deleteOneShopCache,
minWidth : 100,
cls: "delBtn"
});
......
var grid = new Ext.grid.GridPanel({
store: store,
columns: columns,
bbar: [shopIdInput, deleteOneShopCacheBtn],
buttons: [clearRedressWordCacheBtn, clearSplitWordCacheBtn, clearRegionCacheBtn, clearCategoryCacheBtn, runCommandBtn],
items: [commandForm],
buttonAlign: 'center',
stripeRows: true,
autoExpandColumn: 'serverUrl',
//title: '批量執行指令',
sm: checkboxSelect,
frame: true,
autoHeight: true,
enableColumnHide: false,
renderTo : 'serverInfoList'
});
但BBAR按鈕deleteOneShopCacheBtn看起來並不像一個普通的按鈕,在按鈕按鈕clearRedressWordCacheBtn。當鼠標在上面時,它會變成一個按鈕。我試圖通過設置屬性cls來解決問題並失敗,那麼我該怎麼辦?
HTTP {background-image的網址(../路徑/到/圖標)重要!}:// stackoverflow.com/questions/8477879/extjs-button-style-toolbar – MMT