From 3d03d5a3f147cfa595d5cd33012204266f1807d1 Mon Sep 17 00:00:00 2001 From: wkj <278599135@.com> Date: Wed, 6 Dec 2023 19:55:07 +0800 Subject: [PATCH] =?UTF-8?q?tabbar=20=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- es/components/common/tabBar/index.js | 7 ++++++- es/components/common/tabBar/index.xml | 5 ++++- src/components/common/tabBar/index.ts | 2 ++ src/components/common/tabBar/index.xml | 9 ++++++--- 4 files changed, 18 insertions(+), 5 deletions(-) diff --git a/es/components/common/tabBar/index.js b/es/components/common/tabBar/index.js index a4944f29f..912f60bfb 100644 --- a/es/components/common/tabBar/index.js +++ b/es/components/common/tabBar/index.js @@ -12,6 +12,8 @@ export default OakComponent({ color: '#666', selectedColor: '', border: false, + selectedIconPath: '', + iconPath: '', }, lifetimes: { show() { @@ -33,7 +35,10 @@ export default OakComponent({ let index; for (let i = 0; i < list.length; i++) { const pagePath = list[i].pagePath; - const pathname = this.features.navigator.getPathname(pagePath, namespace); + const pathname = this.features.navigator.getPathname( + pagePath, + namespace + ); if (pathname === currentPagePath) { index = i; break; diff --git a/es/components/common/tabBar/index.xml b/es/components/common/tabBar/index.xml index 74e2a7977..7b109225e 100644 --- a/es/components/common/tabBar/index.xml +++ b/es/components/common/tabBar/index.xml @@ -5,7 +5,10 @@ - + + + + diff --git a/src/components/common/tabBar/index.ts b/src/components/common/tabBar/index.ts index 6cf3f7113..c098de5df 100644 --- a/src/components/common/tabBar/index.ts +++ b/src/components/common/tabBar/index.ts @@ -22,6 +22,8 @@ export default OakComponent({ color: '#666', selectedColor: '', border: false, + selectedIconPath: '', //一般在list设置 + iconPath: '', }, lifetimes: { show() { diff --git a/src/components/common/tabBar/index.xml b/src/components/common/tabBar/index.xml index 74e2a7977..8abc94be8 100644 --- a/src/components/common/tabBar/index.xml +++ b/src/components/common/tabBar/index.xml @@ -5,9 +5,12 @@ - - - + + + + + +