card2.mjs 1.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. import { defineComponent, openBlock, createElementBlock, normalizeClass, unref, renderSlot, createTextVNode, toDisplayString, createCommentVNode, createElementVNode, normalizeStyle } from 'vue';
  2. import { cardProps } from './card.mjs';
  3. import _export_sfc from '../../../_virtual/plugin-vue_export-helper.mjs';
  4. import { useNamespace } from '../../../hooks/use-namespace/index.mjs';
  5. const __default__ = defineComponent({
  6. name: "ElCard"
  7. });
  8. const _sfc_main = /* @__PURE__ */ defineComponent({
  9. ...__default__,
  10. props: cardProps,
  11. setup(__props) {
  12. const ns = useNamespace("card");
  13. return (_ctx, _cache) => {
  14. return openBlock(), createElementBlock("div", {
  15. class: normalizeClass([unref(ns).b(), unref(ns).is(`${_ctx.shadow}-shadow`)])
  16. }, [
  17. _ctx.$slots.header || _ctx.header ? (openBlock(), createElementBlock("div", {
  18. key: 0,
  19. class: normalizeClass([unref(ns).e("header"), _ctx.headerClass])
  20. }, [
  21. renderSlot(_ctx.$slots, "header", {}, () => [
  22. createTextVNode(toDisplayString(_ctx.header), 1)
  23. ])
  24. ], 2)) : createCommentVNode("v-if", true),
  25. createElementVNode("div", {
  26. class: normalizeClass([unref(ns).e("body"), _ctx.bodyClass]),
  27. style: normalizeStyle(_ctx.bodyStyle)
  28. }, [
  29. renderSlot(_ctx.$slots, "default")
  30. ], 6),
  31. _ctx.$slots.footer || _ctx.footer ? (openBlock(), createElementBlock("div", {
  32. key: 1,
  33. class: normalizeClass([unref(ns).e("footer"), _ctx.footerClass])
  34. }, [
  35. renderSlot(_ctx.$slots, "footer", {}, () => [
  36. createTextVNode(toDisplayString(_ctx.footer), 1)
  37. ])
  38. ], 2)) : createCommentVNode("v-if", true)
  39. ], 2);
  40. };
  41. }
  42. });
  43. var Card = /* @__PURE__ */ _export_sfc(_sfc_main, [["__file", "card.vue"]]);
  44. export { Card as default };
  45. //# sourceMappingURL=card2.mjs.map