1234567891011121314151617181920 |
- <!-- components/diy-tabs/index.wxml -->
- <scroll-view class="tabs_top" style="background: {{style.tabsBackground}}; height: {{style.tabsHeight * 2}}rpx;" scroll-x enable-flex>
- <view class="selected " style="margin: {{style.selectedX * 2}}rpx {{style.selectedY * 2}}rpx;">
- <block>
- <view class="tab" style="height: {{selected == item.id ? style.activeHeight + 'rpx' : ''}}; background: {{selected == item.id ? style.activebgColor : '' }}; color:{{selected == item.id ? style.activeColor: ''}}; padding: {{selected == item.id ? 0 + 'rpx' + ' ' + style.activePadding + 'rpx' : ''}}; border-radius: {{style.tabBorderRadius * 2}}rpx; font-size: {{style.tabFontSize * 2}}rpx; color: {{style.tabColor}}; margin-right: {{style.tabMarginLeft * 2}}rpx; " wx:for="{{scrollItem}}" wx:for-item="item" wx:key="id" data-item="{{item.id}}" bind:tap="selected">
- {{item.name}}
- </view>
- </block>
- </view>
- </scroll-view>
- <!-- 全部 -->
- <block wx:if="{{selected == 0}}">全部</block>
- <!-- 面部护理 -->
- <block wx:if="{{selected == 1}}">面部护理</block>
- <!-- 精致彩 -->
- <block wx:if="{{selected == 2}}">精致彩</block>
- <!-- 迷人香水 -->
- <block wx:if="{{selected == 3}}">迷人香水</block>
- <!-- 洗发护发 -->
- <block wx:if="{{selected == 4}}">洗发护发</block>
|