ExtJS 7 的Tab Reorder 插件持续更新布局问题解决办法 (Solution to layout issues in the continually updated Tab Reorde...

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

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

问题

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

解决办法

通过不断的断点调式,找到原因是因为拖拽过程中swap函数内会不停的更新布局,通过延迟更新布局的方式来实现减少布局更新次数。
By continuously debugging with breakpoints, the cause was found to be that the swap function constantly updates the layout during the drag and drop process. The solution was to reduce the number of layout updates by delaying the update of the layout.

进入 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.

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值