NervJS / taro-ui

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

input 组件抖动 #1791

Open SeriousLose opened 4 months ago

SeriousLose commented 4 months ago

Taro UI 版本信息

v3.3.0

问题描述

input在真实手机上,点击获取焦点后,会进行抖动。placeholder 和 输入文本内容 上下错位

复现步骤

1.扫描 Taro UI 小程序 体验码,或打开 Taro UI 小程序 2.选中表单 3.选中Input输入框

复现代码

import Taro from '@tarojs/taro'
import { AtInput }  from 'taro-ui'
export default class Index extends Taro.Component {
  constructor () {
    super(...arguments)
    this.state = {
      value: ''
    }
  }
  handleChange (value) {
    this.setState({
      value
    })
    // 在小程序中,如果想改变 value 的值,需要 `return value` 从而改变输入框的当前值
    return value
  }
  render () {
    return (
      <AtInput
        name='value'
        title='标准五个字'
        type='text'
        placeholder='标准五个字'
        value={this.state.value}
        onChange={this.handleChange.bind(this)}
      />
    )
  }
}

报错信息

无报错

系统信息

👽 Taro v3.6.25

Taro CLI 3.6.25 environment info: System: OS: Windows 10 10.0.19045 Binaries: Node: 18.20.1 - C:\Program Files\nodejs\node.EXE Yarn: 1.22.22 - C:\Program Files\nodejs\yarn.CMD npm: 10.7.0 - C:\Program Files\nodejs\npm.CMD npmPackages: @tarojs/cli: 3.6.24 => 3.6.24 @tarojs/components: 3.6.24 => 3.6.24 @tarojs/helper: 3.6.24 => 3.6.24 @tarojs/plugin-framework-react: 3.6.24 => 3.6.24 @tarojs/plugin-platform-alipay: 3.6.24 => 3.6.24 @tarojs/plugin-platform-h5: 3.6.24 => 3.6.24 @tarojs/plugin-platform-jd: 3.6.24 => 3.6.24 @tarojs/plugin-platform-qq: 3.6.24 => 3.6.24 @tarojs/plugin-platform-swan: 3.6.24 => 3.6.24 @tarojs/plugin-platform-tt: 3.6.24 => 3.6.24 @tarojs/plugin-platform-weapp: 3.6.24 => 3.6.24 @tarojs/react: 3.6.24 => 3.6.24 @tarojs/runtime: 3.6.24 => 3.6.24 @tarojs/shared: 3.6.24 => 3.6.24 @tarojs/taro: 3.6.24 => 3.6.24 @tarojs/taro-loader: 3.6.24 => 3.6.24 @tarojs/webpack5-runner: 3.6.24 => 3.6.24 babel-preset-taro: 3.6.24 => 3.6.24 eslint-config-taro: 3.6.24 => 3.6.24 react: ^18.0.0 => 18.2.0 taro-ui: ^3.3.0 => 3.3.0

补充信息

placeholder 和 input文本输入内容高度不一致

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

欢迎提交 Issue~

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

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

Good luck and happy coding~

SeriousLose commented 4 months ago

https://github.com/NervJS/taro-ui/assets/31263817/793f3e4f-0d79-40f8-ada3-53acfcc69d9f

robinv8 commented 4 months ago

你本地运行了 taro-ui 的 demo,还是直接打开了 taro-ui 的示例小程序?