为什么vuejs为什么不能正常的解析啊,
可以输出对象
computed: { label () { var temp = this.useroptions.filter(item => { return item.bActive === true }) console.log(temp[0]) } },
但是解析对象的时候却出错了
computed: { label () { var temp = this.useroptions.filter(item => { return item.bActive === true }) console.log(temp[0]['label']) } },
this.useroptions的数据结构给一下。应该是你代码的问题,报错的提示很明显了。