1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374 |
- import{bE as j,bF as N,bG as H,bH as F,F as L,bI as K,bJ as U,bK as q,bL as G,bq as W,bM as Q,aP as X,aB as Y,bN as Z,bO as J,bP as ee,bQ as oe,bR as te,bS as se,b7 as re,bT as ae,z as _,bU as ne,B as ie,K as le,c as ce,a as de,bV as pe,bW as be,bX as he,bY as ge,bZ as me,b_ as ue,i as fe,f as ve,b$ as Se,c0 as ye,d as A,c1 as we,c2 as Ce,c3 as xe,c4 as Re,c5 as ze,c6 as Pe,c7 as Te,c8 as $e,c9 as Me,ca as Ee,cb as _e,a$ as Ae,cc as ke,cd as Be,ce as De,h as r,cf as Ve,cg as Ie,ch as Oe,ci as je,cj as Ne,aY as He,ck as Fe,cl as Le,cm as Ke,cn as Ue,aq as qe,co as Ge,cp as We,cq as Qe,cr as Xe,cs as Ye,ct as Ze,aG as Je,A as eo,cu as oo,cv as to,s as so,cw as ro,cx as ao,e as no,cy as io,cz as lo,cA as co,at as po,cB as bo,cC as ho,cD as go,cE as mo,as as uo,cF as fo,o as vo,M as So,b3 as yo,cG as wo,L as Co,cH as xo,r as Ro,cI as zo,b as Po,cJ as To,cK as $o,q as Mo,cL as Eo,cM as _o,cN as Ao,cO as ko,cP as Bo,cQ as Do,cR as Vo,cS as Io,cT as Oo,cU as jo,cV as No,cW as Ho,cX as Fo,cY as Lo,cZ as Ko,t as Uo,c_ as qo,c$ as Go,E as Wo,a8 as Qo,d0 as Xo,d1 as Yo,d2 as Zo,d3 as Jo,g as et,d4 as ot,d5 as tt,d6 as st,d7 as rt,d8 as at,d9 as nt,da as it,db as lt,dc as ct,dd as dt,de as pt,df as bt,D as ht,dg as gt,dh as mt,I as ut,bf as ft,di as vt,dj as St,dk as yt,w as wt,dl as Ct,C as xt,dm as Rt,dn as zt,dp as Pt,dq as Tt,R as c,Q as e,V as $t,W as R,S as D,au as Mt,av as Et,T as _t,X as I,a2 as E,Z as At,bi as kt,b6 as Bt,dr as Dt,ds as Vt}from"./index-0bdf4e54.js";import{g as It}from"./get-slot-1efb97e5.js";const Ot=()=>{},jt=Object.freeze(Object.defineProperty({__proto__:null,BaseTransition:j,BaseTransitionPropsValidators:N,Comment:H,EffectScope:F,Fragment:L,KeepAlive:K,ReactiveEffect:U,Static:q,Suspense:G,Teleport:W,Text:Q,Transition:X,TransitionGroup:Y,VueElement:Z,assertNumber:J,callWithAsyncErrorHandling:ee,callWithErrorHandling:oe,camelize:te,capitalize:se,cloneVNode:re,compatUtils:ae,compile:Ot,computed:_,createApp:ne,createBlock:ie,createCommentVNode:le,createElementBlock:ce,createElementVNode:de,createHydrationRenderer:pe,createPropsRestProxy:be,createRenderer:he,createSSRApp:ge,createSlots:me,createStaticVNode:ue,createTextVNode:fe,createVNode:ve,customRef:Se,defineAsyncComponent:ye,defineComponent:A,defineCustomElement:we,defineEmits:Ce,defineExpose:xe,defineModel:Re,defineOptions:ze,defineProps:Pe,defineSSRCustomElement:Te,defineSlots:$e,get devtools(){return Me},effect:Ee,effectScope:_e,getCurrentInstance:Ae,getCurrentScope:ke,getTransitionRawChildren:Be,guardReactiveProps:De,h:r,handleError:Ve,hasInjectionContext:Ie,hydrate:Oe,initCustomFormatter:je,initDirectivesForSSR:Ne,inject:He,isMemoSame:Fe,isProxy:Le,isReactive:Ke,isReadonly:Ue,isRef:qe,isRuntimeOnly:Ge,isShallow:We,isVNode:Qe,markRaw:Xe,mergeDefaults:Ye,mergeModels:Ze,mergeProps:Je,nextTick:eo,normalizeClass:oo,normalizeProps:to,normalizeStyle:so,onActivated:ro,onBeforeMount:ao,onBeforeUnmount:no,onBeforeUpdate:io,onDeactivated:lo,onErrorCaptured:co,onMounted:po,onRenderTracked:bo,onRenderTriggered:ho,onScopeDispose:go,onServerPrefetch:mo,onUnmounted:uo,onUpdated:fo,openBlock:vo,popScopeId:So,provide:yo,proxyRefs:wo,pushScopeId:Co,queuePostFlushCb:xo,reactive:Ro,readonly:zo,ref:Po,registerRuntimeCompiler:To,render:$o,renderList:Mo,renderSlot:Eo,resolveComponent:_o,resolveDirective:Ao,resolveDynamicComponent:ko,resolveFilter:Bo,resolveTransitionHooks:Do,setBlockTracking:Vo,setDevtoolsHook:Io,setTransitionHooks:Oo,shallowReactive:jo,shallowReadonly:No,shallowRef:Ho,ssrContextKey:Fo,ssrUtils:Lo,stop:Ko,toDisplayString:Uo,toHandlerKey:qo,toHandlers:Go,toRaw:Wo,toRef:Qo,toRefs:Xo,toValue:Yo,transformVNodeArgs:Zo,triggerRef:Jo,unref:et,useAttrs:ot,useCssModule:tt,useCssVars:st,useModel:rt,useSSRContext:at,useSlots:nt,useTransitionState:it,vModelCheckbox:lt,vModelDynamic:ct,vModelRadio:dt,vModelSelect:pt,vModelText:bt,vShow:ht,version:gt,warn:mt,watch:ut,watchEffect:ft,watchPostEffect:vt,watchSyncEffect:St,withAsyncContext:yt,withCtx:wt,withDefaults:Ct,withDirectives:xt,withKeys:Rt,withMemo:zt,withModifiers:Pt,withScopeId:Tt},Symbol.toStringTag,{value:"Module"}));function V(s,p="default",a=[]){const{children:n}=s;if(n!==null&&typeof n=="object"&&!Array.isArray(n)){const b=n[p];if(typeof b=="function")return b()}return a}const O="DESCRIPTION_ITEM_FLAG";function Nt(s){return typeof s=="object"&&s&&!Array.isArray(s)?s.type&&s.type[O]:!1}const Ht=c([e("descriptions",{fontSize:"var(--n-font-size)"},[e("descriptions-separator",`
- display: inline-block;
- margin: 0 8px 0 2px;
- `),e("descriptions-table-wrapper",[e("descriptions-table",[e("descriptions-table-row",[e("descriptions-table-header",{padding:"var(--n-th-padding)"}),e("descriptions-table-content",{padding:"var(--n-td-padding)"})])])]),$t("bordered",[e("descriptions-table-wrapper",[e("descriptions-table",[e("descriptions-table-row",[c("&:last-child",[e("descriptions-table-content",{paddingBottom:0})])])])])]),R("left-label-placement",[e("descriptions-table-content",[c("> *",{verticalAlign:"top"})])]),R("left-label-align",[c("th",{textAlign:"left"})]),R("center-label-align",[c("th",{textAlign:"center"})]),R("right-label-align",[c("th",{textAlign:"right"})]),R("bordered",[e("descriptions-table-wrapper",`
- border-radius: var(--n-border-radius);
- overflow: hidden;
- background: var(--n-merged-td-color);
- border: 1px solid var(--n-merged-border-color);
- `,[e("descriptions-table",[e("descriptions-table-row",[c("&:not(:last-child)",[e("descriptions-table-content",{borderBottom:"1px solid var(--n-merged-border-color)"}),e("descriptions-table-header",{borderBottom:"1px solid var(--n-merged-border-color)"})]),e("descriptions-table-header",`
- font-weight: 400;
- background-clip: padding-box;
- background-color: var(--n-merged-th-color);
- `,[c("&:not(:last-child)",{borderRight:"1px solid var(--n-merged-border-color)"})]),e("descriptions-table-content",[c("&:not(:last-child)",{borderRight:"1px solid var(--n-merged-border-color)"})])])])])]),e("descriptions-header",`
- font-weight: var(--n-th-font-weight);
- font-size: 18px;
- transition: color .3s var(--n-bezier);
- line-height: var(--n-line-height);
- margin-bottom: 16px;
- color: var(--n-title-text-color);
- `),e("descriptions-table-wrapper",`
- transition:
- background-color .3s var(--n-bezier),
- border-color .3s var(--n-bezier);
- `,[e("descriptions-table",`
- width: 100%;
- border-collapse: separate;
- border-spacing: 0;
- box-sizing: border-box;
- `,[e("descriptions-table-row",`
- box-sizing: border-box;
- transition: border-color .3s var(--n-bezier);
- `,[e("descriptions-table-header",`
- font-weight: var(--n-th-font-weight);
- line-height: var(--n-line-height);
- display: table-cell;
- box-sizing: border-box;
- color: var(--n-th-text-color);
- transition:
- color .3s var(--n-bezier),
- background-color .3s var(--n-bezier),
- border-color .3s var(--n-bezier);
- `),e("descriptions-table-content",`
- vertical-align: top;
- line-height: var(--n-line-height);
- display: table-cell;
- box-sizing: border-box;
- color: var(--n-td-text-color);
- transition:
- color .3s var(--n-bezier),
- background-color .3s var(--n-bezier),
- border-color .3s var(--n-bezier);
- `,[D("content",`
- transition: color .3s var(--n-bezier);
- display: inline-block;
- color: var(--n-td-text-color);
- `)]),D("label",`
- font-weight: var(--n-th-font-weight);
- transition: color .3s var(--n-bezier);
- display: inline-block;
- margin-right: 14px;
- color: var(--n-th-text-color);
- `)])])])]),e("descriptions-table-wrapper",`
- --n-merged-th-color: var(--n-th-color);
- --n-merged-td-color: var(--n-td-color);
- --n-merged-border-color: var(--n-border-color);
- `),Mt(e("descriptions-table-wrapper",`
- --n-merged-th-color: var(--n-th-color-modal);
- --n-merged-td-color: var(--n-td-color-modal);
- --n-merged-border-color: var(--n-border-color-modal);
- `)),Et(e("descriptions-table-wrapper",`
- --n-merged-th-color: var(--n-th-color-popover);
- --n-merged-td-color: var(--n-td-color-popover);
- --n-merged-border-color: var(--n-border-color-popover);
- `))]),Ft=Object.assign(Object.assign({},I.props),{title:String,column:{type:Number,default:3},columns:Number,labelPlacement:{type:String,default:"top"},labelAlign:{type:String,default:"left"},separator:{type:String,default:":"},size:{type:String,default:"medium"},bordered:Boolean,labelStyle:[Object,String],contentStyle:[Object,String]}),qt=A({name:"Descriptions",props:Ft,setup(s){const{mergedClsPrefixRef:p,inlineThemeDisabled:a}=_t(s),n=I("Descriptions","-descriptions",Ht,Dt,s,p),b=_(()=>{const{size:i,bordered:h}=s,{common:{cubicBezierEaseInOut:u},self:{titleTextColor:t,thColor:z,thColorModal:f,thColorPopover:P,thTextColor:T,thFontWeight:k,tdTextColor:$,tdColor:o,tdColorModal:v,tdColorPopover:M,borderColor:l,borderColorModal:g,borderColorPopover:S,borderRadius:y,lineHeight:m,[E("fontSize",i)]:w,[E(h?"thPaddingBordered":"thPadding",i)]:C,[E(h?"tdPaddingBordered":"tdPadding",i)]:x}}=n.value;return{"--n-title-text-color":t,"--n-th-padding":C,"--n-td-padding":x,"--n-font-size":w,"--n-bezier":u,"--n-th-font-weight":k,"--n-line-height":m,"--n-th-text-color":T,"--n-td-text-color":$,"--n-th-color":z,"--n-th-color-modal":f,"--n-th-color-popover":P,"--n-td-color":o,"--n-td-color-modal":v,"--n-td-color-popover":M,"--n-border-radius":y,"--n-border-color":l,"--n-border-color-modal":g,"--n-border-color-popover":S}}),d=a?At("descriptions",_(()=>{let i="";const{size:h,bordered:u}=s;return u&&(i+="a"),i+=h[0],i}),b,s):void 0;return{mergedClsPrefix:p,cssVars:a?void 0:b,themeClass:d==null?void 0:d.themeClass,onRender:d==null?void 0:d.onRender,compitableColumn:kt(s,["columns","column"]),inlineThemeDisabled:a}},render(){const s=this.$slots.default,p=s?Bt(s()):[];p.length;const{compitableColumn:a,labelPlacement:n,labelAlign:b,size:d,bordered:i,title:h,cssVars:u,mergedClsPrefix:t,separator:z,onRender:f}=this;f==null||f();const P=p.filter(o=>Nt(o)),T={span:0,row:[],secondRow:[],rows:[]},$=P.reduce((o,v,M)=>{const l=v.props||{},g=P.length-1===M,S=["label"in l?l.label:V(v,"label")],y=[V(v)],m=l.span||1,w=o.span;o.span+=m;const C=l.labelStyle||l["label-style"]||this.labelStyle,x=l.contentStyle||l["content-style"]||this.contentStyle;if(n==="left")i?o.row.push(r("th",{class:`${t}-descriptions-table-header`,colspan:1,style:C},S),r("td",{class:`${t}-descriptions-table-content`,colspan:g?(a-w)*2+1:m*2-1,style:x},y)):o.row.push(r("td",{class:`${t}-descriptions-table-content`,colspan:g?(a-w)*2:m*2},r("span",{class:`${t}-descriptions-table-content__label`,style:C},[...S,z&&r("span",{class:`${t}-descriptions-separator`},z)]),r("span",{class:`${t}-descriptions-table-content__content`,style:x},y)));else{const B=g?(a-w)*2:m*2;o.row.push(r("th",{class:`${t}-descriptions-table-header`,colspan:B,style:C},S)),o.secondRow.push(r("td",{class:`${t}-descriptions-table-content`,colspan:B,style:x},y))}return(o.span>=a||g)&&(o.span=0,o.row.length&&(o.rows.push(o.row),o.row=[]),n!=="left"&&o.secondRow.length&&(o.rows.push(o.secondRow),o.secondRow=[])),o},T).rows.map(o=>r("tr",{class:`${t}-descriptions-table-row`},o));return r("div",{style:u,class:[`${t}-descriptions`,this.themeClass,`${t}-descriptions--${n}-label-placement`,`${t}-descriptions--${b}-label-align`,`${t}-descriptions--${d}-size`,i&&`${t}-descriptions--bordered`]},h||this.$slots.header?r("div",{class:`${t}-descriptions-header`},h||It(this,"header")):null,r("div",{class:`${t}-descriptions-table-wrapper`},r("table",{class:`${t}-descriptions-table`},r("tbody",null,$))))}}),Lt={label:String,span:{type:Number,default:1},labelStyle:[Object,String],contentStyle:[Object,String]},Gt=A({name:"DescriptionsItem",[O]:!0,props:Lt,render(){return null}}),Wt=Vt(jt);export{Gt as _,qt as a,Wt as r};
|