更新记录
0.01(2025-07-03)
首次发布
平台兼容性
uni-app(4.71)
Vue2 |
Vue3 |
Chrome |
Safari |
app-vue |
app-nvue |
Android |
iOS |
鸿蒙 |
- |
- |
- |
- |
- |
- |
- |
- |
- |
微信小程序 |
支付宝小程序 |
抖音小程序 |
百度小程序 |
快手小程序 |
京东小程序 |
鸿蒙元服务 |
QQ小程序 |
飞书小程序 |
快应用-华为 |
快应用-联盟 |
- |
- |
- |
- |
- |
- |
- |
- |
- |
- |
- |
uni-app x(4.71)
Chrome |
Safari |
Android |
iOS |
鸿蒙 |
微信小程序 |
- |
- |
√ |
√ |
√ |
- |
其他
属性名 |
数据类型 |
解释 |
示例 |
current |
number |
当前页在list中的索引 |
0 |
duration |
number |
滑块滑动时间(单位为ms) |
350 |
tabBgcColor |
string |
滑块背景色(支持rgba、rgb或#) |
rgba(229, 239, 254, 0.8) |
tabItemBgcColor |
string |
tabbar背景色(支持rgba、rgb或#) |
rgba(1, 8, 1, 0.3) |
list |
Array |
tabbar的页面List |
[{ pagePath: "", text: "", iconPath: "", selectedIconPath: "" }] |
事件名称 |
解释 |
返回值 |
@change |
切换tab的时候触发 |
(index: number) 即current |
<template>
<Page1 v-show="currentIndex==0"></Page1>
<Page2 v-show="currentIndex==1"></Page2>
<Page3 v-show="currentIndex==2"></Page3>
<Page4 v-show="currentIndex==3"></Page4>
<tabbarZyoy :current="currentIndex" :list="list"
:duration="350" :tabItemBgcColor="tabItemBgcColor"
:tabBgcColor="tabBgcColor" @change="handleTabChange"></tabbarZyoy>
</template>
<script setup>
import Page1 from '../demo/demo.uvue';
import Page2 from '../demo/demo.uvue'
import Page3 from '../demo/demo.uvue'
import Page4 from '../demo/demo.uvue'
import tabbarZyoy from '@/uni_modules/tabbar-zyoy/components/tabbar-zyoy/tabbar-zyoy.vue'
const currentIndex = ref<number>(0)
const handleTabChange = (index: number) => {
currentIndex.value = index
}
const tabItemBgcColor = 'rgba(229, 239, 254, 0.8)'
const tabBgcColor = "rgba(1, 8, 1, 0.3);"
const list = [
{
pagePath: "../demo/demo.uvue",
text: "xx",
iconPath: "/static/icon/xx.png",
selectedIconPath: "/static/icon/xx.png"
},
{
pagePath: "../demo/demo.uvue",
text: "xx",
iconPath: "/static/icon/xx.png",
selectedIconPath: "/static/icon/xx.png"
},
{
pagePath: "../demo/demo.uvue",
text: "xx",
iconPath: "/static/icon/xx.png",
selectedIconPath: "/static/icon/xx.png"
},
{
pagePath: "../demo/demo.uvue",
text: "xx",
iconPath: "/static/icon/xx.png",
selectedIconPath: "/static/icon/xx.png"
}
]
</script>