【发布时间】:2015-03-11 10:12:14
【问题描述】:
我想创建一个从 sap.suite.ui.commons.GenericTile 继承的图块,并且只显示一个图标(位于图块中间)。由于居中,我无法使用标准聚合或属性,因为它们将图标放置在特定位置(位于左下侧)。
我尝试了以下方法,但没有成功:
$.sap.declare("myAddTile");
sap.suite.ui.commons.GenericTile.extend("myAddTile", {
init: function() {
// do something for initialization...
sap.suite.ui.commons.GenericTile.prototype.init.call(this);
},
renderer: function(oRm, oControl) {
var oPlusIcon = new sap.ui.core.Icon({
src: 'sap-icon://sys-add'
}).placeAt(oControl);
sap.suite.ui.commons.GenericTileRenderer.render(oRm, oControl);
}
});
生成的图块是空的...
【问题讨论】: