Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

taro-ui AtInput组件点击时Cannot read property 'apply' of undefined #8637

Open
ruanxiaoniu opened this issue Feb 3, 2021 · 0 comments
Open
Labels
F-react Framework - React T-weapp Target - 编译到微信小程序 V-2 Version - 2.x

Comments

@ruanxiaoniu
Copy link

相关平台

微信小程序

小程序基础库: 2.11.1
使用框架: React

复现步骤

真机调试时,每次点击输入框组件输入内容时都会报错:
MiniProgramError
Cannot read property 'apply' of undefined
TypeError: Cannot read property 'apply' of undefined
at AtInput.funPrivatebbzzz (weapp:///npm/taro-ui/dist/weapp/components/input/index.js:197:48)

const [isSelect, setSelect] = useState(false)
  <AtInput
            name='value'
            title='选择一:'
            placeholder='请选择'
            value={inputValue}
            type='text'
            onBlur={() => { setSelect(false) }}
            onFocus={() => { setSelect(true) }}
            onChange={(val) => { inputChange(val) }}>
          </AtInput>

期望结果

点击AtInput输入框不报错

实际结果

真机调试时,每次点击输入框组件输入内容时都会报错:
MiniProgramError
Cannot read property 'apply' of undefined
TypeError: Cannot read property 'apply' of undefined
at AtInput.funPrivatebbzzz (weapp:///npm/taro-ui/dist/weapp/components/input/index.js:197:48)

const [isSelect, setSelect] = useState(false)
  <AtInput
            name='value'
            title='选择一:'
            placeholder='请选择'
            value={inputValue}
            type='text'
            onBlur={() => { setSelect(false) }}
            onFocus={() => { setSelect(true) }}
            onChange={(val) => { inputChange(val) }}>
          </AtInput>

环境信息

� Taro v2.1.0


  Taro CLI 2.1.0 environment info:
    System:
      OS: Windows 10
    Binaries:
      Node: 12.16.3 - C:\Program Files\nodejs\node.EXE
      Yarn: 1.22.4 - C:\Users\Administrator\AppData\Roaming\npm\yarn.CMD
      npm: 6.14.4 - C:\Program Files\nodejs\npm.CMD
@taro-bot2 taro-bot2 bot added F-react Framework - React T-weapp Target - 编译到微信小程序 V-2 Version - 2.x labels Feb 3, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
F-react Framework - React T-weapp Target - 编译到微信小程序 V-2 Version - 2.x
Projects
None yet
Development

No branches or pull requests

1 participant