extjs之TypeError: d.read is not a function解决方案
生活随笔
收集整理的這篇文章主要介紹了
extjs之TypeError: d.read is not a function解决方案
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
在創建如下代碼時報出此錯:TypeError: d.read is not a function
1 Ext.define('shebyxgl_sheb_model', { 2 extend: 'Ext.data.Model', 3 fields: [ 'shebid', 'shebname' ] 4 }); 5 var sheb_store = Ext.create('Ext.data.Store', { 6 model: 'shebyxgl_she_model',//model名稱引用錯誤,少了一個字母b 7 proxy: { 8 url: '../shebyxgl/getSheb', 9 type: 'ajax', 10 method: 'GET', 11 reader: { 12 type: 'json', 13 root: 'datas' 14 } 15 } 16 });問題原因出在model上,因為store引用的model與你在后臺獲取的json數據匹配不上,故reader沒用查找到,仔細看你的store里面引用的model是否是你創建的model,我上面的代碼就出現在這里,
轉載于:https://www.cnblogs.com/smallrock/p/3514776.html
總結
以上是生活随笔為你收集整理的extjs之TypeError: d.read is not a function解决方案的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: Android 使用本地应用在线播放流
- 下一篇: 推荐绝对好评