商品页

This commit is contained in:
shikong 2024-10-18 20:27:46 +08:00
parent 25fe10d3dd
commit 0c8339c12c
Signed by: Shikong
GPG Key ID: BD85FF18B373C341
2 changed files with 5 additions and 2 deletions

View File

@ -39,7 +39,7 @@ function isCurrent(index) {
</view>
<scroll-view scroll-y class="flex-grow-0 min-h-0">
<slot name="default"></slot>
<slot name="default" :current="ctx.current" :data="props.categories[ctx.current]"></slot>
</scroll-view>
</view>

View File

@ -60,7 +60,10 @@ onLoad(() => {
<swiper class="flex-grow min-h-0" :current="ctx.current" @change="swiperChange">
<swiper-item v-for="(item, index) in props.tabs" :key="index" class="h-full">
<SidebarView :categories="ctx.categories">
<view class="bg-orange-100 h-full"> {{ item.name }}</view>
<template #default="{data}">
<view class="bg-orange-100 h-full"> {{ item.name }}</view>
<view> {{data.name}} </view>
</template>
</SidebarView>
</swiper-item>
</swiper>