From 9abfac63a1bc3d6688f99191ced363b87a1b90c8 Mon Sep 17 00:00:00 2001 From: root <422249663@qq.com> Date: Fri, 3 Apr 2026 07:04:24 +0000 Subject: [PATCH] update windows/leftWindow.vue. error.js:30 TypeError: Cannot read properties of undefined (reading 'indexOf') at Proxy.clickMenuItem (leftWindow.vue:73:13) at Proxy.select (leftWindow.vue:63:10) at Proxy.emit (uni-data-menu.vue:133:10) at Proxy.onSelect (uni-data-menu.vue:130:10) errorHandler @ error.js:30 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 这个错误表明你在 leftWindow.vue 的第73行尝试读取 undefined 的 indexOf 方法。常见原因是某个变量未定义或为空 Signed-off-by: root <422249663@qq.com> --- windows/leftWindow.vue | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/windows/leftWindow.vue b/windows/leftWindow.vue index e021063d..6f2186b1 100644 --- a/windows/leftWindow.vue +++ b/windows/leftWindow.vue @@ -69,6 +69,11 @@ // #endif }, clickMenuItem(url) { + // 添加参数验证 + if (!url || typeof url !== 'string') { + console.error('clickMenuItem: url is invalid', url); + return; + } // #ifdef H5 if (url.indexOf('http') === 0) { return window.open(url) -- Gitee