小工具知识网

当前位置: 首页 > 行业知识 > uniapp自定义底部导航

行业知识

uniapp自定义底部导航

2026-11-06 18:06:43 来源:互联网转载

���这边使用的是uview组件库,进行开发的! 

                                        export default {  name: "FooterBar",  data() {    return {      select: 0,      footerBarList: [        {          img: "/static/home.png",          select_img: "/static/home_select.png",          pagePath: "pages/home/home",          title: "首页",        },        {          img: "/static/dai_ban.png",          select_img: "/static/dai_ban_select.png",          pagePath: "pages/treatTackle/treatTackle",          title: "待办",        },        {          img: "/static/mine.png",          select_img: "/static/mine_select.png",          pagePath: "pages/mine/mine",          title: "我的",        },      ],    };  },  methods: {    changeTab(index, name) {      console.log(index);      uni.switchTab({        url: "/" + this.footerBarList[index].pagePath,      });    },  },};

效果图:

 

上一篇:服务器挡板模具怎么安装?

下一篇:怎么做网页设计?