API

Global Config

Vue.config is an object containing Vue’s global configurations. You can modify its properties listed below before bootstrapping your application:

silent

optionMergeStrategies

devtools

errorHandler

warnHandler

New in 2.4.0+

ignoredElements

keyCodes

performance

New in 2.2.0+

productionTip

New in 2.2.0+

Global API

Vue.extend( options )

Vue.nextTick( [callback, context] )

Vue.set( target, key, value )

Vue.delete( target, key )

Vue.directive( id, [definition] )

Vue.filter( id, [definition] )

Vue.component( id, [definition] )

Vue.use( plugin )

Vue.mixin( mixin )

Vue.compile( template )

Vue.version

Options / Data

data

props

propsData

computed

methods

watch

Options / DOM

el

template

render

renderError

New in 2.2.0+

Options / Lifecycle Hooks

All lifecycle hooks automatically have their this context bound to the instance, so that you can access data, computed properties, and methods. This means you should not use an arrow function to define a lifecycle method (e.g. created: () => this.fetchTodos()). The reason is arrow functions bind the parent context, so this will not be the Vue instance as you expect and this.fetchTodos will be undefined.

beforeCreate

created

beforeMount

mounted

beforeUpdate

updated

activated

deactivated

beforeDestroy

destroyed

errorCaptured

New in 2.5.0+

Options / Assets

directives

filters

components

Options / Composition

parent

mixins

extends

provide / inject

New in 2.2.0+

Options / Misc

name

delimiters

functional

model

New in 2.2.0

inheritAttrs

New in 2.4.0+

comments

New in 2.4.0+

Instance Properties

vm.$data

vm.$props

New in 2.2.0+

vm.$el

vm.$options

vm.$parent

vm.$root

vm.$children

vm.$slots

vm.$scopedSlots

New in 2.1.0+

vm.$refs

vm.$isServer

vm.$attrs

vm.$listeners

Instance Methods / Data

vm.$watch( expOrFn, callback, [options] )

Note: when mutating (rather than replacing) an Object or an Array, the old value will be the same as new value because they reference the same Object/Array. Vue doesn’t keep a copy of the pre-mutate value.

vm.$set( target, key, value )

vm.$delete( target, key )

Instance Methods / Events

vm.$on( event, callback )

vm.$once( event, callback )

vm.$off( [event, callback] )

vm.$emit( event, […args] )

Instance Methods / Lifecycle

vm.$mount( [elementOrSelector] )

vm.$forceUpdate()

vm.$nextTick( [callback] )

vm.$destroy()

Directives

v-text

v-html

v-show

v-if

v-else

v-else-if

New in 2.1.0+

v-for

v-on

v-bind

v-model

v-pre

v-cloak

v-once

Special Attributes

key

ref

slot

slot-scope

New in 2.5.0+

scope replaced

Used to denote a <template> element as a scoped slot, which is replaced by slot-scope in 2.5.0+.

is

Built-In Components

component

transition

transition-group

keep-alive

slot

VNode Interface

Server-Side Rendering