mint

Mint UI tabbar 点击切换图片

徘徊边缘 提交于 2019-11-26 04:48:13
用到时发现 Mint UI在 tabbar 点击切换时 tab 栏图片是固定的没有 hover 状态,官方文档写的也很简单,搜了一下网上的发现都写的挺繁琐的,下面直接上代码 template 函数 toggleTab 里传字符串区分点在哪个 tab , v-show 控制显示隐藏 < mt - tabbar fixed v - model = "selected" > < mt - tab - item id = "个人中心" @click . native = "toggleTab('C')" > < img slot = "icon" src = "../assets/icon/act_task.png" v - show = "!s.isC" > < img slot = "icon" src = "../assets/icon/task.png" v - show = "s.isC" > 个人中心 < / mt - tab - item > < mt - tab - item id = "推荐" @click . native = "toggleTab('R')" > < img slot = "icon" src = "../assets/icon/act_rec.png" v - show = "!s.isR" > < img slot = "icon" src = "