商品页
This commit is contained in:
parent
51f6596279
commit
dd2a0a180d
@ -33,12 +33,12 @@ function isCurrent(index) {
|
||||
</view>
|
||||
|
||||
<view class="w-3/4 p-2 bg-white flex flex-col h-full">
|
||||
<view class="flex-grow-0 flex flex-col h-full">
|
||||
<view class="flex-grow flex flex-col h-full">
|
||||
<view class="my-1">
|
||||
<slot name="title" :current="ctx.current"></slot>
|
||||
</view>
|
||||
|
||||
<scroll-view scroll-y class="flex-grow-0 min-h-0">
|
||||
<scroll-view scroll-y class="flex-grow min-h-0">
|
||||
<slot name="default" :current="ctx.current" :data="props.categories[ctx.current]"></slot>
|
||||
</scroll-view>
|
||||
</view>
|
||||
|
@ -65,7 +65,7 @@ onLoad(() => {
|
||||
<view class="bg-orange-100 h-full"> {{ item.name }}</view>
|
||||
<view> {{data.name}} </view>
|
||||
|
||||
<scroll-view scroll-y class="flex-grow-0 min-h-0 text-left">
|
||||
<scroll-view scroll-y class="flex-grow min-h-0 text-left">
|
||||
<Item v-for="i in 10" :key="i"
|
||||
@tap="toCommodity(i)"
|
||||
img="https://www.httpbin.org/image/png"
|
||||
|
@ -3,6 +3,7 @@ import {reactive} from "vue";
|
||||
import qs from "qs";
|
||||
import SideBarView from "@/components/sidebar-view/index.vue";
|
||||
import Item from "./components/item.vue";
|
||||
|
||||
const ctx = reactive({
|
||||
current: 0,
|
||||
categories: [
|
||||
@ -62,7 +63,8 @@ function toCommodity(){
|
||||
</text>
|
||||
</template>
|
||||
|
||||
<scroll-view scroll-y class="flex-grow-0 min-h-0">
|
||||
<template #default="{data}">
|
||||
<scroll-view scroll-y class="flex-grow min-h-0 text-left">
|
||||
<Item v-for="i in 10" :key="i"
|
||||
@tap="toCommodity(i)"
|
||||
img="https://www.httpbin.org/image/png"
|
||||
@ -73,6 +75,7 @@ function toCommodity(){
|
||||
title="测试商品" price="9999.99"
|
||||
oldPrice="8888.88"/>
|
||||
</scroll-view>
|
||||
</template>
|
||||
</SideBarView>
|
||||
</template>
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user