我正在使用3個按鈕進行sap.m.Dialog控件工作,我需要在左側顯示按鈕「A」,在中間按鈕「B」並按鈕「C」在右側。sap.m.Dialog按鈕聚合中按鈕之間的空間聚合
請參考下面的代碼和截圖
Controller.js
var oDialog = new Dialog({
title: "Dialog",
type: 'Message',
content: new Text({ text: "" }),
buttons : [
new sap.m.Button({
text: "A"
}),
new sap.m.Button({
text: "B"
}),
new sap.m.Button({
text: "C"
})
],
afterClose: function() {
oDialog.destroy();
}
});
oDialog.open();
我的解決方法:
var oDialog = new Dialog({
title: "Dialog",
type: 'Message',
content: new Text({ text: "" }),
buttons : [
new sap.m.Button({
text: "A"
}),
// below added few dummy buttons to show space like effect at UI
new sap.m.Button({text: "", visible:true, enabled:false}),
new sap.m.Button({text: "", visible:true, enabled:false}),
new sap.m.Button({
text: "B"
}),
// below added few dummy buttons to show space like effect at UI
new sap.m.Button({text: "", visible:true, enabled:false}),
new sap.m.Button({text: "", visible:true, enabled:false}),
new sap.m.Button({
text : "C"
})
],
afterClose: function() {
oDialog.destroy();
}
});
oDialog.open();
我已經添加的按鈕與空白的文本後,不知何故,我已經實現顯示空格鍵之間,但這是在加樣作用空間正道UI?或者有什麼合適的方法來滿足我的要求?
您的解決方法是否適用於移動設備? – Marc
它的工作,但用戶界面得到了符文,只有一個按鈕是可見的右手柄一側,其餘的2按鈕有自動隱藏進overflowButton – Prashob
我只是想知道你的「空」按鈕顯示。 – Marc