descriptions-row2.mjs 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  1. import { defineComponent, inject, unref, openBlock, createElementBlock, Fragment, createElementVNode, renderList, createBlock, createVNode } from 'vue';
  2. import ElDescriptionsCell from './descriptions-cell.mjs';
  3. import { descriptionsKey } from './token.mjs';
  4. import { descriptionsRowProps } from './descriptions-row.mjs';
  5. import _export_sfc from '../../../_virtual/plugin-vue_export-helper.mjs';
  6. const _hoisted_1 = { key: 1 };
  7. const __default__ = defineComponent({
  8. name: "ElDescriptionsRow"
  9. });
  10. const _sfc_main = /* @__PURE__ */ defineComponent({
  11. ...__default__,
  12. props: descriptionsRowProps,
  13. setup(__props) {
  14. const descriptions = inject(descriptionsKey, {});
  15. return (_ctx, _cache) => {
  16. return unref(descriptions).direction === "vertical" ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
  17. createElementVNode("tr", null, [
  18. (openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.row, (cell, index) => {
  19. return openBlock(), createBlock(unref(ElDescriptionsCell), {
  20. key: `tr1-${index}`,
  21. cell,
  22. tag: "th",
  23. type: "label"
  24. }, null, 8, ["cell"]);
  25. }), 128))
  26. ]),
  27. createElementVNode("tr", null, [
  28. (openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.row, (cell, index) => {
  29. return openBlock(), createBlock(unref(ElDescriptionsCell), {
  30. key: `tr2-${index}`,
  31. cell,
  32. tag: "td",
  33. type: "content"
  34. }, null, 8, ["cell"]);
  35. }), 128))
  36. ])
  37. ], 64)) : (openBlock(), createElementBlock("tr", _hoisted_1, [
  38. (openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.row, (cell, index) => {
  39. return openBlock(), createElementBlock(Fragment, {
  40. key: `tr3-${index}`
  41. }, [
  42. unref(descriptions).border ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
  43. createVNode(unref(ElDescriptionsCell), {
  44. cell,
  45. tag: "td",
  46. type: "label"
  47. }, null, 8, ["cell"]),
  48. createVNode(unref(ElDescriptionsCell), {
  49. cell,
  50. tag: "td",
  51. type: "content"
  52. }, null, 8, ["cell"])
  53. ], 64)) : (openBlock(), createBlock(unref(ElDescriptionsCell), {
  54. key: 1,
  55. cell,
  56. tag: "td",
  57. type: "both"
  58. }, null, 8, ["cell"]))
  59. ], 64);
  60. }), 128))
  61. ]));
  62. };
  63. }
  64. });
  65. var ElDescriptionsRow = /* @__PURE__ */ _export_sfc(_sfc_main, [["__file", "/home/runner/work/element-plus/element-plus/packages/components/descriptions/src/descriptions-row.vue"]]);
  66. export { ElDescriptionsRow as default };
  67. //# sourceMappingURL=descriptions-row2.mjs.map