-
Notifications
You must be signed in to change notification settings - Fork 4.1k
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
table单元格里面有input,input每输入一个字符就会自动跳出焦点 #1781
Comments
代码中的this.actiondata是table组件的:data的值吧,在table中通过render函数自定义的时候,事件里面不能这样赋值,一种解决方式是:定义一个存储数组变量,用这个存储数组来赋值,最后再把存储数组的值赋值给this.actiondata。
......
然后再监听这个存储数组
|
The user above is correct |
假如你绑定的table的数据是tableData,input数据改变的时候你把整行的数据替换掉,就不会造成table重新渲染,导致input失焦了 |
给个赞 |
为解决办法 点赞 |
@lockontan 我用了你这个方法,添加了this.tableData[params.index] = params.row这一行代码 |
@lIamlqyfly 贴下你的代码 |
使用change代替input就可以了 |
使用change代替input也可以解决此问题 |
为什么整行把数据替换就不会造成table重新渲染呢? |
this.tableData[params.index] = params.row; |
params.row.total = value |
这个问题解决了没啊?在几点几的版本不会有这个问题啊? |
每输入一个字符,input都会跳出焦点,咋办呢
The text was updated successfully, but these errors were encountered: