• 设为首页
  • 收藏本站
  • 积分充值
  • VIP赞助
  • 手机版
  • 微博
  • 微信
    微信公众号 添加方式:
    1:搜索微信号(888888
    2:扫描左侧二维码
  • 快捷导航
    福建二哥 门户 查看主题

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

    发布者: 琛瑞6678 | 发布时间: 2025-8-13 15:24| 查看数: 50| 评论数: 0|帖子模式

    关于这个原因有很多种,我只说下我遇到的
    我这样 写Store来复用的

    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里面
    来源:互联网
    免责声明:如果侵犯了您的权益,请联系站长(1277306191@qq.com),我们会及时删除侵权内容,谢谢合作!

    最新评论

    QQ Archiver 手机版 小黑屋 福建二哥 ( 闽ICP备2022004717号|闽公网安备35052402000345号 )

    Powered by Discuz! X3.5 © 2001-2023

    快速回复 返回顶部 返回列表