@wetspace/pro-components
Version:
::: tip 基本介绍
70 lines (69 loc) • 1.8 kB
JavaScript
import { defineComponent as u, useSlots as _, openBlock as g, createBlock as h, unref as e, normalizeClass as n, createSlots as v, withCtx as t, renderSlot as r, createVNode as l, createTextVNode as c, toDisplayString as i, createElementVNode as f } from "vue";
import { useNamespace as C, ElCard as E, ElText as d, ElImage as N } from "element-plus";
const k = /* @__PURE__ */ u({
__name: "card",
props: {
info: {
type: Object
}
},
setup(m) {
const s = C("pro-list__card"), p = _(), o = m;
return (a, S) => (g(), h(e(E), {
shadow: "never",
class: n(e(s).b())
}, v({
header: t(() => [
r(a.$slots, "header", {
info: o.info
}, () => [
l(e(d), { tag: "b" }, {
default: t(() => [
c(i(o.info.name), 1)
]),
_: 1
})
])
]),
default: t(() => [
r(a.$slots, "content", {
info: o.info
}, () => [
f("div", {
class: n(e(s).m("content"))
}, [
l(e(N), {
fit: "cover",
class: n(e(s).m("content-image")),
src: o.info.image
}, null, 8, ["class", "src"]),
f("div", {
class: n(e(s).m("content-text"))
}, [
l(e(d), null, {
default: t(() => [
c(i(o.info.desc), 1)
]),
_: 1
})
], 2)
], 2)
])
]),
_: 2
}, [
e(p).footer ? {
name: "footer",
fn: t(() => [
r(a.$slots, "footer", {
info: o.info
})
]),
key: "0"
} : void 0
]), 1032, ["class"]));
}
});
export {
k as default
};