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组件无法重设value值 #3691

Open
KwongyeeChia opened this issue Jul 5, 2019 · 3 comments
Open

【快应用】input组件无法重设value值 #3691

KwongyeeChia opened this issue Jul 5, 2019 · 3 comments
Assignees
Labels
T-quickapp Target - 编译到快应用

Comments

@KwongyeeChia
Copy link

问题描述
input组件绑定的value值无法重设

复现步骤
[复现问题的步骤]

// 这里可以贴代码
// 点击链接查看如何插入代码:
// https://coding.net/help/doc/project/markdown.html#i-5

```js
export default class Search extends Component {
constructor(props) {
 super(props)
  this.state = {
	keyword: ''
  }
}
getSuggest(e) {
		this.setState({
			keyword: e.target.attr.value
		})
}
let { recommendList, hostList, suggestList, historyList, keyword } = this.state
render() {
  return (
   <Input class='searchInputArea' placeholder='书名、作者' value={keyword} onChange= 
    {this.getSuggest.bind(this)} />
  )
)

期望行为
正确响应值的增删

系统信息
$ taro info
Taro CLI 1.3.5 environment info:
System:
OS: Windows 10
Binaries:
Node: 10.16.0 - C:\Program Files\nodejs\node.EXE
Yarn: 1.16.0 - C:\Program Files (x86)\Yarn\bin\yarn.CMD
npm: 6.9.0 - C:\Program Files\nodejs\npm.CMD

@taro-bot
Copy link

taro-bot bot commented Jul 5, 2019

欢迎提交 Issue~

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

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

Good luck and happy coding~

@jiongrui
Copy link

jiongrui commented Mar 9, 2020

这题有解么,别沉啊 @luckyadam

@Num142857
Copy link

我也遇到了同样的问题

@Chen-jj Chen-jj added T-quickapp Target - 编译到快应用 and removed 快应用 labels Jul 6, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
T-quickapp Target - 编译到快应用
Projects
None yet
Development

No branches or pull requests

5 participants