Ohm-Management - Projektarbeit B-ME
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

index.js 2.6KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  1. import VSelect from './VSelect';
  2. import VOverflowBtn from '../VOverflowBtn';
  3. import VAutocomplete from '../VAutocomplete';
  4. import VCombobox from '../VCombobox';
  5. import rebuildSlots from '../../util/rebuildFunctionalSlots';
  6. import dedupeModelListeners from '../../util/dedupeModelListeners';
  7. import { deprecate } from '../../util/console';
  8. /* @vue/component */
  9. var wrapper = {
  10. functional: true,
  11. $_wrapperFor: VSelect,
  12. props: {
  13. // VAutoComplete
  14. /** @deprecated */
  15. autocomplete: Boolean,
  16. /** @deprecated */
  17. combobox: Boolean,
  18. multiple: Boolean,
  19. /** @deprecated */
  20. tags: Boolean,
  21. // VOverflowBtn
  22. /** @deprecated */
  23. editable: Boolean,
  24. /** @deprecated */
  25. overflow: Boolean,
  26. /** @deprecated */
  27. segmented: Boolean
  28. },
  29. render: function render(h, _ref) {
  30. var props = _ref.props,
  31. data = _ref.data,
  32. slots = _ref.slots,
  33. parent = _ref.parent;
  34. dedupeModelListeners(data);
  35. var children = rebuildSlots(slots(), h);
  36. if (props.autocomplete) {
  37. deprecate('<v-select autocomplete>', '<v-autocomplete>', wrapper, parent);
  38. }
  39. if (props.combobox) {
  40. deprecate('<v-select combobox>', '<v-combobox>', wrapper, parent);
  41. }
  42. if (props.tags) {
  43. deprecate('<v-select tags>', '<v-combobox multiple>', wrapper, parent);
  44. }
  45. if (props.overflow) {
  46. deprecate('<v-select overflow>', '<v-overflow-btn>', wrapper, parent);
  47. }
  48. if (props.segmented) {
  49. deprecate('<v-select segmented>', '<v-overflow-btn segmented>', wrapper, parent);
  50. }
  51. if (props.editable) {
  52. deprecate('<v-select editable>', '<v-overflow-btn editable>', wrapper, parent);
  53. }
  54. data.attrs = data.attrs || {};
  55. if (props.combobox || props.tags) {
  56. data.attrs.multiple = props.tags;
  57. return h(VCombobox, data, children);
  58. } else if (props.autocomplete) {
  59. data.attrs.multiple = props.multiple;
  60. return h(VAutocomplete, data, children);
  61. } else if (props.overflow || props.segmented || props.editable) {
  62. data.attrs.segmented = props.segmented;
  63. data.attrs.editable = props.editable;
  64. return h(VOverflowBtn, data, children);
  65. } else {
  66. data.attrs.multiple = props.multiple;
  67. return h(VSelect, data, children);
  68. }
  69. }
  70. };
  71. export { wrapper as VSelect };
  72. export default wrapper;
  73. //# sourceMappingURL=index.js.map