gpt4 book ai didi

javascript - extjs 树面板中的滚动条不起作用

转载 作者:行者123 更新时间:2023-12-04 02:15:05 24 4
gpt4 key购买 nike

有时我的树面板的滚动条不再工作了。虽然仍然可以移动滚动条,但树不再移动了。我在 Firefox 和 Chrome 中也会遇到这种情况。

这是我的树面板的来源:

<p></p>

<p>var treeStore = Ext.create('Ext.data.TreeStore', {
proxy: {
type: 'ajax',
url: '../tree.pl'
}
});</p>

<p>var tree = Ext.create('Ext.tree.Panel', {
store: treeStore,
renderTo: 'tree',
title: 'Tree',
width: 400,
height: 450,
rootVisible:false,
dockedItems: [{
xtype: 'toolbar',
dock: 'bottom',
items: [
{
xtype: 'tbspacer',
width: 340
},
{
text: 'Search',
handler: function(){
names = [];
Ext.Array.each(tree.getView().getChecked(), function(rec){
names.push(rec.get('text'));
});</p>

                    resultStore.load({
params:{
search_type: 'tree',
tree_nodes: names.join('II'),
}
});
}
}
]
}]

});

最佳答案

我遇到了同样的问题。他们使用自定义滚动条并且它有很多错误(特别是在 chrome 中)。要删除自定义滚动条,请将以下内容添加到配置中:

var tree = Ext.create('Ext.tree.Panel', {
scroll : false,
viewConfig : {
style : { overflow: 'auto', overflowX: 'hidden' }
},
// ...
});

我还没有在 treepanel 上尝试过。但它非常适合 gridpanel(因为 tree 和 grid 都只是 Ext.panel.Table 的扩展,所以解决方案也应该适用于 treepanel)。

关于javascript - extjs 树面板中的滚动条不起作用,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/6745395/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com