源码网商城,靠谱的源码在线交易网站 我的订单 购物车 帮助

源码网商城

Extjs 继承Ext.data.Store不起作用原因分析及解决

  • 时间:2020-01-05 17:21 编辑: 来源: 阅读:
  • 扫一扫,手机访问
摘要:Extjs 继承Ext.data.Store不起作用原因分析及解决
关于这个原因有很多种,我只说下我遇到的 我这样 写Store来复用的
[u]复制代码[/u] 代码如下:
DocStore = Ext.extend(Ext.data.Store,{ initComponent:function(){ this.proxy = new Ext.data.HttpProxy({url:this.url}); this.reader = new Ext.data.JsonReader( { totalProperty: 'results', root: 'rows', id:'docid', fields: ['docid', 'extention','docname', 'author', 'sizes', 'datecreated'] } ); this.sortInfo = { field: 'datecreated', direction: 'DESC' }; this.remoteSort = false; DocStore.superclass.initComponent.call(this); } });
这个Store写出来之后 是不会起到作用的 因为Ext.data.Store这个类 没有继承component 组件 因此在初始化的时候不会调用initComponet方法的, 因此这里面的配置项也不会加载到Store里面
  • 全部评论(0)
联系客服
客服电话:
400-000-3129
微信版

扫一扫进微信版
返回顶部