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

[feature] Vue 3 support? #64

Open
acrossoffwest opened this issue Dec 13, 2020 · 1 comment
Open

[feature] Vue 3 support? #64

acrossoffwest opened this issue Dec 13, 2020 · 1 comment

Comments

@acrossoffwest
Copy link

Will you support Vue 3?

@borovez
Copy link

borovez commented Apr 22, 2021

You can easily convert it to Vue 3.

All you need to do is edit the tooltip directive script and rename the directive lifecycle function names based on the new directive lifecycle standards from upgrading from Vue 2 to Vue 3

created - new! This is called before the element's attributes or event listeners are applied.
bind → beforeMount
inserted → mounted
beforeUpdate: new! This is called before the element itself is updated, much like the component lifecycle hooks.
update → removed! There were too many similarities to updated, so this is redundant. Please use updated instead.
componentUpdated → updated
beforeUnmount: new! Similar to component lifecycle hooks, this will be called right before an element is unmounted.
unbind -> unmounted

The new API is as follows:

const MyDirective = {
  beforeMount(el, binding, vnode, prevVnode) {},
  mounted() {},
  beforeUpdate() {}, // new
  updated() {},
  beforeUnmount() {}, // new
  unmounted() {}
}

Read more here: https://v3.vuejs.org/guide/migration/custom-directives.html#_3-x-syntax

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