添加swiper
This commit is contained in:
@@ -70,7 +70,13 @@ const onPractiseLoading = async (page) => {
|
||||
</view>
|
||||
</view>
|
||||
<view class="contents">
|
||||
<ScrollList :show="selectedIndex === 0" :onLoading="onMatchLoading">
|
||||
<swiper
|
||||
:current="selectedIndex"
|
||||
@change="(e) => (selectedIndex = e.detail.current)"
|
||||
:style="{ height: '100%' }"
|
||||
>
|
||||
<swiper-item>
|
||||
<ScrollList :onLoading="onMatchLoading">
|
||||
<view
|
||||
v-for="(item, index) in matchList"
|
||||
:key="index"
|
||||
@@ -91,7 +97,9 @@ const onPractiseLoading = async (page) => {
|
||||
/>
|
||||
</view>
|
||||
</ScrollList>
|
||||
<ScrollList :show="selectedIndex === 1" :onLoading="onBattleLoading">
|
||||
</swiper-item>
|
||||
<swiper-item>
|
||||
<ScrollList :onLoading="onBattleLoading">
|
||||
<view
|
||||
v-for="(item, index) in battleList"
|
||||
:key="index"
|
||||
@@ -112,11 +120,9 @@ const onPractiseLoading = async (page) => {
|
||||
/>
|
||||
</view>
|
||||
</ScrollList>
|
||||
<ScrollList
|
||||
:show="selectedIndex === 2"
|
||||
:onLoading="onPractiseLoading"
|
||||
:pageSize="15"
|
||||
>
|
||||
</swiper-item>
|
||||
<swiper-item>
|
||||
<ScrollList :onLoading="onPractiseLoading" :pageSize="15">
|
||||
<view
|
||||
v-for="(item, index) in practiseList"
|
||||
:key="index"
|
||||
@@ -130,6 +136,8 @@ const onPractiseLoading = async (page) => {
|
||||
<image src="../static/back.png" mode="widthFix" />
|
||||
</view>
|
||||
</ScrollList>
|
||||
</swiper-item>
|
||||
</swiper>
|
||||
</view>
|
||||
</Container>
|
||||
</template>
|
||||
|
||||
Reference in New Issue
Block a user