From e61b5a267375481879e411171bdb5a1e612461a6 Mon Sep 17 00:00:00 2001 From: lzh Date: Sat, 28 Feb 2026 14:30:04 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E6=9B=B4=E6=96=B0=E5=BA=95=E9=83=A8?= =?UTF-8?q?=E5=AF=BC=E8=88=AA=E6=A0=8F=E9=85=8D=E7=BD=AE=E5=92=8C=E6=A0=B7?= =?UTF-8?q?=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Claude Opus 4.6 --- src/tabbar/config.ts | 65 +------------------------------------------- src/tabbar/index.vue | 65 ++++++++++++++++++++++++++++---------------- src/tabbar/store.ts | 2 +- 3 files changed, 44 insertions(+), 88 deletions(-) diff --git a/src/tabbar/config.ts b/src/tabbar/config.ts index 4e09d2c..fe0f191 100644 --- a/src/tabbar/config.ts +++ b/src/tabbar/config.ts @@ -42,75 +42,12 @@ export const nativeTabbarList: NativeTabBarItem[] = [ // TODO: 3/3. 使用 CUSTOM_TABBAR(2,3) 时,更新下面的 tabbar 配置 // 如果需要配置鼓包,需要在 'tabbar/store.ts' 里面设置,最后在 `tabbar/index.vue` 里面更改鼓包的图片 export const customTabbarList: CustomTabBarItem[] = [ - // { - // text: '首页', - // pagePath: 'pages/index/index', - // // 注意 unocss 图标需要如下处理:(二选一) - // // 1)在fg-tabbar.vue页面上引入一下并注释掉(见tabbar/index.vue代码第2行) - // // 2)配置到 unocss.config.ts 的 safelist 中 - // iconType: 'unocss', - // icon: 'i-carbon-home', - // // badge: 'dot', - // }, - // { - // pagePath: 'pages/me/me', - // text: '我的', - // // 1)在fg-tabbar.vue页面上引入一下并注释掉(见tabbar/index.vue代码第2行) - // // 2)配置到 unocss.config.ts 的 safelist 中 - // iconType: 'unocss', - // icon: 'i-carbon-user', - // // badge: 10, - // }, - // 其他类型演示 - // 1、uiLib - // { - // pagePath: 'pages/index/index', - // text: '首页', - // iconType: 'uiLib', - // icon: 'home', - // }, - // 2、iconfont - // { - // pagePath: 'pages/index/index', - // text: '首页', - // // 注意 iconfont 图标需要额外加上 'iconfont',如下 - // iconType: 'iconfont', - // icon: 'iconfont icon-my', - // }, - // 3、image - // { - // pagePath: 'pages/index/index', - // text: '首页', - // // 使用 ‘image’时,需要配置 icon + iconActive 2张图片 - // iconType: 'image', - // icon: '/static/tabbar/home.png', - // iconActive: '/static/tabbar/homeHL.png', - // }, - // add by 芋艿:图标可到 https://icon-sets.iconify.design/carbon/ 选择。另外,需要在 uno.config.ts 的 safelist 中添加图标类名 { text: '工作台', pagePath: 'pages/index/index', iconType: 'unocss', icon: 'i-carbon-home', }, - { - text: '审批', - pagePath: 'pages/bpm/index', - iconType: 'unocss', - icon: 'i-carbon-document', - }, - { - text: '通讯录', - pagePath: 'pages/contact/index', - iconType: 'unocss', - icon: 'i-carbon-user-avatar', - }, - { - text: '消息', - pagePath: 'pages/message/index', - iconType: 'unocss', - icon: 'i-carbon-chat', - }, { text: '我的', pagePath: 'pages/user/index', @@ -156,7 +93,7 @@ const _tabbar: TabBar = { // 只有微信小程序支持 custom。App 和 H5 不生效 custom: selectedTabbarStrategy === TABBAR_STRATEGY_MAP.CUSTOM_TABBAR_WITH_CACHE, color: '#999999', - selectedColor: '#018d71', + selectedColor: '#f97316', backgroundColor: '#F8F8F8', borderStyle: 'black', height: '50px', diff --git a/src/tabbar/index.vue b/src/tabbar/index.vue index 42b09f4..ae44c49 100644 --- a/src/tabbar/index.vue +++ b/src/tabbar/index.vue @@ -16,10 +16,7 @@ defineOptions({ * 中间的鼓包tabbarItem的点击事件 */ function handleClickBulge() { - uni.showToast({ - title: '点击了中间的鼓包tabbarItem', - icon: 'none', - }) + uni.navigateTo({ url: '/pages/scan/index' }) } function handleClick(index: number) { @@ -70,8 +67,8 @@ onMounted(() => { }) }) // #endif -const activeColor = 'var(--wot-color-theme, #1890ff)' -const inactiveColor = '#666' +const activeColor = 'var(--wot-color-theme, #f97316)' +const inactiveColor = '#9CA3AF' function getColorByIndex(index: number) { return tabbarStore.curIdx === index ? activeColor : inactiveColor } @@ -86,21 +83,24 @@ function getImageByIndex(index: number, item: CustomTabBarItem) {