From d82a8230b2efb84a40ccf6bafaa9f26b22690a10 Mon Sep 17 00:00:00 2001 From: Delton Ding Date: Sun, 10 Nov 2024 17:59:37 +0800 Subject: [PATCH] fix(menu): do not eagerly access `$router` in rendering corresponding to: https://github.com/Tencent/tdesign-vue-next/issues/4718 --- src/menu/menu-item.tsx | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/menu/menu-item.tsx b/src/menu/menu-item.tsx index b064e2b9c6..c78200160f 100644 --- a/src/menu/menu-item.tsx +++ b/src/menu/menu-item.tsx @@ -71,14 +71,12 @@ export default defineComponent({ }, }, render() { - const router = this.router || this.$router; - const liContent = (
  • {renderTNodeJSX(this, 'icon')} {this.routerLink ? ( e.preventDefault()}