Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

你好,请问如果那个分页总条数all通过props传进来的没效果怎么办? #1

Open
Gala-1024 opened this issue Jun 2, 2016 · 4 comments

Comments

@Gala-1024
Copy link

我的分页总条数是通过AJAX请求下来,然后用props传进来这个分页组件里面,但是貌似没效果,请问怎么办呢?

@cycgit
Copy link
Owner

cycgit commented Jun 3, 2016

刚整理成组件,试试

@Gala-1024
Copy link
Author

THX,晚上回去试试哈

@Gala-1024
Copy link
Author

可以了。提示一下:记得加上watch哈。我直接上一版的来用了哈哈
watch: {
cur: function(oldValue, newValue) {
console.log(arguments)
}
}

@Gala-1024
Copy link
Author

把this.$dispatch('btn-click', oldValue)放到watch里面,就可以监听你绑定的事件listen,配合vuex的话,感觉很好用,谢谢楼主。

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

No branches or pull requests

2 participants