| | |
| | | <template> |
| | | <view class="top-bar" :style="{paddingTop: statusBarHeight + 'px'}"> |
| | | <view class="top-bar" :style="{paddingTop: statusBarHeight + 'px', backgroundColor: bgColor}" :class="{'has-bg': bgColor !== 'transparent'}"> |
| | | <view class="top-bar-content"> |
| | | <!-- 标题列表 --> |
| | | <scroll-view class="title-scroll" scroll-x="true" scroll-with-animation :scroll-left="scrollLeft"> |
| | |
| | | textColor: { |
| | | type: String, |
| | | default: 'white' |
| | | }, |
| | | bgColor: { |
| | | type: String, |
| | | default: 'transparent' |
| | | } |
| | | }, |
| | | data() { |
| | |
| | | title: '推荐' |
| | | }, |
| | | { |
| | | index: 'kitchenCustomize', |
| | | pagePath: '/pages/kitchen/KitchenCustomize', |
| | | title: '厨房定制' |
| | | }, |
| | | { |
| | | index: 'shop', |
| | | pagePath: '/pages/commodity-square/commoditySquare', |
| | | title: '商品广场' |
| | |
| | | pagePath: '/pages/mine/activity/reportActivity', |
| | | title: '活动' |
| | | }, |
| | | { |
| | | index: 'health', |
| | | pagePath: '/pages/health/healthVideo', |
| | | title: '大健康' |
| | | } |
| | | // { |
| | | // index: 'health', |
| | | // pagePath: '/pages/health/healthVideo', |
| | | // title: '大健康' |
| | | // } |
| | | ] |
| | | }; |
| | | }, |
| | |
| | | left: 0; |
| | | right: 0; |
| | | z-index: 999; |
| | | } |
| | | |
| | | .top-bar.has-bg { |
| | | box-shadow: 0 2rpx 10rpx rgba(0, 0, 0, 0.05); |
| | | } |
| | | |
| | | .top-bar .top-bar-content { |
| | |
| | | /* background-color: white; */ |
| | | border-radius: 4rpx; |
| | | } |
| | | </style> |
| | | </style> |