优艾设计网

vue 2.0 同个组件 props 数据被影响了??

例子
http://codepen.io/353943780/p...

操作:先点击上部分的 li,再点击下部分的 li,结果发现上部分选择的值被改变了,请问是什么原因优艾设计网_电脑技术导致的呢?

1.x 版本不会出现这样的情况


上官魅想吃就吃离弦的歌离弦的歌 16小时前

In addition, every time the parent component is updated, all props in the child component will be refreshed with the latest value. This mea优艾设计网_在线设计ns you should not attempt to mutate a prop inside a child component. If you do, Vue will warn you in the console.via http://vuejs.org/guide/compon...


0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜