Skip to content

Commit 0649d65

Browse files
committed
fix: 展示BUG
1 parent f0e576b commit 0649d65

File tree

1 file changed

+24
-18
lines changed

1 file changed

+24
-18
lines changed

src/pages/demo/index.vue

+24-18
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,25 @@
11
<template>
2-
<view class="tab-container sticky top-0 bg-white px-4 center h-12 z-1">
3-
<view
4-
class="w-full text-center h-10 leading-10 rounded-md"
5-
:class="{ 'bg-green-300': idx === currIdx }"
6-
v-for="(tab, idx) in tabList"
7-
:key="tab.id"
8-
>
9-
<view class="font-800" @click="currIdx = idx">{{ tab.title }}</view>
2+
<view class="bg-slate-100 min-h-full box-border pb-3">
3+
<view class="tab-container sticky top-0 bg-white px-4 center h-12 z-1">
4+
<view
5+
class="w-full text-center h-10 leading-10 rounded-md"
6+
:class="{ 'bg-green-300': idx === currIdx }"
7+
v-for="(tab, idx) in tabList"
8+
:key="tab.id"
9+
>
10+
<view class="font-800" @click="currIdx = idx">{{ tab.title }}</view>
11+
</view>
1012
</view>
11-
</view>
12-
<view class="bg-slate-100 px-4 pt-3">
13-
<view class="list-container">
14-
<view v-for="item in currContentList" :key="item.path" class="mb-3">
15-
<view
16-
class="flex bg-white items-center justify-between p-3 mb-2"
17-
@click="goDetailPage(item.path)"
18-
>
19-
<text class="flex-1 text-4 text-dark">{{ item.title }}</text>
20-
<text class="i-carbon-chevron-right"></text>
13+
<view class="bg-slate-100 px-4 pt-3">
14+
<view class="list-container">
15+
<view v-for="item in currContentList" :key="item.path" class="mb-3">
16+
<view
17+
class="flex bg-white items-center justify-between p-3 mb-2"
18+
@click="goDetailPage(item.path)"
19+
>
20+
<text class="flex-1 text-4 text-dark">{{ item.title }}</text>
21+
<text class="i-carbon-chevron-right"></text>
22+
</view>
2123
</view>
2224
</view>
2325
</view>
@@ -77,6 +79,10 @@ const goDetailPage = (path: string) => {
7779
</script>
7880

7981
<style>
82+
page {
83+
height: 100%;
84+
}
85+
8086
.tab-container {
8187
display: flex;
8288
}

0 commit comments

Comments
 (0)