From 7826f5cf8b4cb0a4e22f01cf965d1a64749f0dbf Mon Sep 17 00:00:00 2001 From: icssoa <615206459@qq.com> Date: Fri, 17 Oct 2025 23:24:19 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=20backable=20=E6=8E=A7?= =?UTF-8?q?=E5=88=B6=E8=BF=94=E5=9B=9E=E6=8C=89=E9=92=AE=E6=98=AF=E5=90=A6?= =?UTF-8?q?=E5=8F=AF=E7=94=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../components/cl-topbar/cl-topbar.uvue | 21 ++++++++++++------- 1 file changed, 14 insertions(+), 7 deletions(-) diff --git a/uni_modules/cool-ui/components/cl-topbar/cl-topbar.uvue b/uni_modules/cool-ui/components/cl-topbar/cl-topbar.uvue index 72e6116..07d2df6 100644 --- a/uni_modules/cool-ui/components/cl-topbar/cl-topbar.uvue +++ b/uni_modules/cool-ui/components/cl-topbar/cl-topbar.uvue @@ -15,7 +15,7 @@ { // 返回按钮点击事件 function back() { - if (props.backPath != "") { - router.to(props.backPath); - } else { - if (router.isFirstPage()) { - router.home(); + if (props.backable) { + if (props.backPath != "") { + router.to(props.backPath); } else { - router.back(); + if (router.isFirstPage()) { + router.home(); + } else { + router.back(); + } } } }