【BUG】ExtJS 的Tab Reorder 插件持续更新布局问题解决办法 (Solution to layout issues in the continually updated Tab Reorder plugin of ExtJS)

发布时间 2023-04-13 10:44:29作者: 重庆熊猫

更新记录
2023年4月13日 初始化。

ExtJS教程汇总:https://www.cnblogs.com/cqpanda/p/16328016.html

问题

不停的拖动tab栏,会不断更新布局。
Dragging the tab bar continuously will update the layout constantly.
image

解决办法

进入 ExtJS 包,打开ux目录下的BoxReorderer.js文件,找到337行的位置,包裹上Ext.defer即可。
Enter the ExtJS package and open the BoxReorderer.js file in the ux directory. Wrap the code at line 337 with Ext.defer to delay its execution.

Like this:

// Make the Box Container the topmost layout participant during the layout.
Ext.defer(()=>{
    container.updateLayout({
        isRoot: true
    });
},300);

持续跟进

当前版本:ExtJS 7.6。这个问题已经反馈给官方了,后续官方可能会解决。
Current version: ExtJS 7.6. This issue has been reported to the official team and they may resolve it in the future.

image

注意(Caution)

小心:未测试此修改会不会对其他组件造成影响,生产环境使用请务必进行具体测试。
Caution: This modification has not been tested for potential impact on other components. Please conduct thorough testing before implementing it in a production environment.