You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Provides the installed version of Vue as a string. This is especially useful for community [plugins](/guide/plugins.html), where you might use different strategies for different versions.
325
+
326
+
-**Example:**
327
+
328
+
```js
329
+
exportdefault {
330
+
install(app) {
331
+
constversion=Number(app.version.split('.')[0])
332
+
333
+
if (version <3) {
334
+
console.warn('This plugin requires Vue 3')
335
+
}
336
+
337
+
// ...
338
+
}
339
+
}
340
+
```
341
+
342
+
-**See also**: [Global API - version](/api/global-api.html#version)
0 commit comments