Vue.use()

Vue.use( plugin, [options] ) Arguments: {Object | Function} plugin {Object} [options] Usage: Install a Vue.js plugin. If the plugin is an Object, it must expose an install method. If it is a function itself, it will be treated as the install method. The install method will be called with Vue as the argument. See also: Plugins.

Vue.transition()

Vue.transition( id, [hooks] ) Arguments: {String} id {Object} [hooks] Usage: Register or retrieve a global transition hooks object. // register Vue.transition('fade', { enter: function () {}, leave: function () {} }) // retrieve registered hooks var fadeTransition = Vue.transition('fade') See also: Transitions.

watch

watch Type: Object Details: An object where keys are expressions to watch and values are the corresponding callbacks. The value can also be a string of a method name, or an Object that contains additional options. The Vue instance will call $watch() for each entry in the object at instantiation. Example: var vm = new Vue({ data: { a: 1 }, watch: { 'a': function (val, oldVal) { console.log('new: %s, old: %s', val, oldVal) }, // string method name 'b': 'someMe

Vue.set()

Vue.set( object, key, value ) Arguments: {Object} object {String} key {*} value Returns: the set value. Usage: Set a property on an object. If the object is reactive, ensure the property is created as a reactive property and trigger view updates. This is primarily used to get around the limitation that Vue cannot detect property additions. See also: Reactivity in Depth

Vue.partial()

Vue.partial( id, [partial] ) Arguments: {String} id {String} [partial] Usage: Register or retrieve a global template partial string. // register Vue.partial('my-partial', '<div>Hi</div>') // retrieve registered partial var myPartial = Vue.partial('my-partial') See also: Special Elements - <partial>.

Vue.mixin()

Vue.mixin( mixin ) Arguments: {Object} mixin Usage: Apply a mixin globally, which affects every Vue instance created afterwards. This can be used by plugin authors to inject custom behavior into components. Not recommended in application code. See also: Global Mixins

Vue.elementDirective()

Vue.elementDirective( id, [definition] ) Arguments: {String} id {Object} [definition] Usage: Register or retrieve a global element directive. // register Vue.elementDirective('my-element', { bind: function () {}, // element directives do not use `update` unbind: function () {} }) // getter, return the directive definition if registered var myDirective = Vue.elementDirective('my-element') See also: Element Directives

Vue.extend()

Vue.extend( options ) Arguments: {Object} options Usage: Create a “subclass” of the base Vue constructor. The argument should be an object containing component options. The special cases to note here are el and data options - they must be functions when used with Vue.extend(). <div id="mount-point"></div> // create reusable constructor var Profile = Vue.extend({ template: '<p>{{firstName}} {{lastName}} aka {{alias}}</p>' }) // create an instance of Profile var profi

Vue.filter()

Vue.filter( id, [definition] ) Arguments: {String} id {Function | Object} [definition] Usage: Register or retrieve a global filter. // register Vue.filter('my-filter', function (value) { // return processed value }) // two way filter Vue.filter('my-filter', { read: function () {}, write: function () {} }) // getter, return the filter if registered var myFilter = Vue.filter('my-filter') See also: Custom Filter

Vue.nextTick()

Vue.nextTick( callback ) Arguments: {Function} callback Usage: Defer the callback to be executed after the next DOM update cycle. Use it immediately after you’ve changed some data to wait for the DOM update. // modify data vm.msg = 'Hello' // DOM not updated yet Vue.nextTick(function () { // DOM updated }) See also: Async Update Queue