-
-
Notifications
You must be signed in to change notification settings - Fork 17
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
Upgrade to Vue 3 #44
Upgrade to Vue 3 #44
Conversation
@@ -27,6 +27,7 @@ | |||
"author": "egoist<0x142857@gmail.com>", | |||
"license": "MIT", | |||
"devDependencies": { | |||
"@vue/compiler-sfc": "^3.1.5", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@vue/compiler-sfc
replaces vue-template-compiler
@@ -53,12 +53,15 @@ function installRouterPrefetch( | |||
default: 2000 | |||
} | |||
}, | |||
setup(props, context) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
RouterLink
exposes a setup()
method, so we need to call it in order to have full inheritance.
Otherwise our custom RouterLink
component won't render anything.
mounted() { | ||
if (this.prefetch && observer && canPrefetch) { | ||
requestIdleCallback(this.observe, { timeout: this.timeout }) | ||
} | ||
}, | ||
beforeDestroy() { | ||
beforeUnmount() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some directives have been renamed in Vue 3.
return this.$router.getMatchedComponents(this.to).filter(Component => { | ||
return Component.cid === undefined && typeof Component === 'function' | ||
}) | ||
getRouteComponents(route) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
vue-router
doesn't expose a getMatchedComponents()
method anymore, so we need to define it by ourselves.
(fixes #33) |
can you grant me the push permission to the fork? I made some changes to the tests |
I just added you as a collaborator with write permissions on the repository. |
🎉 This PR is included in version 2.0.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
Hey! I upgraded your library to Vue 3.
We use it at Crisp for two of our apps that we are upgrading to Vue 3 (app.crisp.chat and marketplace.crisp.chat). The behavior is similar to the previous version.
The tests don't run anymore, I need to have a look at them.