2019-01-12 03:33:27 +00:00
|
|
|
import { cloneElement } from '../_util/vnode';
|
2020-07-01 16:24:44 +00:00
|
|
|
import { flattenChildren } from '../_util/props-util';
|
|
|
|
|
|
|
|
const InputElement = (_, { attrs, slots }) => {
|
|
|
|
const children = flattenChildren(slots.default?.())[0];
|
|
|
|
return cloneElement(children, { ...attrs });
|
2019-01-12 03:33:27 +00:00
|
|
|
};
|
2020-07-01 16:24:44 +00:00
|
|
|
InputElement.inheritAttrs = false;
|
|
|
|
export default InputElement;
|