input组件的value绑定在数组元素上

发布于 6 年前作者 gang0513283 次浏览最后编辑 6 年前来自 ask

<input value=‘{{text[0]}}’ data-index=‘0’ bindinput=‘check’ bindblur=‘loseFocus’  />

<input value=‘{{text[1]}}’ data-index=‘0’ bindinput=‘check’ bindblur=‘loseFocus’ />

如上,开发的时候有两个input,value值分别绑定在数组text[0],text[1]上,问题是,通过this.setData()可以设置input 的value值,可反过来,在input组件里输入值并不会改变数组里对应元素的值,这个是BUG吗?

1 回复
zhaojun
zhaojun1 楼4 年前

你好,请具体描述问题出现的流程,并提供能复现问题的简单代码片段(https://developers.weixin.qq.com/miniprogram/dev/devtools/minicode.html)。