-
Notifications
You must be signed in to change notification settings - Fork 90
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
[Bug Report] V-Touch directive is broken in 2.0 #130
Comments
So I spent quite a bit of time on this and I could not reproduce the issue whatesoever outside of that environment. So I decided to strip the application down to a basic js one, and it was still having the import issue. At this point, I'm honestly not sure, but I can confirm that 2 of my recent apps, one is brand new and one is recently upgraded, it worked as expected. |
Update vue-cli and try again? |
I have the same issue, only manual import of the touch directive helped. vue-cli version is 3.9.3. |
I upgraded my vue-cli version to 3.9.3 and generated a new app with all of the defaults selected, and the problem is still there. |
Similar issue after upgrading to 2.0
My code hasn't changed since the migration, and it looks like this:
Vuetify Version: 2.0.0 |
I don't know if this is related but I was having similar issue with the scroll directive. // plugins/vuetify.js
import Vuetify from 'vuetify/lib';
import { Ripple, Scroll } from 'vuetify/lib/directives';
Vue.use(Vuetify, {
directives: {
Ripple,
Scroll,
},
});
export default new Vuetify({ ... }); |
I have same issue, I have latest vue-cli 3.10.0 also tried what @razorfever suggests |
I have the same issue (after upgrading from vuetify 1.5). Adding
fixes it. |
This doesn't work for me, any updates on this or other workarounds? |
Same for me, It doesn't work. Full report: // main.ts
import Vuetify, { ... } from 'vuetify/lib'
import { Ripple, Touch } from 'vuetify/lib/directives'
...
Vue.use(Vuetify, {
components: {
...
},
directives: {
Touch,
},
theme: {
primary: '#51B2E0',
},
})
...
const vueInstance = new Vue({
vuetify,
...
render: h => h(App),
})
document.addEventListener('DOMContentLoaded', function () {
vueInstance.$mount('#app')
})
export default vueInstance // component.vue
...
<span
class="card"
@click="toggleSmallResults"
v-touch="{
left: nextResult,
right: prevResult
}">
... Traceback:
|
same error with the |
upgraded vuetify to 2.1.12 and vuetify-loader to 1.4.2 and it's working now. |
I'm on vuetify 2.1.13 and vuetify-loader 1.4.3 but still can't get the v-touch directive working, either with or without the manual plugin.js modification. I've got the v-touch directive implemented on a v-list-item |
did you try the import syntax from @mseele ? This one : It is working for me with the |
update: this actually does work. I placed the reference in the constructor instead of the use.Vue() call. |
Sorry, I also configured it wrongly. I followed all the instructions again and it worked! |
It seems it is still broken in the latest version of vuetify 2.2.26 and vuetify loader 1.4.3. Any update on this? Do we have support for swipeable components in vuetify? |
Either way it does not work. whether using Vue.use call or passing reference to the constructor |
In my case, it only works like this:
|
Which vuetify version and loader version are you using? And any idea about
swipeable controls in vuetify?
…On Sat, May 2, 2020, 13:14 Libidine ***@***.***> wrote:
In my case, it only works like this:
import Vue from '../../node_modules/vue';
import Vuetify from 'vuetify/lib';
import { Touch } from 'vuetify/lib/directives';
Vue.use(Vuetify, {
directives: {
Touch,
}});
export default new Vuetify({
theme: {
options: {
customProperties: true,
},
dark: true,
},
icons: {
iconfont: 'fa' && 'md',
},
});
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<https://github.com/vuetifyjs/vuetify/issues/8027#issuecomment-622811245>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAYXFJGPOPSFB6WZIIG6OXDRPPFMXANCNFSM4IG7JTTA>
.
|
I use:
Swipeable in App.vue:
|
Thanks. I will give a try..
…On Sat, May 2, 2020, 19:07 Libidine ***@***.***> wrote:
Which vuetify version and loader version are you using? And any idea about
swipeable controls in vuetify?
I use:
"vuetify": "^2.2.26",
"vuetify-loader": "^1.4.3",
"vue-cli-plugin-vuetify": "~2.0.5",
Swipeable:
<v-layout v-touch="{ right: () => SwipeRight(), left: () => SwipeLeft(),
down: () => SwipeBottom(), up: () => SwipeTop() }">
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<https://github.com/vuetifyjs/vuetify/issues/8027#issuecomment-622954978>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAYXFJBEOLQOFXSLQYYRL43RPQOYTANCNFSM4IG7JTTA>
.
|
Adding the Touch directive to the Vue.use config wfm. |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
I confirm that I also have this issue under |
Same problem in |
Same problem in version |
Environment
Vuetify Version: 2.0.1
Vue Version: 2.6.10
Browsers: Chrome 75.0.3770.142
OS: Windows 10
Steps to reproduce
Add a v-touch directive to a component.
Expected Behavior
V-touch directive works with touch inputs.
Actual Behavior
V-touch throws exception: "Failed to resolve directive: touch"
Reproduction Link
https://github.com/cmseeling/vuetify-touch-issue
The text was updated successfully, but these errors were encountered: