CodingBunny
CodingBunny
@tststs Problem solved。when I open a HTML file(grammar is HTML),and "Packages > Atom Ternjs > Configure project", it show "There is no active server" (the same with @dam1ann) but when...
@wangmaojiawan 这个还真的就是一定的,但是(index,person) in people这种索引在前,元素在后是vue1.x的写法。到了vue2.0,就换成了(person,index) in people这种元素在前,索引在后的写法了。 现在如果你使用vue2.0,还是索引在前元素在后,会出错 详见Vue官方文档(从Vue1.x迁移): http://cn.vuejs.org/v2/guide/migration.html#v-for-遍历数组时的参数顺序-变更
@wangmaojiawan 对了.. 也顺便说一下,其实官方文档里面也有写,Vue2.0之所以这么改,是因为想跟原生JS的forEach方法保持一致(元素在前,索引在后)
我测试了OK啊.. 很普通的代码.. JS部分应该是没问题.. 能不能把HTML的也贴上来... 按道理来说.. 页面应该也不会刷新的才对啊..
- -我甚至连正常会刷新页面的input type="submit"都测试了.. 绑定click事件后.. 页面也不会刷新...