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