k5web/assets/index.d0865e71.js
2024-05-01 10:26:32 +08:00

14 lines
3.5 KiB
JavaScript

import{d as J,c as t,aI as a,aU as M}from"./arco.93f0afda.js";import{z as R,y as u,V as X,W as Z,F as U}from"./index.006cd607.js";import{L as k}from"./index.f5d63095.js";/**
* tdesign v1.9.4
* (c) 2024 tdesign
* @license MIT
*/var q={actions:{type:[String,Function]},avatar:{type:[String,Function]},bordered:{type:Boolean,default:!0},content:{type:[String,Function]},cover:{type:[String,Function]},default:{type:[String,Function]},description:{type:[String,Function]},footer:{type:[String,Function]},header:{type:[String,Function]},headerBordered:Boolean,hoverShadow:Boolean,loading:{type:[Boolean,Function],default:!1},loadingProps:{type:Object},shadow:Boolean,size:{type:String,default:"medium",validator:function(e){return e?["medium","small"].includes(e):!0}},status:{type:String,default:""},subtitle:{type:[String,Function]},theme:{type:String,default:"normal",validator:function(e){return e?["normal","poster1","poster2"].includes(e):!0}},title:{type:[String,Function]}};/**
* tdesign v1.9.4
* (c) 2024 tdesign
* @license MIT
*/function G(i){return typeof i=="function"||Object.prototype.toString.call(i)==="[object Object]"&&!M(i)}var K=J({name:"TCard",props:q,setup:function(e,y){var o=y.slots,n=R(),l=u("card"),w=X(),b=w.SIZE,p=t(function(){var r=[l.value];return e.size==="small"&&r.push("".concat(b.value[e.size])),e.bordered&&r.push("".concat(l.value,"--bordered")),e.shadow&&r.push("".concat(l.value,"--shadow")),e.hoverShadow&&r.push("".concat(l.value,"--shadow-hover")),r}),d=t(function(){var r=["".concat(l.value,"__header")];return e.headerBordered?r.concat("".concat(l.value,"__title--bordered")):["".concat(l.value,"__header")]}),F=u("card__header-wrapper"),N=u("card__avatar"),B=u("card__title"),T=u("card__subtitle"),O=u("card__description"),c=u("card__actions"),P=u("card__body"),j=u("card__cover"),x=u("card__footer"),z=u("card__footer-wrapper"),v=t(function(){return e.theme==="poster2"}),f=t(function(){return e.title||o.title}),h=t(function(){return e.header||o.header}),_=t(function(){return e.subtitle||o.subtitle}),C=t(function(){return e.avatar||o.avatar}),m=t(function(){return e.description||o.description}),S=t(function(){return e.status||o.status}),s=t(function(){return e.actions||o.actions}),A=t(function(){return e.footer||o.footer}),E=t(function(){return e.cover||o.cover}),H=t(function(){return e.loading||o.loading}),I=t(function(){return e.content||o.content||e.default||o.default}),L=t(function(){return h.value||f.value||_.value||m.value||C.value||S.value&&v.value||s.value&&!v.value}),V=t(function(){return A.value||s.value&&v.value}),W=function(){return h.value?a("div",{class:d.value},[n("header")]):a("div",{class:d.value},[a("div",{class:F.value},[C.value&&a("div",{class:N.value},[n("avatar")]),a("div",null,[f.value&&a("div",{class:B.value},[n("title")]),_.value&&a("div",{class:T.value},[n("subtitle")]),m.value&&a("p",{class:O.value},[n("description")])])]),s.value&&!v.value&&a("div",{class:c.value},[n("actions")]),S.value&&a("div",{class:c.value},[n("status")])])},D=function(){var g=Z(e.cover);return a("div",{class:j.value},[g?a("img",{src:e.cover},null):n("cover")])};return function(){var r=a("div",{class:p.value},[L.value?W():null,E.value?D():null,I.value&&a("div",{class:P.value},[n("default")||n("content")]),V.value&&a("div",{class:x.value},[a("div",{class:z.value},[n("footer")]),s.value&&v.value&&a("div",{class:c.value},[n("actions")])])]);return H.value?n("loading")||a(k,e.loadingProps,G(r)?r:{default:function(){return[r]}}):r}}});/**
* tdesign v1.9.4
* (c) 2024 tdesign
* @license MIT
*/var ee=U(K);export{ee as C};