Comparing version
13
index.js
@@ -1,3 +0,8 @@ | ||
module.exports = { | ||
install: function install(Vue) { | ||
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { | ||
value: true | ||
}); | ||
exports.default = { | ||
install: function install(Vue) { | ||
var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; | ||
@@ -13,5 +18,5 @@ | ||
unbind: function unbind(el, binding, vnode) { | ||
if (!el.parentNode && !el.parentElement) { | ||
Vue.nextTick(function(){ | ||
binding.value(null, vnode.key); | ||
} | ||
}) | ||
} | ||
@@ -18,0 +23,0 @@ }); |
{ | ||
"name": "vue-ref", | ||
"version": "1.0.2", | ||
"version": "1.0.3", | ||
"title": "Vue Ref", | ||
@@ -5,0 +5,0 @@ "description": "use the callback to get a reference like react", |
# vue-ref | ||
You can use the callback to get a reference like react. | ||
[](https://npmjs.org/package/vue-ref) [](https://npmjs.org/package/vue-ref) | ||
```bash | ||
@@ -28,2 +30,2 @@ $ npm install vue-ref --save | ||
### | ||
In this callback function, you should not change any reactive data. Otherwise the `render` will enter an infinite loop. | ||
In this callback function, you should not change any reactive data. Otherwise the `render` will enter an infinite loop. |
3528
8.49%21
23.53%31
10.71%