2026-03-23 17:20:54 +08:00
|
|
|
import{cz as q,cA as Q,cB as Y,_ as d,m as Z,aE as k,r as ee,s as te,P as B,y as le,cC as ne,j as N,aJ as X,G as oe,aK as ie}from"./bootstrap-DmcuvVZS.js";import{j as i,aE as ae,b9 as O,I as se,m as V,aV as re,aW as ce,b4 as de,bs as F,aa as pe}from"../jse/index-index-B6J4axeY.js";function I(e){return e!=null}const T=e=>{const{itemPrefixCls:t,component:l,span:o,labelStyle:n,contentStyle:a,bordered:c,label:r,content:s,colon:u}=e,p=l;return c?i(p,{class:[{[`${t}-item-label`]:I(r),[`${t}-item-content`]:I(s)}],colSpan:o},{default:()=>[I(r)&&i("span",{style:n},[r]),I(s)&&i("span",{style:a},[s])]}):i(p,{class:[`${t}-item`],colSpan:o},{default:()=>[i("div",{class:`${t}-item-container`},[(r||r===0)&&i("span",{class:[`${t}-item-label`,{[`${t}-item-no-colon`]:!u}],style:n},[r]),(s||s===0)&&i("span",{class:`${t}-item-content`,style:a},[s])])]})},ue=e=>{const t=(u,p,L)=>{let{colon:m,prefixCls:x,bordered:f}=p,{component:y,type:w,showLabel:P,showContent:M,labelStyle:g,contentStyle:S}=L;return u.map((b,h)=>{var $,v;const j=b.props||{},{prefixCls:z=x,span:A=1,labelStyle:R=j["label-style"],contentStyle:H=j["content-style"],label:W=(v=($=b.children)===null||$===void 0?void 0:$.label)===null||v===void 0?void 0:v.call($)}=j,G=q(b),E=Q(b),_=Y(b),{key:D}=b;return typeof y=="string"?i(T,{key:`${w}-${String(D)||h}`,class:E,style:_,labelStyle:d(d({},g),R),contentStyle:d(d({},S),H),span:A,colon:m,component:y,itemPrefixCls:z,bordered:f,label:P?W:null,content:M?G:null},null):[i(T,{key:`label-${String(D)||h}`,class:E,style:d(d(d({},g),_),R),span:1,colon:m,component:y[0],itemPrefixCls:z,bordered:f,label:W},null),i(T,{key:`content-${String(D)||h}`,class:E,style:d(d(d({},S),_),H),span:A*2-1,component:y[1],itemPrefixCls:z,bordered:f,content:G},null)]})},{prefixCls:l,vertical:o,row:n,index:a,bordered:c}=e,{labelStyle:r,contentStyle:s}=ae(K,{labelStyle:O({}),contentStyle:O({})});return o?i(se,null,[i("tr",{key:`label-${a}`,class:`${l}-row`},[t(n,e,{component:"th",type:"label",showLabel:!0,labelStyle:r.value,contentStyle:s.value})]),i("tr",{key:`content-${a}`,class:`${l}-row`},[t(n,e,{component:"td",type:"content",showContent:!0,labelStyle:r.value,contentStyle:s.value})])]):i("tr",{key:a,class:`${l}-row`},[t(n,e,{component:c?["th","td"]:"td",type:"item",showLabel:!0,showContent:!0,labelStyle:r.value,contentStyle:s.value})])},me=e=>{const{componentCls:t,descriptionsSmallPadding:l,descriptionsDefaultPadding:o,descriptionsMiddlePadding:n,descriptionsBg:a}=e;return{[`&${t}-bordered`]:{[`${t}-view`]:{border:`${e.lineWidth}px ${e.lineType} ${e.colorSplit}`,"> table":{tableLayout:"auto",borderCollapse:"collapse"}},[`${t}-item-label, ${t}-item-content`]:{padding:o,borderInlineEnd:`${e.lineWidth}px ${e.lineType} ${e.colorSplit}`,"&:last-child":{borderInlineEnd:"none"}},[`${t}-item-label`]:{backgroundColor:a,"&::after":{display:"none"}},[`${t}-row`]:{borderBottom:`${e.lineWidth}px ${e.lineType} ${e.colorSplit}`,"&:last-child":{borderBottom:"none"}},[`&${t}-middle`]:{[`${t}-item-label, ${t}-item-content`]:{padding:n}},[`&${t}-small`]:{[`${t}-item-label, ${t}-item-content`]:{padding:l}}}}},be=e=>{const{componentCls:t,descriptionsExtraColor:l,descriptionItemPaddingBottom:o,descriptionsItemLabelColonMarginRight:n,descriptionsItemLabelColonMarginLeft:a,descriptionsTitleMarginBottom:c}=e;return{[t]:d(d(d({},ee(e)),me(e)),{"&-rtl":{direction:"rtl"},[`${t}-header`]:{display:"flex",alignItems:"center",marginBottom:c},[`${t}-title`]:d(d({},te),{flex:"auto",color:e.colorText,fontWeight:e.fontWeightStrong,fontSize:e.fontSizeLG,lineHeight:e.lineHeightLG}),[`${t}-extra`]:{marginInlineStart:"auto",color:l,fontSize:e.fontSize},[`${t}-view`]:{width:"100%",borderRadius:e.borderRadiusLG,table:{width:"100%",tableLayout:"fixed"}},[`${t}-row`]:{"> th, > td":{paddingBottom:o},"&:last-child":{borderBottom:"none"}},[`${t}-item-label`]:{color:e.colorText,fontWeight:"normal",fontSize:e.fontSize,lineHeight:e.lineHeight,textAlign:"start","&::after":{content:'":"',position:"relative",top:-.5,marginInline:`${a}px ${n}px`},[`&${t}-item-no-colon::after`]:{content:'""'}},[`${t}-item-no-label`]:{"&:
|