🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
Book a DemoInstallSign in
Socket

vue-ref

Package Overview
Dependencies
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

vue-ref - npm Package Compare versions

Comparing version

to
1.0.2

28

index.js

@@ -1,17 +0,19 @@

export default {
install: (Vue, options = {}) => {
module.exports = {
install: function install(Vue) {
var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
Vue.directive(options.name || 'ref', {
bind: function (el, binding, vnode) {
binding.value(vnode.componentInstance || el, vnode.key)
bind: function bind(el, binding, vnode) {
binding.value(vnode.componentInstance || el, vnode.key);
},
update: function (el, binding, vnode) {
binding.value(vnode.componentInstance || el, vnode.key)
update: function update(el, binding, vnode) {
binding.value(vnode.componentInstance || el, vnode.key);
},
unbind: function (el, binding, vnode) {
if(!el.parentNode && !el.parentElement) {
binding.value(null, vnode.key)
unbind: function unbind(el, binding, vnode) {
if (!el.parentNode && !el.parentElement) {
binding.value(null, vnode.key);
}
},
})
},
}
}
});
}
};
{
"name": "vue-ref",
"version": "1.0.1",
"version": "1.0.2",
"title": "Vue Ref",

@@ -39,2 +39,2 @@ "description": "use the callback to get a reference like react",

}
}
}

@@ -8,3 +8,3 @@ # vue-ref

```
```js
import ref from 'vue-ref'

@@ -14,3 +14,3 @@ Vue.use(ref)

```
```html
<!-- vm.dom will be the DOM node -->

@@ -17,0 +17,0 @@ <p v-ref="c => this.dom = c">hello</p>