element-plus [Component] [table-column, table] ResizeObserver loop limit exceeded

qcbq4gxm  于 4个月前  发布在  其他
关注(0)|答案(7)|浏览(45)

Bug Type: Component

Environment

  • Vue Version: 3.2.47
  • Element Plus Version: 2.3.4
  • Browser / OS: Microsoft Edge version 112.0.1722.58
  • Build Tool: Vue CLI

Reproduction

  • el-table-column
  • el-table

Github Repo

Steps to reproduce

将示例中的代码放在一个component中,然后用vue路由打开这个component,进行浏览器缩放(响应式)时,如果大小像手机一样,就会触发这个问题
Put the code in the example into a component, and then open this component with vue-router. When zooming the browser (responsive), if the size is like a mobile phone, this problem will be triggered.

(ERROR
ResizeObserver loop limit exceeded
    at eval (webpack-internal:///./node_modules/webpack-dev-server/client/overlay.js:249:58))

放大回正常大小时,会再触发一次
When zoomed back to normal size, it triggers again

What is Expected?

The table component can scale normally without errors

What is actually happening?

The table component cannot scale normally and an error is triggered.

Additional comments

(empty)

5ssjco0h

5ssjco0h2#

vue.config.js 中增加配置项

module.exports = defineConfig({
    devServer: {
+        client: {
+            overlay: {
+                runtimeErrors: false,
+            },
+        },
    },
})
mcdcgff0

mcdcgff04#

vue.config.js 中增加配置项

module.exports = defineConfig({
    devServer: {
+        client: {
+            overlay: {
+                runtimeErrors: false,
+            },
+        },
    },
})

这个只是关闭了错误提示,本质上还是在报错

dy2hfwbg

dy2hfwbg5#

vue.config.js 中增加配置项

module.exports = defineConfig({
    devServer: {
+        client: {
+            overlay: {
+                runtimeErrors: false,
+            },
+        },
    },
})

6

h22fl7wq

h22fl7wq6#

在 使用了 el-table 的 组件 style 中设置

:deep(.el-table__header) {
    width: 100% !important;
}

:deep(.el-table__body) {
    width: 100% !important;
}

可以解决这个问题,强制将表格的宽度设置为 100%。

brtdzjyr

brtdzjyr7#

I resolved this issue in the project and originally set the table container style to flex: 1 when switching pages or tabs to indicate this error. As long as the container width of the table is set to width: calc (100% - xxx)

相关问题