Welcome toVigges Developer Community-Open, Learning,Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
517 views
in Technique[技术] by (71.8m points)

遍历vue里面的数据。得到的数组。多了个后缀__ob__: Observer怎么处理?

网上说,使用JSON.parse(JSON.stringify(this.list))这个方法

但是为什么我使用前后。数据毫无变化?

哪里出问题了呢?
请问正确的方法是什么?
image.png
image.png


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

__ob__属性是vue添加的,拷贝后不要赋值到this上就可以了


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to Vigges Developer Community for programmer and developer-Open, Learning and Share
...