-1
我正在寻找一种方式来转换成模型这样的回应(字符串作为模型的列表):阵列/串作为模型的列表
{
"success": true,
"msg": null,
"data": [
"string 1",
"string 2",
"string 3",
"string 4"
],
"errors": null
}
通常情况下,我会用一个正常的商店,但作为模型使用什么?
Ext.define('myStoreName', {
extend : 'Ext.data.Store',
model : ???, //What to use in here, or which store to extend?
proxy : {
type : 'betterrest',
url : 'myUrl',
headers : {
'Accept' : 'application/json'
},
reader : {
type : 'json',
root : 'data',
totalProperty : 'total',
successProperty : 'success'
}
}
});