Evan You 11 лет назад
Родитель
Сommit
7d882a9e71
1 измененных файлов с 12 добавлено и 0 удалено
  1. 12 0
      src/api/dom.js

+ 12 - 0
src/api/dom.js

@@ -1,6 +1,18 @@
 var _ = require('../util')
 var transition = require('../transition')
 
+/**
+ * Convenience on-instance nextTick. The callback is
+ * auto-bound to the instance, and this avoids component
+ * modules having to rely on the global Vue.
+ *
+ * @param {Function} fn
+ */
+
+exports.$nextTick = function (fn) {
+  _.nextTick(fn, this)
+}
+
 /**
  * Append instance to target
  *