问题描述
这大概是我的 Ext JS TreeStore 的代码
Ext.define('OrgGroupsTree',{
extend: 'Ext.data.TreeStore',model: 'Person',autoLoad: false,nodeParam: 'uuid',root: {
type: '',uuid: '',expanded: true,},proxy: {
type: 'ajax',url: '/getUserOrgsTree',reader: {
type: 'json',rootProperty: 'children',successproperty: 'success'
}
}
});
在 Ext JS 4.2 中使用此代码时,加载函数将向 /getUserOrgsTree
发送一个 GET 请求,其中查询字符串参数等于发送加载请求的节点的 'uuid'。根节点的默认 uuid 值为“”,所有后续节点都将具有“xxxx-xxxx-xxxx-xxxx”形式的 uuid 值。不幸的是,在当前状态下(使用 Ext JS 7.0 而不是 Ext JS 4.2),TreeStore 甚至可以正确加载根节点,因为在加载操作期间发送的代理请求不包含正确的 uuid 值。在当前形式中,如果当前节点没有 id 值,则 uuid 请求参数似乎采用节点 id 或模型名称的值。
我想知道如何配置此 TreeStore 以使用正确的 uuid 值加载。
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)