Skip to content

Commit

Permalink
feat(runtime-core): expose version on app instance
Browse files Browse the repository at this point in the history
close #1449
  • Loading branch information
yyx990803 committed Jun 26, 2020
1 parent bf84ac8 commit 056cac9
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions packages/runtime-core/src/apiCreateApp.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -126,6 +128,8 @@ export function createAppAPI<HostElement>(
_container: null,
_context: context,

version,

get config() {
return context.config
},
Expand Down

0 comments on commit 056cac9

Please sign in to comment.