feat(index): 实现热销商品Tabs粘性布局功能

- 引入Sticky组件实现Tabs吸顶效果
- 添加粘性状态变化回调通知父组件- 动态计算系统状态栏高度作为吸顶阈值-优化Tabs样式在粘性状态下的视觉表现
- 调整商品列表间距以适配新布局- 完善首页Header组件与Tabs粘性状态联动逻辑
- 移除useDidHide中的主题设置调用
- 初始化时设置应用主题配置
This commit is contained in:
2025-09-26 13:07:42 +08:00
parent b8e13fdc68
commit af98a3881a
3 changed files with 67 additions and 27 deletions

View File

@@ -38,6 +38,8 @@ function App(props: { children: any; }) {
};
// 可以使用所有的 React Hooks
useEffect(() => {
// 设置主题
handleTheme()
// Taro.getSetting获取用户的当前设置。返回值中只会出现小程序已经向用户请求过的权限。
Taro.getSetting({
success: (res) => {
@@ -102,7 +104,6 @@ function App(props: { children: any; }) {
// 对应 onHide
useDidHide(() => {
handleTheme()
})
return props.children