fix: remove warning

This commit is contained in:
tanjinzhou 2020-03-31 15:11:55 +08:00
parent 5533c5a879
commit 5c3d7329e1

View File

@ -63,11 +63,11 @@ export function cloneElement(n, nodeProps = {}, deep) {
return null;
}
const node = cloneVNode(ele, deep);
// 函数式组件不支持clone https://github.com/vueComponent/ant-design-vue/pull/1947
warning(
!(node.fnOptions && node.fnOptions.functional),
`can not use cloneElement for functional component (${node.tag})`,
);
// // 函数式组件不支持clone https://github.com/vueComponent/ant-design-vue/pull/1947
// warning(
// !(node.fnOptions && node.fnOptions.functional),
// `can not use cloneElement for functional component (${node.fnOptions && node.fnOptions.name})`,
// );
const { props = {}, key, on = {}, children, directives = [] } = nodeProps;
const data = node.data || {};
let cls = {};