Why does html show that the length of the array does not match the reality?

problem description

the debug window clearly shows that the result array has two elements, but it is always shown through the result.length page that the array length is zero

the environmental background of the problems and what methods you have tried

WeChat Mini Programs developed

related codes

/ / Please paste the code text below (do not replace the code with pictures)
html Code:
< view class= "weui-cells searchbar-result" wx:if= "{{inputVal.length > 0}}" >

        <navigator url="" class="weui-cell" hover-class="weui-cell_active">
            <view class="weui-cell__bd">
                <view>{{result.length}}</view>
            </view>
        </navigator>

< / view >

js Code:
inputTyping: function (e) {

var num;
for (var i = 1; i < this.data.names.length; iPP) {

  num = this.data.names[i].Key.indexOf(e.detail.value);
  if (num != -1) {
    this.data.result.push(this.data.names[i].Key)
  }
}
console.log("re" + this.data.result.length)
console.log("input" + this.data.inputVal.length)
this.setData({
  inputVal: e.detail.value
});
 

},
result0

what result do you expect? What is the error message actually seen?

Apr.02,2021
Menu