0
I 다음 JS 있습니다의 ExtJS DataView를 ArrayStore 문제
http://monobin.com/__m1c171c4e
다음 코드를 :
코드 :
그래서 고해상도의 아이 배열에 DataView를 결합var tpl = new Ext.XTemplate(
'<tpl for=".">',
'<div class="thumb-wrap" id="{Name}">',
'<div class="thumb"><img src="{ImageMedium}" title="{Name}"></div>',
'<span class="x-editable">{Name}</span></div>',
'</tpl>',
'<div class="x-clear"></div>'
);
var store = new Ext.data.ArrayStore({
fields: [{ name: 'name' }, { name: 'ImageMedium'}],
data: res.data.SimilarArtists
});
var panel = new Ext.Panel({
frame: true,
width: 535,
autoHeight: true,
collapsible: true,
layout: 'fit',
title: 'Simple DataView (0 items selected)',
items: new Ext.DataView({
store: store,
tpl: tpl,
autoHeight: true,
multiSelect: true,
overClass: 'x-view-over',
itemSelector: 'div.thumb-wrap',
emptyText: 'No images to display',
prepareData: function (data) {
data.Name = Ext.util.Format.ellipsis(data.Name, 15);
return data;
},
plugins: [
new Ext.DataView.DragSelector(),
new Ext.DataView.LabelEditor({ dataIndex: 'name' })
],
listeners: {
selectionchange: {
fn: function (dv, nodes) {
}
}
}
})
});
.data.SimilarArtists
아무 것도 볼 수 없습니다. ms?
prepareData도 호출되지 않습니다?
내가 뭘 잘못하고 있니?
w : //
건배 dude - 하나처럼 들리 네. 나는 나중에 시험해 볼 것이다. 그러나 나는 이것이 작동 할 것이다라는 것을 알고있다 - 지난 밤에 우스운 이야기 5를 보내고 있었다 : s – iwayneo