mirror of
https://gitee.com/ant-design-vue/ant-design-vue.git
synced 2024-12-15 09:21:25 +08:00
15 lines
318 B
JavaScript
15 lines
318 B
JavaScript
const createRef = fn => {
|
|
return {
|
|
onVnodeBeforeMount: vnode => {
|
|
fn(vnode.component || vnode.el, vnode.key);
|
|
},
|
|
onVnodeUpdated: vnode => {
|
|
fn(vnode.component || vnode.el, vnode.key);
|
|
},
|
|
onVnodeUnmounted: vnode => {
|
|
fn(null, vnode.key);
|
|
},
|
|
};
|
|
};
|
|
export default createRef;
|