Item.js 561 B

123456789101112131415161718
  1. import { cloneVNode } from 'vue';
  2. import { flattenChildren } from '../_util/props-util';
  3. var Item = function Item(_ref, _ref2) {
  4. var _slots$default;
  5. var setRef = _ref.setRef;
  6. var slots = _ref2.slots;
  7. var children = flattenChildren((_slots$default = slots.default) === null || _slots$default === void 0 ? void 0 : _slots$default.call(slots));
  8. return children && children.length ? cloneVNode(children[0], {
  9. ref: setRef
  10. }) : children;
  11. };
  12. Item.props = {
  13. setRef: {
  14. type: Function,
  15. default: function _default() {}
  16. }
  17. };
  18. export default Item;