You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
30 lines
1.3 KiB
30 lines
1.3 KiB
5 years ago
|
<view class="container">
|
||
|
<!-- tab导航栏 -->
|
||
|
<!-- scroll-left属性可以控制滚动条位置 -->
|
||
|
<!-- scroll-with-animation滚动添加动画过渡 -->
|
||
|
<scroll-view scroll-x="true" class="nav" scroll-left="{{navScrollLeft}}" scroll-with-animation="{{true}}">
|
||
|
<block wx:for="{{navData}}" wx:for-index="idx" wx:for-item="navItem" wx:key="idx">
|
||
|
<view class="nav-item {{currentTab == idx ?'active':''}}" data-current="{{idx}}" bindtap="switchNav">
|
||
|
<text>{{navItem.text}}</text>
|
||
|
</view>
|
||
|
</block>
|
||
|
</scroll-view>
|
||
|
<!-- 页面内容 -->
|
||
|
<swiper class="tab-box" current="{{currentTab}}" duration="300" bindchange="switchTab">
|
||
|
<block wx:for="{{navData}}" wx:for-item="navItem" wx:key="exercise_status">
|
||
|
<swiper-item class="tab-content">
|
||
|
<view class="grade-list">
|
||
|
<block wx:for="{{grades}}" wx:for-item="grade" wx:key="objectId">
|
||
|
<view wx:if="{{grade.edu_account_login==navItem.login||navItem.login=='*'}}" class="grade flex-wrap">
|
||
|
<text class="name">{{grade.name}}</text>
|
||
|
<text class="time">{{grade.time}}</text>
|
||
|
<text class="{{grade.mark<0?'mark delete':'mark add'}}">{{grade.mark}}</text>
|
||
|
</view>
|
||
|
</block>
|
||
|
</view>
|
||
|
</swiper-item>
|
||
|
</block>
|
||
|
</swiper>
|
||
|
</view>
|
||
|
|