You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
shilei
d6c5634f69
|
2 weeks ago | |
---|---|---|
colorui | 3 months ago | |
common | 1 month ago | |
components | 4 weeks ago | |
pages | 2 weeks ago | |
pagesCenter | 2 weeks ago | |
sheep | 1 month ago | |
static | 3 months ago | |
stores | 3 months ago | |
uni_modules | 3 months ago | |
.env | 1 month ago | |
.gitignore | 3 months ago | |
.prettierignore | 3 months ago | |
.prettierrc | 3 months ago | |
App.vue | 2 weeks ago | |
LICENSE | 3 months ago | |
README.md | 3 months ago | |
androidPrivacy.json | 3 months ago | |
index.html | 3 months ago | |
jsconfig.json | 3 months ago | |
main.js | 3 months ago | |
manifest.json | 1 month ago | |
package.json | 2 months ago | |
pages.json | 4 weeks ago | |
project.config.json | 3 months ago | |
project.private.config.json | 3 months ago | |
uni.scss | 3 months ago | |
vite.config.js | 3 months ago |
README.md
zw-tabbar自定义tabbar
使用事例
<template>
<view>
<view v-show="tabBarIdx==0">第一页</view>
<view v-show="tabBarIdx==1">第二页</view>
<view v-show="tabBarIdx==2">第三页</view>
<view v-show="tabBarIdx==3">第四页</view>
<view v-show="tabBarIdx==4">第五页</view>
<zwTabBar :defaultSel="0" :list="tabBarList" @clickTab="clickTab" :bigIdx="2"></zwTabBar>
</view>
</template>
<script>
import zwTabBar from "@/components/zw-tabbar/zw-tabbar.vue";
export default {
components: {
zwTabBar
},
data() {
return {
tabBarIdx: 0,
tabBarList: [{
"pagePath": "/pages/home",//不跳转页面时不传值
"iconPath": "/static/icon/tabBar/1.png",
"selectedIconPath": "/static/icon/tabBar/1_on.png",
"text": "首页"
}
]
}
},
methods: {
clickTab(idx) {
this.tabBarIdx = idx;
}
}
}
</script>
Props参数
参数 | 说明 | 类型 |
---|---|---|
list | 菜单配置 | Array |
color | 默认颜色 | String |
defaultSel | 默认选中菜单 | Number |
hoverColor | 选中颜色 | String |
bigIdx | 大图标显示菜单-1为未开启 | Number |
事件
clickTab 切换标签时触发
联系作者
QQ:332899846