chore: 将 bind 改为 $.proxy

fix/floating-position
sight 2025-09-09 20:31:53 +08:00
parent 3c64d33e6e
commit 2335acd76d
1 changed files with 2 additions and 2 deletions

View File

@ -365,8 +365,8 @@ layui.define(['i18n', 'jquery', 'laytpl', 'lay', 'util'], function(exports) {
});
if(resizeObserver){
resizeObserver.observe(options.elem[0], that.position.bind(that));
resizeObserver.observe(mainElem[0], that.position.bind(that));
resizeObserver.observe(options.elem[0], $.proxy(that.position, that));
resizeObserver.observe(mainElem[0], $.proxy(that.position, that));
}
// 组件打开完毕的事件