NervJS / taro-ui

一款基于 Taro 框架开发的多端 UI 组件库
https://taro-ui.taro.zone
MIT License
4.53k stars 758 forks source link

AtSearchBar无法聚焦 #1805

Closed pj110 closed 3 months ago

pj110 commented 3 months ago

问题描述 AtSearchBar点击无法聚焦,无法改变其中的值

// 这里可以贴代码

import { useState } from 'react'
import { View,} from '@tarojs/components'
import {  AtSearchBar } from 'taro-ui'

const Index = () => {
    const [searchBarState, setSearchBarState] = useState('')

    return (
        <View className='index'>
            <AtSearchBar
              className='index-search-bar'
              actionName='搜一下'
              value={searchBarState}
              onChange={(val) => {setSearchBarState(val)}}
            />

        </View>
    )
}
export default Index

期望行为

报错信息

image

系统信息

👽 Taro v3.6.32

Taro CLI 3.6.32 environment info: System: OS: Windows 11 10.0.22631 Binaries: Node: 20.11.0 - C:\Program Files\nodejs\node.EXE Yarn: 1.22.22 - C:\Program Files\nodejs\yarn.CMD npm: 10.2.4 - C:\Program Files\nodejs\npm.CMD npmPackages: @tarojs/cli: 3.6.32 => 3.6.32 @tarojs/components: 3.6.32 => 3.6.32 @tarojs/helper: 3.6.32 => 3.6.32 @tarojs/plugin-framework-react: 3.6.32 => 3.6.32 babel-preset-taro: 3.6.32 => 3.6.32 eslint-config-taro: 3.6.32 => 3.6.32 react: ^18.0.0 => 18.3.1 taro-ui: ^3.2.1 => 3.3.0

报错平台weapp

补充信息

taro-ui-bot[bot] commented 3 months ago

欢迎提交 Issue~

如果你提交的是 bug 报告,请务必遵循 Issue 模板的规范,尽量用简洁的语言描述你的问题,最好能提供一个稳定简单的复现。🙏🙏🙏

如果你的信息提供过于模糊或不足,或者已经其他 issue 已经存在相关内容,你的 issue 有可能会被关闭。

Good luck and happy coding~

robinv8 commented 3 months ago

先参考该 issue 排查下 https://github.com/NervJS/taro-ui/issues/1726

pj110 commented 3 months ago

感谢,找到解决方法了