feat(index):优化轮播图触摸交互支持垂直滚动- 引入touchStartRef记录触摸起始位置- 新增disableSwiper状态控制轮播图禁用

- 设置touchAction样式支持水平垂直滑动
- 调整Swiper组件direction为horizontal
-为Swiper.Item添加touchAction样式优化
- 更新CSS样式确保图片点击事件正常- 添加自定义Swiper类名及触摸控制样式
- 启用-webkit-overflow-scrolling提升滚动体验
This commit is contained in:
2025-10-03 01:27:50 +08:00
parent aa879f0062
commit ea5419dfb5
3 changed files with 59 additions and 19 deletions

View File

@@ -13,7 +13,7 @@ import {View,Text} from '@tarojs/components'
import MySearch from "./MySearch";
import './Header.scss';
const Header = (props: any) => {
const Header = (_: any) => {
// 使用新的useShopInfo Hook
const {
getWebsiteName,
@@ -174,11 +174,11 @@ const Header = (props: any) => {
}
// 获取小程序系统信息
const getSystemInfo = () => {
const systemInfo = Taro.getSystemInfoSync()
// 状态栏高度 + 导航栏高度 (一般为44px)
return (systemInfo.statusBarHeight || 0) + 44
}
// const getSystemInfo = () => {
// const systemInfo = Taro.getSystemInfoSync()
// // 状态栏高度 + 导航栏高度 (一般为44px)
// return (systemInfo.statusBarHeight || 0) + 44
// }
useEffect(() => {
reload().then()