index-3a8cf159.js 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. import { a as useScopeId } from "./use-scope-id-0b5b8615.js";
  2. import { c as createNamespace, t as truthProp, B as BORDER_TOP_BOTTOM, w as withInstall } from "./index-487cde8c.js";
  3. import { d as defineComponent, c as createVNode, F as Fragment, m as mergeProps } from "./index-5e4623ce.js";
  4. const [name, bem] = createNamespace("cell-group");
  5. const cellGroupProps = {
  6. title: String,
  7. inset: Boolean,
  8. border: truthProp
  9. };
  10. var stdin_default = defineComponent({
  11. name,
  12. inheritAttrs: false,
  13. props: cellGroupProps,
  14. setup(props, {
  15. slots,
  16. attrs
  17. }) {
  18. const renderGroup = () => {
  19. var _a;
  20. return createVNode("div", mergeProps({
  21. "class": [bem({
  22. inset: props.inset
  23. }), {
  24. [BORDER_TOP_BOTTOM]: props.border && !props.inset
  25. }]
  26. }, attrs, useScopeId()), [(_a = slots.default) == null ? void 0 : _a.call(slots)]);
  27. };
  28. const renderTitle = () => createVNode("div", {
  29. "class": bem("title", {
  30. inset: props.inset
  31. })
  32. }, [slots.title ? slots.title() : props.title]);
  33. return () => {
  34. if (props.title || slots.title) {
  35. return createVNode(Fragment, null, [renderTitle(), renderGroup()]);
  36. }
  37. return renderGroup();
  38. };
  39. }
  40. });
  41. const CellGroup = withInstall(stdin_default);
  42. const index = "";
  43. export {
  44. CellGroup as C
  45. };