Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

v-on绑定的事件监听和例子的效果不太一样。 #20

Open
wangmaojiawan opened this issue Mar 25, 2017 · 3 comments
Open

v-on绑定的事件监听和例子的效果不太一样。 #20

wangmaojiawan opened this issue Mar 25, 2017 · 3 comments

Comments

@wangmaojiawan
Copy link

{{ message }}

逆转消息
var app5 = new Vue({ el: '#app-5', data: { message: 'Hello Vue.js!' }, methods: { reverseMessage: function () { this.message = this.message.split('').reverse().join('') } } }) 这个例子点击按钮以后是会触发on的监听事件但是页面还是会很快又刷新成初始化的状态了,message的内容还是正序,没有办法像例子那样可以通过这个button来回切换。
@HeZhaoyin
Copy link

我测试了OK啊.. 很普通的代码.. JS部分应该是没问题.. 能不能把HTML的也贴上来... 按道理来说.. 页面应该也不会刷新的才对啊..

@HeZhaoyin
Copy link

  • -我甚至连正常会刷新页面的input type="submit"都测试了.. 绑定click事件后.. 页面也不会刷新...

@wangmaojiawan
Copy link
Author

就用的测试代码,我测试用的chrome浏览器,我是在Visual Studio里面创建了一个asp.web项目做的测试。

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants