组件
TarBarItem.vue
<style scoped>
.tab-bar-item img {
width: 24px;
height: 24px;
margin-top: 3px;
vertical-align: middle;
}
correct
把css里的scoped干掉
<style >
.tab-bar-item img {
width: 24px;
height: 24px;
margin-top: 3px;
vertical-align: middle;
}
参考: vue中慎用style的scoped属性
.