Browse Source

移除seller/index页面中的上下滑动提示

pull/1/head
徐飞洋 3 months ago
parent
commit
a96810a9c0
  1. 35
      app.wxss
  2. 35
      pages/seller/index.wxml
  3. 56
      pages/seller/index.wxss

35
app.wxss

@ -1,39 +1,4 @@
/**app.wxss**/
/* 全局滚动条隐藏 - 强制覆盖所有页面 */
::-webkit-scrollbar {
display: none !important;
width: 0 !important;
height: 0 !important;
opacity: 0 !important;
-webkit-appearance: none !important;
}
::-webkit-scrollbar-track {
display: none !important;
width: 0 !important;
height: 0 !important;
}
::-webkit-scrollbar-thumb {
display: none !important;
width: 0 !important;
height: 0 !important;
}
/* 针对微信小程序scroll-view组件的强制滚动条隐藏 */
scroll-view {
-webkit-scrollbar: none !important;
scrollbar-width: none !important;
overflow-scrolling: touch;
overflow: auto !important;
}
/* 强制页面根元素不显示滚动条 */
page {
-webkit-scrollbar: none !important;
scrollbar-width: none !important;
overflow-x: hidden !important;
}
.container {
display: flex;
flex-direction: column;

35
pages/seller/index.wxml

@ -70,10 +70,12 @@
<view wx:if="{{item.imageUrls && item.imageUrls.length > 1}}" style="position: absolute; top: 0; left: 0; width: 100%; height: 100%;">
<swiper
class="image-swiper"
style="width: 100%; height: 100%;"
style="width: 100%; height: 100%; --swiper-navigation-size: 0;"
current="{{item.currentImageIndex || 0}}"
bindchange="swiperChange"
data-id="{{item.id}}">
data-id="{{item.id}}"
indicator-dots="false"
show-indicators="false">
<block wx:for="{{item.imageUrls}}" wx:for-item="img" wx:for-index="idx" wx:key="idx">
<swiper-item>
<image src="{{img}}" mode="aspectFill" style="width: 100%; height: 100%;" bindtap="previewImage" data-urls="{{item.imageUrls}}" data-index="{{idx}}"></image>
@ -163,10 +165,12 @@
<view wx:if="{{item.imageUrls && item.imageUrls.length > 1}}" style="position: absolute; top: 0; left: 0; width: 100%; height: 100%;">
<swiper
class="image-swiper"
style="width: 100%; height: 100%;"
style="width: 100%; height: 100%; --swiper-navigation-size: 0;"
current="{{item.currentImageIndex || 0}}"
bindchange="swiperChange"
data-id="{{item.id}}">
data-id="{{item.id}}"
indicator-dots="false"
show-indicators="false">
<block wx:for="{{item.imageUrls}}" wx:for-item="img" wx:for-index="idx" wx:key="idx">
<swiper-item>
<image src="{{img}}" mode="aspectFill" style="width: 100%; height: 100%;" bindtap="previewImage" data-urls="{{item.imageUrls}}" data-index="{{idx}}"></image>
@ -264,10 +268,12 @@
<view wx:if="{{item.imageUrls && item.imageUrls.length > 1}}" style="position: absolute; top: 0; left: 0; width: 100%; height: 100%;">
<swiper
class="image-swiper"
style="width: 100%; height: 100%;"
style="width: 100%; height: 100%; --swiper-navigation-size: 0;"
current="{{item.currentImageIndex || 0}}"
bindchange="swiperChange"
data-id="{{item.id}}">
data-id="{{item.id}}"
indicator-dots="false"
show-indicators="false">
<block wx:for="{{item.imageUrls}}" wx:for-item="img" wx:for-index="idx" wx:key="idx">
<swiper-item>
<image src="{{img}}" mode="aspectFill" style="width: 100%; height: 100%;" bindtap="previewImage" data-urls="{{item.imageUrls}}" data-index="{{idx}}"></image>
@ -369,10 +375,12 @@
<view wx:if="{{item.imageUrls && item.imageUrls.length > 1}}" style="position: absolute; top: 0; left: 0; width: 100%; height: 100%;">
<swiper
class="image-swiper"
style="width: 100%; height: 100%;"
style="width: 100%; height: 100%; --swiper-navigation-size: 0;"
current="{{item.currentImageIndex || 0}}"
bindchange="swiperChange"
data-id="{{item.id}}">
data-id="{{item.id}}"
indicator-dots="false"
show-indicators="false">
<block wx:for="{{item.imageUrls}}" wx:for-item="img" wx:for-index="idx" wx:key="idx">
<swiper-item>
<image src="{{img}}" mode="aspectFill" style="width: 100%; height: 100%;" bindtap="previewImage" data-urls="{{item.imageUrls}}" data-index="{{idx}}"></image>
@ -545,7 +553,7 @@
<view bindtap="saveEdit" style="font-size: 32rpx; color: #07c160;">提交</view>
</view>
<scroll-view scroll-y="true" style="height: calc(100vh - 90rpx); overflow-y: auto; -webkit-overflow-scrolling: touch; padding: 40rpx 60rpx; box-sizing: border-box; -webkit-scrollbar: none; scrollbar-width: none;">
<scroll-view scroll-y="true" style="height: calc(100vh - 90rpx); overflow-y: auto; -webkit-overflow-scrolling: touch; padding: 40rpx 60rpx; box-sizing: border-box;">
<view>
<!-- 照片上传区域 -->
@ -624,12 +632,13 @@
<view class="image-preview-mask" wx:if="{{showImagePreview}}" style="position: fixed; top: 0; left: 0; right: 0; bottom: 0; background: rgba(0, 0, 0, 0.9); display: flex; justify-content: center; align-items: center; z-index: 9999;" catchtouchmove="true" bindtap="closeImagePreview">
<view style="width: 100%; height: 100%; display: flex; justify-content: center; align-items: center;">
<swiper
style="width: 100%; height: 100%;"
style="width: 100%; height: 100%; --swiper-navigation-size: 0;"
current="{{previewImageIndex}}"
bindchange="onPreviewImageChange"
indicator-dots="true"
indicator-color="rgba(255,255,255,0.5)"
indicator-active-color="#fff">
indicator-active-color="#fff"
show-indicators="false">
<block wx:for="{{previewImageUrls}}" wx:key="*this">
<swiper-item>
<image
@ -713,7 +722,7 @@
<!-- 商品名称列表 -->
<scroll-view
scroll-y="true"
style="max-height: 60vh; padding: 0; -webkit-overflow-scrolling: touch; -webkit-scrollbar: none; scrollbar-width: none;"
style="max-height: 60vh; padding: 0; -webkit-overflow-scrolling: touch;"
enable-back-to-top="false"
>
<view
@ -763,7 +772,7 @@
<!-- 规格列表 -->
<scroll-view
scroll-y="true"
style="max-height: 60vh; padding: 0; -webkit-overflow-scrolling: touch; -webkit-scrollbar: none; scrollbar-width: none;"
style="max-height: 60vh; padding: 0; -webkit-overflow-scrolling: touch;"
enable-back-to-top="false"
>
<view

56
pages/seller/index.wxss

@ -1,60 +1,12 @@
/* pages/seller/index.wxss */
/* 隐藏页面滚动条 - 完整强制解决方案 */
/* 全局滚动条隐藏 - 强制覆盖所有元素 */
/* 隐藏页面滚动条 */
::-webkit-scrollbar {
display: none !important;
width: 0 !important;
height: 0 !important;
opacity: 0 !important;
-webkit-appearance: none !important;
}
::-webkit-scrollbar-track {
display: none !important;
width: 0 !important;
height: 0 !important;
}
::-webkit-scrollbar-thumb {
display: none !important;
width: 0 !important;
height: 0 !important;
display: none;
}
/* 针对微信小程序scroll-view组件的强制滚动条隐藏 */
scroll-view {
-webkit-scrollbar: none !important;
scrollbar-width: none !important;
overflow-scrolling: touch;
/* 确保滚动区域不显示滚动条 */
overflow: auto !important;
}
/* 容器元素滚动条隐藏 */
.container {
-webkit-scrollbar: none !important;
scrollbar-width: none !important;
overflow-x: hidden !important;
overflow-y: auto !important;
}
/* 确保常用滚动容器隐藏滚动条 */
.scrollable-container {
-webkit-scrollbar: none !important;
scrollbar-width: none !important;
}
/* 强制页面根元素不显示滚动条 */
page {
-webkit-scrollbar: none !important;
scrollbar-width: none !important;
overflow-x: hidden !important;
}
/* 为所有可能滚动的元素添加滚动条隐藏 */
.view, text, image, button, input, textarea, swiper, navigator, picker, slider, switch {
-webkit-scrollbar: none !important;
scrollbar-width: none !important;
-webkit-scrollbar: none;
scrollbar-width: none;
}
/* 重置默认样式,确保不继承父类样式 */

Loading…
Cancel
Save