mirror of
https://gitee.com/ant-design-vue/ant-design-vue.git
synced 2024-12-05 05:29:01 +08:00
19 lines
488 B
JavaScript
19 lines
488 B
JavaScript
export function antRef (Vue) {
|
|
return Vue.directive('ant-ref', {
|
|
bind: function (el, binding, vnode) {
|
|
binding.value(vnode.componentInstance ? vnode.componentInstance : vnode.elm)
|
|
},
|
|
update: function (el, binding, vnode) {
|
|
binding.value(vnode.componentInstance ? vnode.componentInstance : vnode.elm)
|
|
},
|
|
unbind: function (el, binding, vnode) {
|
|
binding.value(null)
|
|
},
|
|
})
|
|
}
|
|
export default {
|
|
install: (Vue, options) => {
|
|
antRef(Vue)
|
|
},
|
|
}
|