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

input 组件抖动 #1791

Open
SeriousLose opened this issue May 15, 2024 · 3 comments
Open

input 组件抖动 #1791

SeriousLose opened this issue May 15, 2024 · 3 comments

Comments

@SeriousLose
Copy link

SeriousLose commented May 15, 2024

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文本输入内容高度不一致

Copy link

taro-ui-bot bot commented May 15, 2024

欢迎提交 Issue~

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

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

Good luck and happy coding~

@SeriousLose
Copy link
Author

1000051783.mp4
@robinv8
Copy link
Member

robinv8 commented Jun 3, 2024

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants