From e729ac1af2b4aed819be6f9dbb9679006812020c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=81=8C=E7=B3=96=E5=8C=85=E5=AD=90?= Date: Sat, 11 Apr 2026 01:32:55 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E8=BF=87=E6=BB=A4=20dev=20overlay=20?= =?UTF-8?q?=E4=B8=AD=E8=AF=AF=E6=8A=A5=E7=9A=84=20ResizeObserver=20loop=20?= =?UTF-8?q?=E9=94=99=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ResizeObserver loop completed with undelivered notifications 是浏览器 规范允许的良性通知,Element Plus 下拉框展开时会触发,不影响实际功能。 webpack-dev-server 错误地将其当成运行时错误弹出 overlay,通过 client.overlay.runtimeErrors 回调将其过滤掉。 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- vue.config.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/vue.config.js b/vue.config.js index 75cef9d..d98e27c 100644 --- a/vue.config.js +++ b/vue.config.js @@ -45,6 +45,12 @@ module.exports = defineConfig({ }, devServer: { port: 8080, + client: { + overlay: { + // ResizeObserver loop 是浏览器规范允许的良性通知,不是真实错误,过滤掉避免干扰开发 + runtimeErrors: (err) => err?.message !== 'ResizeObserver loop completed with undelivered notifications.' + } + }, proxy: { '^/api': { target: process.env.VUE_APP_PROXY_TARGET,