Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ResizeObserver loop limit exceeded #89

Open
gitwd1998 opened this issue Apr 2, 2024 · 0 comments
Open

ResizeObserver loop limit exceeded #89

gitwd1998 opened this issue Apr 2, 2024 · 0 comments

Comments

@gitwd1998
Copy link

前提: autoresize: true
条件:页面缩放是会导致该异常
原因:如果在一个动画帧内,ResizeObserver不能处理所有的observations,就会触发这个ResizeObserver loop limit exceeded
解决:引入时对update节流处理

import Vue from 'vue'
import vueClamp from 'vue-clamp'

// 页面缩放响应时略显卡顿
const fixVueClampErr = (comp) => {
    const oldUpdate= table.methods.update
    comp.methods.update= function () {
        window.requestAnimationFrame(oldUpdate.bind(this))
    }
}

fixVueClampErr (vueClamp )
Vue.component('v-clamp', vueClamp)

望大公 有更好的方法进行优化

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant