문제

console.log(r.get('info'))를 표시하려고하지만 출력을 (an empty string)로 가져오고 있습니다.이 오류가 발생했을 수 있습니까?

var myst = Ext.getStore('MyStore');    
var r = myst.getAt(0);
myst.on('load', function() {
    r = myst.getAt(0);
    console.log(r);
    console.log(r.get('info'));
});


UPDATE 1
.

모델

Ext.define('MyApp.model.MyModel', {
    extend: 'Ext.data.Model',

    fields: [

        {
            name: 'info'
        }
    ]
});
.

업데이트 2

RAW 내부에서 Object { phantom=true, internalId="ext-record-18", raw={...}, more...}AND를 인쇄 할 때 console.log(r)'를 얻습니다. info:"myname"가 표시됩니다.

도움이 되었습니까?

해결책

어레이 또는 객체를 표시하려면 console.dir (객체)을 시도하십시오.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top