@@ -42,7 +42,7 @@ func Data(data interface{}) Option {
42
42
// Method is the method option for components.
43
43
// The given name and function is registered as a method for the component.
44
44
// The function is required to accept context and allows optional arguments.
45
- // For example: func(ctx vue.Context) or func(ctx vue.Context, a1 Arg1, ..., ak ArgK)
45
+ // For example: func(vctx vue.Context) or func(vctx vue.Context, a1 Arg1, ..., ak ArgK)
46
46
func Method (name string , function interface {}) Option {
47
47
return func (comp * Comp ) {
48
48
comp .methods [name ] = reflect .ValueOf (function )
@@ -52,7 +52,7 @@ func Method(name string, function interface{}) Option {
52
52
// Methods is the methods option for components.
53
53
// The given functions are registered as methods for the component.
54
54
// The functions are required to accept context and allows optional arguments.
55
- // For example: func(ctx vue.Context) or func(ctx vue.Context, a1 Arg1, ..., ak ArgK)
55
+ // For example: func(vctx vue.Context) or func(vctx vue.Context, a1 Arg1, ..., ak ArgK)
56
56
func Methods (functions ... interface {}) Option {
57
57
return func (comp * Comp ) {
58
58
for _ , function := range functions {
@@ -66,7 +66,7 @@ func Methods(functions ...interface{}) Option {
66
66
// Computed is the computed option for components.
67
67
// The given name and function is registered as a computed property for the component.
68
68
// The function is required to accept context and return a value.
69
- // For example: func(ctx vue.Context) Type
69
+ // For example: func(vctx vue.Context) Type
70
70
func Computed (name string , function interface {}) Option {
71
71
return func (comp * Comp ) {
72
72
fn := reflect .ValueOf (function )
@@ -77,7 +77,7 @@ func Computed(name string, function interface{}) Option {
77
77
// Computeds is the computeds option for components.
78
78
// The given functions are registered as computed properties for the component.
79
79
// The functions are required to accept context and return a value.
80
- // For example: func(ctx vue.Context) Type
80
+ // For example: func(vctx vue.Context) Type
81
81
func Computeds (functions ... interface {}) Option {
82
82
return func (comp * Comp ) {
83
83
for _ , function := range functions {
@@ -92,7 +92,7 @@ func Computeds(functions ...interface{}) Option {
92
92
// The given function is registered as a watcher for the data field.
93
93
// All data fields are watchable, e.g. data, props and computed.
94
94
// The function is required to accept context and both the new and old values.
95
- // For example: func(ctx vue.Context, newVal, oldVal Type)
95
+ // For example: func(vctx vue.Context, newVal, oldVal Type)
96
96
func Watch (field string , function interface {}) Option {
97
97
return func (comp * Comp ) {
98
98
fn := reflect .ValueOf (function )
0 commit comments