@@ -119,7 +119,7 @@ type Vue struct {
119
119
// immdediate Boolean optional
120
120
// Watch an expression on the Vue instance for changes.
121
121
// The expression can be a single keypath or actual expressions:
122
- Watch func (
122
+ WatchEx func (
123
123
expression string ,
124
124
callback func (newVal , oldVal * js.Object ),
125
125
deepWatch bool ,
@@ -316,6 +316,13 @@ type Vue struct {
316
316
// vm.$log() // logs entire ViewModel data
317
317
// vm.$log('item') // logs vm.item
318
318
Log func (keypath ... interface {}) `js:"$log"`
319
+
320
+ // Defer the callback to be executed after the next DOM update cycle.
321
+ // Use it immediately after you’ve changed some data to
322
+ // wait for the DOM update. This is the same as the global
323
+ // Vue.nextTick, except that the callback’s this context is
324
+ // automatically bound to the instance calling this method.
325
+ NextTick func (cb func ()) `js:"$nextTick"`
319
326
}
320
327
321
328
// New creates a VueJS Instance to apply bidings between `structPtr` and
@@ -377,7 +384,7 @@ func GetVM(structPtr interface{}) *Vue {
377
384
}
378
385
379
386
// WatchEx using a simpler form to do Vue.$watch
380
- func (v * Vue ) WatchEx (expression string , callback func (newVal * js.Object )) (unwatcher func ()) {
387
+ func (v * Vue ) Watch (expression string , callback func (newVal * js.Object )) (unwatcher func ()) {
381
388
obj := v .Call ("$watch" , expression , callback )
382
389
return func () {
383
390
obj .Invoke ()
0 commit comments