bug(分区):

This commit is contained in:
zhangjing1
2026-03-09 16:19:54 +08:00
parent 64c22f647c
commit bab5d0b388
3 changed files with 6 additions and 11 deletions

View File

@@ -29,8 +29,10 @@ export default function WgtContentPartition(props) {
const activeIndex = navList.findIndex((item) => item.isActive)
if (activeIndex >= 0) {
setCurrentIndex(activeIndex)
setChildren(navList[activeIndex]?.children || [])
} else {
setCurrentIndex(0)
setChildren(navList[0]?.children || [])
}
}, [navList])

View File

@@ -2,21 +2,16 @@
* Copyright © ShopeX http://www.shopex.cn. All rights reserved.
* See LICENSE file for license details.
*/
import React, { useState, useMemo, useEffect } from 'react'
import React, { useMemo, useEffect } from 'react'
import Taro, { getCurrentInstance } from '@tarojs/taro'
import { View, Text } from '@tarojs/components'
import { View } from '@tarojs/components'
import {
pxToUnitRpx,
classNames,
pickBy,
isWeixin,
showToast,
getMobAppExtraData,
styleNames
} from '@/utils'
showToast} from '@/utils'
import { useImmer } from 'use-immer'
import { SpHtml, SpLogin } from '@/components'
import { useSelector } from 'react-redux'
import { SpLogin } from '@/components'
import api from '@/api'
import doc from '@/doc'
import { getGlobalBaseStyle } from '../helper'

View File

@@ -198,8 +198,6 @@ export default function WgtLocationModule(props) {
return totalHeight
}, [base, immersive, navBarHeight])
// 打印计算结果(用于调试)
console.log('LocationModuleNavBar 高度计算:', calculateNavBarHeight)
return (
<View className={classNames('wgt wgt-location-module')} id={`wgt-location-module-${id || ''}`}>