try { let resizeObserver = new ResizeObserver(entries = { console.log('resize', entries) }) resizeObserver.observe(this) } catch (e) { console.log(e) } 【文章原创作者:阿里云代理 http://www.558idc.com/aliyun.html处的文章,转载
let resizeObserver = new ResizeObserver(entries => {
console.log('resize', entries)
})
resizeObserver.observe(this)
} catch (e) {
console.log(e)
}