提交 5051f4ba 编写于 作者: H hdx

fix(long-list): 第二次进入同一个tab白屏问题

上级 98b14364
<template>
<list-view class="list" ref="listView" @scrolltolower="loadData">
<!-- TODO 暂时这样写才能保证 loading 在 list 底部 -->
<template v-for="(item, index) in dataList" :key="index">
<list-item class="list-item">
<view class="list-item-icon">
......@@ -23,7 +24,6 @@
</view>
</view>
</list-item>
<!-- TODO 暂时这样写才能保证 loading 在 list 底部 -->
<list-item key="loading" v-if="index==dataList.length-1">
<text class="loading">{{loadingText}}</text>
</list-item>
......@@ -190,7 +190,7 @@
}
.icon-star {
font-family: "UtsIconsFontFamily" !important;
font-family: "UtsIconsFontFamily";
font-size: 16px;
font-style: normal;
color: #ffca3e;
......
......@@ -43,8 +43,14 @@
init : Boolean,
}
// 测试数据
const CategoryData = [
export default {
components: {
longPage
},
data() {
return {
pageScrollTop: 0,
swiperList: [
{
type: 'UpdatedDate',
name: '最新上架'
......@@ -61,16 +67,7 @@
type: 'HotList',
name: '热门总榜'
} as SwiperViewItem
]
export default {
components: {
longPage
},
data() {
return {
pageScrollTop: 0,
swiperList: [] as SwiperViewItem[],
] as SwiperViewItem[],
swiperIndex: -1,
tabsScrollLeft: 0,
swiperIndicatorLineLeft: 0,
......@@ -82,11 +79,6 @@
$isTap: false
}
},
onLoad() {
CategoryData.forEach((item) => {
this.swiperList.push(item)
})
},
onReady() {
this.$headerHeight = (this.$refs["header"] as INode)?.offsetHeight as number
this.$swiperWidth = (this.$refs["swiper"] as INode)?.offsetWidth as number
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册