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

用不了是什么原因,,我按照例子来的,,然后根本不触发 #12

Open
uncleMrWang opened this issue Sep 17, 2019 · 1 comment

Comments

@uncleMrWang
Copy link

import Vue2Touch from 'vue2-touch'
Vue.use(Vue2Touch);

Tap me!
<script> export default { name: 'HelloWorld', props: { msg: String }, methods:{ callback(){ console.log('a'); }, onSwipeLeft(){ console.log('a'); } }, mounted() { } } </script> <style scoped lang="less"> .divSwipe{ height: 500px; background: #ccc; } </style>
@lenvonsam
Copy link
Owner

这是vue的directive功能,要在dom元素行内加上v-touch
image

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