아래 코드의 마지막 두 줄에 항목을 추가하는 방법을 모르겠습니다. flickr의 이미지가 올바르게로드되고 있습니다. TR.view.photoset.Carousel.add (항목) 에러 메시지저장소로드 콜백 함수에서 캐 러셀 구성 요소에 항목을 추가하려면 어떻게합니까?
"Uncaught TypeError: Object function() { return this.constructor.apply(this, arguments); } has no method 'add' "
Ext.define('TR.view.photoset.Carousel', {
extend: 'Ext.carousel.Carousel',
alias: 'widget.photosetcarousel',
config: {
store: 'PhotosetPhotos',
itemTpl: '<img src="http://src.sencha.io/{[Ext.Viewport.getOrientation()]}/{photo_url}" />',
title: 'Flickr Photoset',
iconCls: 'hot',
iconMask: true,
scrollable: {
direction: 'vertical',
directionLock: true
},
},
initialize: function(me) {
var store = Ext.getStore('PhotosetPhotos');
store.clearFilter(true);
store.filter('photoset', '72157632230262446');
store.load();
store.load(function(pictures , operation) {
var items = [];
Ext.each(pictures, function(picture) {
if (!picture.get('photo_url')) {
return;
}
items.push({
xtype: 'flickrimage',
picture: picture
});
});
// fill items into carousel above
{???}.add(items);
{???}.setActiveItem(0);
});
}
을}) 결과;
감사합니다 ...
,'this' 회전 목마가 될 것입니다. –