| | |
| | | <template> |
| | | <view class="flex top-tabs"> |
| | | <view class="flex top-tabs" :class="[type]"> |
| | | <view class="top-tab t-grey p10" v-for="(item,index) of tabs" @tap="changeIndex(index)" |
| | | :class="[''+index==flg?'active':'']"> |
| | | {{ item.name || item.label || '' }} |
| | |
| | | type: Array, |
| | | default: [] |
| | | }, |
| | | flg: "" |
| | | flg: "", |
| | | type: '', |
| | | }, |
| | | methods: { |
| | | changeIndex(index) { |
| | |
| | | } |
| | | </script> |
| | | |
| | | <style lang="scss"> |
| | | <style lang="scss" scoped> |
| | | .top-tabs.coupon { |
| | | .top-tab { |
| | | color: var(----topicdarkgray); |
| | | } |
| | | |
| | | .top-tab.active { |
| | | color: var(--topicolor); |
| | | } |
| | | |
| | | .top-tab.active::before { |
| | | background: var(--topicolor); |
| | | bottom: 0rpx; |
| | | } |
| | | } |
| | | |
| | | .top-tabs { |
| | | .top-tab { |
| | | color: #ffffff; |
| | |
| | | |
| | | font-weight: 600; |
| | | font-size: 36rpx; |
| | | color: #ffffff; |
| | | line-height: 32rpx; |
| | | text-align: center; |
| | | font-style: normal; |