fix: vnode 传递函数式组件事件

pull/1040/head
tangjinzhou 2019-05-26 12:13:30 +08:00
parent 00f104757c
commit 378241192e
1 changed files with 4 additions and 0 deletions

View File

@ -119,6 +119,10 @@ export function cloneElement(n, nodeProps = {}, deep) {
node.data.on = { ...(node.data.on || {}), ...on };
}
if (node.fnOptions && node.fnOptions.functional) {
node.data.on = { ...(node.data.on || {}), ...on };
}
if (key !== undefined) {
node.key = key;
node.data.key = key;