group-item.mjs 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. import { defineComponent, openBlock, createElementBlock, normalizeClass, normalizeStyle, toDisplayString, createElementVNode } from 'vue';
  2. import '../../../hooks/index.mjs';
  3. import _export_sfc from '../../../_virtual/plugin-vue_export-helper.mjs';
  4. import { useNamespace } from '../../../hooks/use-namespace/index.mjs';
  5. const _sfc_main = defineComponent({
  6. props: {
  7. item: {
  8. type: Object,
  9. required: true
  10. },
  11. style: Object,
  12. height: Number
  13. },
  14. setup() {
  15. const ns = useNamespace("select");
  16. return {
  17. ns
  18. };
  19. }
  20. });
  21. function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
  22. return _ctx.item.isTitle ? (openBlock(), createElementBlock("div", {
  23. key: 0,
  24. class: normalizeClass(_ctx.ns.be("group", "title")),
  25. style: normalizeStyle([_ctx.style, { lineHeight: `${_ctx.height}px` }])
  26. }, toDisplayString(_ctx.item.label), 7)) : (openBlock(), createElementBlock("div", {
  27. key: 1,
  28. class: normalizeClass(_ctx.ns.be("group", "split")),
  29. style: normalizeStyle(_ctx.style)
  30. }, [
  31. createElementVNode("span", {
  32. class: normalizeClass(_ctx.ns.be("group", "split-dash")),
  33. style: normalizeStyle({ top: `${_ctx.height / 2}px` })
  34. }, null, 6)
  35. ], 6));
  36. }
  37. var GroupItem = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render], ["__file", "/home/runner/work/element-plus/element-plus/packages/components/select-v2/src/group-item.vue"]]);
  38. export { GroupItem as default };
  39. //# sourceMappingURL=group-item.mjs.map