methods
-
Type:
Object -
Details:
Methods to be mixed into the Vue instance. You can access these methods directly on the VM instance, or use them in directive expressions. All methods will have their
thiscontext automatically bound to the Vue instance. -
Example:
var vm = new Vue({ data: { a: 1 }, methods: { plus: function () { this.a++ } } }) vm.plus() vm.a // 2 -
See also: Methods and Event Handling
Please login to continue.