Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/extjs/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Javascript 自动加载:在ExtJs 6中忽略false_Javascript_Extjs - Fatal编程技术网

Javascript 自动加载:在ExtJs 6中忽略false

Javascript 自动加载:在ExtJs 6中忽略false,javascript,extjs,Javascript,Extjs,我有一个MVC应用程序。其中一个商店的定义如下: Ext.define('Instructions.store.InstructionsObjectTreeStore', { extend: 'Ext.data.TreeStore', requires: ['Instructions.model.InstructionsObjectTreeModel'], model: 'Instructions.model.InstructionsObjectTreeModel',

我有一个MVC应用程序。其中一个商店的定义如下:

Ext.define('Instructions.store.InstructionsObjectTreeStore', {
    extend: 'Ext.data.TreeStore',
    requires: ['Instructions.model.InstructionsObjectTreeModel'],
    model: 'Instructions.model.InstructionsObjectTreeModel',
    autoLoad: false,
    proxy: {
        type: 'ajax',
        url: 'controller/InstructionsHandler.php',
        node: 'id',
        extraParams: {
            action: 'getInstructionsObjectTree'
        }
    },
    root: {
        text: 'Objects',
        id: 'src',
        root: true,
        expanded: true
    }
});
但是,据我在控制台中看到的,
autoLoad
被忽略。我还尝试了一些旧的建议

root:{
    loaded: true
}

在我的树面板定义中,但它也没有帮助。那么,如何解决这个问题呢?

你似乎读得太仔细了(这通常是好的),参考了太多的参考资料,甚至看了一些例子。请在sencha论坛上报告文档示例中的严重错误

需要注意的是,树存储将 如果根节点上的expand设置为true,则无论自动加载的值如何加载。

这部分文档是完全正确的。所有其他(包括代码示例)都是错误的

expand: false
应该解决这个问题,按照这个


什么也不做,尽管它几乎在其他地方都使用。

我还发现,在存储定义的根部分中指定的
load:true
也可以工作。顺便说一句。我的treepanel位于
字段集
内(它位于包含许多其他字段的某个面板内)。此
字段集
具有属性
布局:“fit”
树面板
本身具有属性
可滚动:true
,但是当加载存储时,我看不到滚动条。你不知道原因是什么吗
extjs6
bug?不确定,可能是字段集的父容器溢出。如果这不是解决办法,那就提出一个新问题。先生,您所说的“父容器溢出”是什么意思?一些特殊属性?我的意思是,字段集的一个父容器可能是没有滚动条的vbox面板,其中字段集继续位于可见区域下方。区别很容易发现,因为字段集有一个不可见的底部边框。自动加载默认为false,因此不需要在存储定义中添加它
expanded: false