We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a21f045 commit b7ee573Copy full SHA for b7ee573
option.go
@@ -199,11 +199,11 @@ func (c *Option) SetDataWithMethods(structPtr interface{}) *Option {
199
200
// AddMethod adds new method `name` to VueJS intance or component
201
// using mixins thus will never conflict with Option.SetDataWithMethods
202
-func (o *Option) AddMethod(name string, fn func(vm *ViewModel)) *Option {
+func (o *Option) AddMethod(name string, fn func(vm *ViewModel, args []*js.Object)) *Option {
203
return o.addMixin("methods", js.M{
204
name: js.MakeFunc(func(this *js.Object, arguments []*js.Object) interface{} {
205
vm := newViewModel(this)
206
- fn(vm)
+ fn(vm, arguments)
207
return nil
208
}),
209
})
0 commit comments