2021-12-29 00:21:18 +08:00
|
|
|
<template>
|
2021-12-29 17:19:31 +08:00
|
|
|
<div class="tabbar">
|
2021-12-29 12:18:33 +08:00
|
|
|
<div class="shadow"></div>
|
|
|
|
<div class="tab">
|
|
|
|
<div for="{{tab in tabbar}}">
|
|
|
|
<image
|
|
|
|
@click="changePage($idx)"
|
|
|
|
src="{{tab.active?tab.selectedIconPath:tab.iconPath}}"
|
|
|
|
></image>
|
2021-12-29 00:21:18 +08:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</template>
|
|
|
|
<script>
|
|
|
|
|
|
|
|
export default {
|
|
|
|
props: {
|
|
|
|
tabbar: { default: [] }
|
|
|
|
},
|
|
|
|
changePage(idx) {
|
|
|
|
console.log('tabbar', 'changePage', idx)
|
|
|
|
this.$emit('emitEvt', {
|
|
|
|
idx
|
|
|
|
});
|
|
|
|
}
|
|
|
|
};
|
|
|
|
</script>
|
|
|
|
|
|
|
|
|
|
|
|
<style lang="less">
|
2021-12-29 12:18:33 +08:00
|
|
|
.tabbar {
|
2021-12-29 00:21:18 +08:00
|
|
|
.shadow {
|
|
|
|
position: fixed;
|
|
|
|
bottom: 108px;
|
2021-12-29 12:18:33 +08:00
|
|
|
height: 12px;
|
2021-12-29 00:21:18 +08:00
|
|
|
width: 100%;
|
|
|
|
background: linear-gradient(rgba(0, 0, 0, 0), rgba(0, 0, 0, 0.09));
|
|
|
|
}
|
|
|
|
|
|
|
|
.tab {
|
|
|
|
background-color: rgba(255, 255, 255, 0.98);
|
2021-12-29 12:18:33 +08:00
|
|
|
/* position: fixed; */
|
|
|
|
/* bottom: 0; */
|
|
|
|
/* flex-direction: row; */
|
2021-12-29 00:21:18 +08:00
|
|
|
height: 108px;
|
|
|
|
width: 100%;
|
|
|
|
justify-content: space-around;
|
|
|
|
|
|
|
|
div {
|
|
|
|
flex-direction: column;
|
|
|
|
justify-content: center;
|
|
|
|
align-items: center;
|
|
|
|
}
|
|
|
|
|
|
|
|
image {
|
2021-12-29 17:19:31 +08:00
|
|
|
/* width: 58px; */
|
2021-12-29 00:21:18 +08:00
|
|
|
height: 80px;
|
|
|
|
}
|
|
|
|
|
|
|
|
text {
|
|
|
|
font-size: 30px;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2021-12-29 12:18:33 +08:00
|
|
|
/* .selected {
|
2021-12-29 00:21:18 +08:00
|
|
|
color: #0091ff;
|
|
|
|
}
|
|
|
|
|
|
|
|
.tab-recommend {
|
|
|
|
left: 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
.tab-mine {
|
|
|
|
right: 0;
|
2021-12-29 12:18:33 +08:00
|
|
|
} */
|
2021-12-29 00:21:18 +08:00
|
|
|
}
|
|
|
|
</style>
|