Closed lamjack closed 6 years ago
因为需要自己实现图标,涉及一些业务逻辑,所以把做多一层封装,但是发现所有Item一直都是高亮的。
页面部分代码,
<template> <yd-layout> <router-view :key="$route.path"></router-view> <yd-tabbar slot="tabbar"> <tabbar-item></tabbar-item> <tabbar-item></tabbar-item> <tabbar-item></tabbar-item> </yd-tabbar> </yd-layout> </template> <script> import TabbarItem from '../components/TabbarItem'; export default { name: 'Frame', components: { TabbarItem } }; </script>
封装组件部分代码,
<template> <yd-tabbar-item title="123" link="#"> <yd-icon name="home" slot="icon"></yd-icon> </yd-tabbar-item> </template> <script> export default { name: 'TabbarItem', }; </script>
找到原因了。
问题描述
因为需要自己实现图标,涉及一些业务逻辑,所以把 做多一层封装,但是发现所有Item一直都是高亮的。
产生环境
代码区域
页面部分代码,
封装组件部分代码,