fix: 移动端左右滑动头部错位

This commit is contained in:
fit2cloud-chenyw 2022-04-01 11:33:24 +08:00
parent b93847a5b4
commit 3291810844
3 changed files with 18 additions and 5 deletions

View File

@ -43,9 +43,12 @@ export default {
timer: null
};
},
onLoad() {
onLoad() {
// sdk
this.amapPlugin = util.mapInit();
this.historyList = uni.getStorageSync('search:history');
},
created() {
this.historyList = uni.getStorageSync('search:history');
},
methods: {
@ -104,6 +107,7 @@ export default {
index: 4,
userId: node.userId
}
this.isHistory= false
if(node.type === 'panel') {
uni.navigateTo({

View File

@ -5,10 +5,13 @@
<block slot="right">
<uni-row class="demo-uni-row" >
<uni-col :span="12">
<view @click="enshrine">
<uni-icons v-if="hasStar" type="star-filled" size="18" color="#007AFF"></uni-icons>
<uni-icons v-else type="star" size="18" color="#999"></uni-icons>
<view v-if="banner.index !== 2" @click="enshrine" >
<uni-icons v-if="hasStar" type="star-filled" size="18" color="#007AFF"></uni-icons>
<uni-icons v-else type="star" size="18" color="#999"></uni-icons>
</view>
<view v-else >
<uni-icons type="star" size="18" color="#fff"></uni-icons>
</view>
</uni-col>
<uni-col :span="12" style="margin: 0 10rpx;">

View File

@ -205,8 +205,14 @@
this.switchTab(index);
},
ontabchange(e) {
// let index = e.target.current || e.detail.current;
let index = e.target.current || e.detail.current;
// this.switchTab(index);
if (this.tabIndex === index) {
return;
}
this.tabIndex = index;
this.scrollInto = this.tabBars[index].id;
},
switchTab(index) {
if (this.newsList[index].data.length === 0) {