]> git.ipfire.org Git - thirdparty/vuejs/core.git/commitdiff
feat(runtime-core): expose version on app instance
authorEvan You <yyx990803@gmail.com>
Fri, 26 Jun 2020 13:03:55 +0000 (09:03 -0400)
committerEvan You <yyx990803@gmail.com>
Fri, 26 Jun 2020 13:03:55 +0000 (09:03 -0400)
close #1449

packages/runtime-core/src/apiCreateApp.ts

index 8c0db0412e7b5ca4587f50d085e03e59c6966adb..8fb61324121c5c84351a69bd0d854bb2045b3bdc 100644 (file)
@@ -13,8 +13,10 @@ import { isFunction, NO, isObject } from '@vue/shared'
 import { warn } from './warning'
 import { createVNode, cloneVNode, VNode } from './vnode'
 import { RootHydrateFunction } from './hydration'
+import { version } from '.'
 
 export interface App<HostElement = any> {
+  version: string
   config: AppConfig
   use(plugin: Plugin, ...options: any[]): this
   mixin(mixin: ComponentOptions): this
@@ -126,6 +128,8 @@ export function createAppAPI<HostElement>(
       _container: null,
       _context: context,
 
+      version,
+
       get config() {
         return context.config
       },