Skip to content

Add Vue.version and app.version to the API reference #999

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

Merged
merged 1 commit into from
Apr 21, 2021

Conversation

skirtles-code
Copy link
Contributor

Closes #997.

This PR documents Vue.version and app.version in the API reference. These are two different ways to access the current Vue version.

In Vue 2, we just had Vue.version: https://vuejs.org/v2/api/#Vue-version. When interacting with a global Vue object, e.g. for CDN usage, the equivalent in Vue 3 would be exactly the same, Vue.version.

For plugins, the first argument passed to install was previously Vue. It's now app, which also exposes a version property. This allows plugins to check the version using the version property of that first argument.

I borrowed much of the wording and example code from the Vue 2 documentation.

@NataliaTepluhina NataliaTepluhina merged commit 4a437b6 into vuejs:master Apr 21, 2021
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

Successfully merging this pull request may close these issues.

Missing application api document about app.version
2 participants