🐞 fix:修改冲突产生多余的代码
This commit is contained in:
parent
18c46e1b17
commit
1e8720eac1
@ -82,21 +82,6 @@ const SideBar = ({
|
|||||||
computeSelectTab(index)
|
computeSelectTab(index)
|
||||||
}
|
}
|
||||||
|
|
||||||
useEffect(() => {
|
|
||||||
Taro.nextTick(() => {
|
|
||||||
const query = Taro.createSelectorQuery()
|
|
||||||
query.select('.side_bar_select').boundingClientRect((rect) => {
|
|
||||||
console.log('rect::', rect)
|
|
||||||
const clientHeight = rect.height
|
|
||||||
const clientWidth = rect.width
|
|
||||||
const ratio = 750 / clientWidth
|
|
||||||
const height = clientHeight * ratio
|
|
||||||
num_half.current = Math.ceil(height / 2 / heightItem)
|
|
||||||
init()
|
|
||||||
}).exec()
|
|
||||||
})
|
|
||||||
})
|
|
||||||
|
|
||||||
const [currentIndex, setcurrentIndex] = useState(0)
|
const [currentIndex, setcurrentIndex] = useState(0)
|
||||||
useMemo(() => {
|
useMemo(() => {
|
||||||
Taro.nextTick(() => {
|
Taro.nextTick(() => {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user