8000 add vm.$nextTick · sinabio/vue@7d882a9 · GitHub
[go: up one dir, main page]

8000
Skip to content

Commit 7d882a9

Browse files
committed
add vm.$nextTick
1 parent 2914926 commit 7d882a9

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

src/api/dom.js

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,18 @@
11
var _ = require('../util')
22
var transition = require('../transition')
33

4+
/**
5+
* Convenience on-instance nextTick. The callback is
6+
* auto-bound to the instance, and this avoids component
7+
* modules having to rely on the global Vue.
8+
*
9+
* @param {Function} fn
10+
*/
11+
12+
exports.$nextTick = function (fn) {
13+
_.nextTick(fn, this)
14+
}
15+
416
/**
517
* Append instance to target
618
*

0 commit comments

Comments
 (0)
0