0
신생 sencha입니다. 패널에 아이콘을 추가하려고하는데 내 코드가 작동하지 않습니다.Sencha의 패널에 아이콘 추가
Ext.define('components.ImagePanel', {
extend: 'Ext.Panel',
initialize: function() {
this.callParent(arguments);
var image = {
xtype: "image",
src: 'icon.png',
width:100,
height:100
},
scope: this
};
this.add([image]);
});
내가 뭘 잘못하고 있니?
죄송합니다, 그것은 작동하지 않았다 : 어쨌든
...
가하기 위해 xtype을 사용하려면, 당신은 그래서 당신의 코드는 다음과 같이 보일 것이다Ext.widget();
를 사용하여 작성해야합니다 . –