basic-descriptions.e6b0a528.js 1.0 KB

1
  1. import{d as p,f as t,aN as c,H as n,aO as m,r as b,D as f}from"./index.js";const y={title:{type:String},colNumber:{type:Number,default:24},columns:{type:Array},data:{type:Object},labelWidth:{type:String},show:{type:Boolean,default:!0}};const g=p({name:"BasicDescriptions",props:y,setup(l,{slots:s}){return()=>{const{title:r,colNumber:i,columns:o,data:a,labelWidth:d,show:u}=l;return u?t(m,{title:r,border:!0,column:i,size:"small"},{default:()=>[o.map(e=>t(c,{label:e.label,key:e.field,span:e.span?e.span:6,style:{marginBottom:"-1px"}},{default:()=>[t("div",{class:"col-item"},[t("p",{class:"col-label",style:{width:d+"px"}},[e.label]),t("p",{class:"col-value"},[e.render?e.render(a[e.field],a):a[e.field],n(" "),e.append||""])])]})),s.custom&&s.custom(l.data)]}):t("div",{style:{display:"flex",width:"100%",justifyContent:"center",flexDirection:"column",alignItems:"center"}},[t(b("el-button"),{text:!0,size:"large",icon:f("warning-filled"),disabled:!0},null),t("span",null,[n("\u6682\u65E0\u6570\u636E")])])}}});export{g as B};