微信小程序
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 5198344374
11.22
5 days ago
colorui 微信小程序代码提交 9.9 3 months ago
common 11.10 绑定微信提交 2 weeks ago
components 11.21 更新充电订单页面 6 days ago
pages 11.22 5 days ago
pagesCenter 11.22 5 days ago
sheep 11.18 充值退款功能添加 1 week ago
static 微信小程序代码提交 9.9 3 months ago
stores 微信小程序代码提交 9.9 3 months ago
uni_modules 微信小程序代码提交 9.9 3 months ago
.env 正式版 提交域名更改 3 weeks ago
.gitignore 微信小程序代码提交 9.9 3 months ago
.prettierignore 微信小程序代码提交 9.9 3 months ago
.prettierrc 微信小程序代码提交 9.9 3 months ago
App.vue 11.13 2 weeks ago
LICENSE 微信小程序代码提交 9.9 3 months ago
README.md 微信小程序代码提交 9.9 3 months ago
androidPrivacy.json 微信小程序代码提交 9.9 3 months ago
index.html 微信小程序代码提交 9.9 3 months ago
jsconfig.json 微信小程序代码提交 9.9 3 months ago
main.js 微信小程序代码提交 9.9 3 months ago
manifest.json 正式版 提交域名更改 3 weeks ago
package.json 10.31 修改扫码程序 4 weeks ago
pages.json 11.20 电费信息详情更改 1 week ago
project.config.json 微信小程序代码提交 9.9 3 months ago
project.private.config.json 微信小程序代码提交 9.9 3 months ago
uni.scss 微信小程序代码提交 9.9 3 months ago
vite.config.js 微信小程序代码提交 9.9 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