Vue.directive()

Vue.directive( id, [definition] ) Arguments: {String} id {Function | Object} [definition] Usage: Register or retrieve a global directive. // register Vue.directive('my-directive', { bind: function () {}, update: function () {}, unbind: function () {} }) // register (simple function directive) Vue.directive('my-directive', function () { // this will be called as `update` }) // getter, return the directive definition if registered var myDirective = Vue.directive('my-directive') See

Vue.delete()

Vue.delete( object, key ) Arguments: {Object} object {String} key Usage: Delete a property on an object. If the object is reactive, ensure the deletion triggers view updates. This is primarily used to get around the limitation that Vue cannot detect property deletions, but you should rarely need to use it. See also: Reactivity in Depth

Vue.component()

Vue.component( id, [definition] ) Arguments: {String} id {Function | Object} [definition] Usage: Register or retrieve a global component. // register an extended constructor Vue.component('my-component', Vue.extend({ /* ... */ })) // register an options object (automatically call Vue.extend) Vue.component('my-component', { /* ... */ }) // retrieve a registered component (always return constructor) var MyComponent = Vue.component('my-component') See also: Components.

vm.$watch()

vm.$watch( expOrFn, callback, [options] ) Arguments: {String | Function} expOrFn {Function} callback {Object} [options]{Boolean} deep {Boolean} immediate Returns: {Function} unwatch Usage: Watch an expression or a computed function on the Vue instance for changes. The callback gets called with the new value and the old value. The expression can be a single keypath or any valid binding expressions. Note: when mutating (rather than replacing) an Object or an Array, the old value will be

vm.$set()

vm.$set( keypath, value ) Arguments: {String} keypath {*} value Usage: Set a data value on the Vue instance given a valid keypath. In most cases you should prefer setting properties using plain object syntax, e.g. vm.a.b = 123. This method is only needed in two scenarios: When you have a keypath string and want to dynamically set the value using that keypath. When you want to set a property that doesn’t exist. If the path doesn’t exist it will be recursively created and made reactive. If

vm.$root

vm.$root Type: Vue instance Read only Details: The root Vue instance of the current component tree. If the current instance has no parents this value will be itself.

vm.$remove()

vm.$remove( [callback] ) Arguments: {Function} [callback] Returns: vm - the instance itself Usage: Remove the Vue instance’s DOM element or fragment from the DOM. This method will trigger transitions if present. The callback is fired after the transition has completed (or immediately if no transition has been triggered).

vm.$refs

vm.$refs Type: Object Read only Details: An object that holds child components that have v-ref registered. See also: Child Component Refs v-ref.

vm.$parent

vm.$parent Type: Vue instance Read only Details: The parent instance, if the current instance has one.

vm.$options

vm.$options Type: Object Read only Details: The instantiation options used for the current Vue instance. This is useful when you want to include custom properties in the options: new Vue({ customOption: 'foo', created: function () { console.log(this.$options.customOption) // -> 'foo' } })