Commit eaad1a02 authored by 张娇(东信)'s avatar 张娇(东信)

隐藏tab滚动条

parent d43ab888
......@@ -82,6 +82,7 @@
<script setup>
import OtherSearch from '../../components/index/OtherSearch.vue';
import { ref } from 'vue';
import { onShow } from '@dcloudio/uni-app';
// 图片
const swiperList = ref([
'../../static/detail/img2.png',
......@@ -94,6 +95,13 @@ const storeList = ref([
{ img: '/static/detail/img8.png', text: '客服' },
{ img: '/static/detail/img6.png', text: '购物车' },
]);
// 进入页面回到顶部
onShow(() => {
uni.pageScrollTo({
scrollTop: 0,
duration: 300,
});
});
function toStore() {
// TODO: 跳转到筑农严选
xma.navigateTo({
......
......@@ -62,7 +62,7 @@
/>
</view>
<!-- tabs-->
<scroll-view class="tabs" scroll-x="true">
<scroll-view class="tabs" show-scrollbar="false" scroll-x :scroll-with-animation="true">
<text
@tap="choice(index, item.categoryId)"
v-for="(item, index) in tabsData"
......@@ -82,7 +82,7 @@
/>
<view class="sort-list">
<view class="sort-img" v-for="(item, index) in detailList" :key="index">
<img :src="item.img" style="width: 330rpx; height: 330rpx" />
<img @tap="toDetail" :src="item.img" style="width: 330rpx; height: 330rpx" />
<view class="detail-title">{{ item.text }}</view>
<view class="price-page">
<text class="price">{{ item.price }}</text>
......@@ -211,6 +211,13 @@ page {
.tabs {
white-space: nowrap;
height: 60rpx;
::-webkit-scrollbar {
display: none;
width: 0;
height: 0;
color: transparent;
}
background-color: transparent;
.text {
font-size: 24rpx;
color: #d8d8d8;
......@@ -230,7 +237,7 @@ page {
position: relative;
&::after {
content: '';
width: 20rpx;
width: 40rpx;
height: 12rpx;
background: url('../../static/assets/selected.png') no-repeat;
background-size: 100% 100%;
......
......@@ -24,7 +24,7 @@
</view>
<view>
<view>
<scroll-view class="tabs" scroll-x="true">
<scroll-view class="tabs" show-scrollbar="false" scroll-x :scroll-with-animation="true">
<text
@tap="choice(index, item.categoryId)"
v-for="(item, index) in tabsData"
......@@ -312,6 +312,13 @@ page {
margin-left: 20rpx;
border-radius: 8px 8px 0px 0px;
background: #ffffff;
::-webkit-scrollbar {
display: none;
width: 0;
height: 0;
color: transparent;
}
background-color: transparent;
}
.tabs {
white-space: nowrap;
......@@ -450,11 +457,14 @@ page {
}
.pre-text {
float: right;
margin-top: -40rpx;
margin-top: -36rpx;
font-size: 11px;
font-weight: normal;
line-height: 14px;
color: #ffffff;
position: relative;
left: -40rpx;
z-index: 999;
}
.cart-floating {
position: fixed;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment