1 |
- import{t as L,u as D,z as c,v as y,O as o,N as B,ae as I,d as V,af as z,c as n,a1 as u,a5 as f,D as N}from"./index.3b0304e1.js";const[_,t]=L("cell"),q={tag:D("div"),icon:String,size:String,title:c,value:c,label:c,center:Boolean,isLink:Boolean,border:y,required:Boolean,iconPrefix:String,valueClass:o,labelClass:o,titleClass:o,titleStyle:null,arrowDirection:String,clickable:{type:Boolean,default:null}},R=B({},q,I);var O=V({name:_,props:R,setup(e,{slots:a}){const v=z(),g=()=>{if(a.label||u(e.label))return n("div",{class:[t("label"),e.labelClass]},[a.label?a.label():e.label])},h=()=>{if(a.title||u(e.title))return n("div",{class:[t("title"),e.titleClass],style:e.titleStyle},[a.title?a.title():n("span",null,[e.title]),g()])},m=()=>{const l=a.value||a.default;if(l||u(e.value))return n("div",{class:[t("value"),e.valueClass]},[l?l():n("span",null,[e.value])])},w=()=>{if(a.icon)return a.icon();if(e.icon)return n(f,{name:e.icon,class:t("left-icon"),classPrefix:e.iconPrefix},null)},C=()=>{if(a["right-icon"])return a["right-icon"]();if(e.isLink){const l=e.arrowDirection&&e.arrowDirection!=="right"?`arrow-${e.arrowDirection}`:"arrow";return n(f,{name:l,class:t("right-icon")},null)}};return()=>{var l;const{tag:s,size:i,center:P,border:k,isLink:S,required:x}=e,r=(l=e.clickable)!=null?l:S,d={center:P,required:x,clickable:r,borderless:!k};return i&&(d[i]=!!i),n(s,{class:t(d),role:r?"button":void 0,tabindex:r?0:void 0,onClick:v},{default:()=>{var b;return[w(),h(),m(),C(),(b=a.extra)==null?void 0:b.call(a)]}})}}});const $=N(O);export{$ as C,q as c};
|