AntdTableSummary-CkDs3dJ3.js 2.9 KB

1
  1. import{d as p,l as s,ag as d,aq as l,ar as c,k as u}from"./vue-vendor-Be68asQ6.js";import{u as f}from"./index-D2G57Sln.js";import{d as h}from"./table-DeSHy8TZ.js";import x from"./BasicTable-CuSLkXEu.js";import{a as _}from"./index-BFfnEkVs.js";import"./componentMap-BUTAcOmo.js";import"./antd-vue-vendor-DcqS7Wvq.js";import"./useFormItem-CtGMPcLp.js";import"./index-CETWS1o0.js";import"./BasicModal-D4gc2R81.js";import"./useTimeout-Ca5eqGu-.js";import"./vxe-table-vendor-DHF2TRpV.js";import"./useWindowSizeFn-BTSGGcie.js";import"./index-BZ_MXCtW.js";import"./index-BIPzXG41.js";import"./index-CXEQnmRq.js";import"./useIntersectionObserver-Bl62RIZ4.js";import"./download-CjoX0_mR.js";import"./base64Conver-24EVOS6V.js";import"./index-D1703ozz.js";import"./index-Bi7PIj53.js";import"./useCountdown-B7iR27pS.js";import"./useFormItemSingle-nLM0QlcI.js";import"./JSelectUser-DCwPqRxp.js";import"./props-BPxWJPuD.js";import"./JSelectBiz-Be8KsC5j.js";import"./JAddInput-BBXQvvpq.js";import"./areaDataUtil-Cik-Rc_P.js";import"./index-BOEzG86y.js";import"./index-BNFwynfr.js";import"./bem-BvvqSl-N.js";import"./props-Cw7AfxGV.js";import"./useContextMenu-BDwmjIwb.js";import"./depart.api-CDwTvdwQ.js";import"./JSelectDept-DT6g7V5M.js";import"./JPopup-DKJW27Yk.js";import"./JEllipsis-C04xKxcI.js";import"./JUpload-cB_Qj2H2.js";import"./index-iuayQczx.js";import"./index-DJQB4_Pr.js";import"./index-D68l__AG.js";import"./BasicForm-Cv-dsB-e.js";import"./useForm-kcRIHoe0.js";import"./JAreaLinkage-BNOKwn5l.js";import"./JCodeEditor-CSivhUhT.js";import"./htmlmixed-DNSd26j0.js";import"./vue-DbzutmLn.js";/* empty css */import"./EasyCronInput-wCv2YMHn.js";import"./injectionKey-DPVn4AgL.js";const g=p({components:{BasicTable:x},setup(){function r(t){const o=t.reduce((e,m)=>(e+=m.age,e),0),i=t.reduce((e,m)=>(e+=m.score,e),0);return[{_row:"合计",_index:"平均值",age:Math.round(o/t.length),score:Math.round(i/t.length)},{_row:"合计",_index:"总计",age:o,score:i}]}const a=()=>[{title:"ID",dataIndex:"id",fixed:"left",width:200,resizable:!0},{title:"姓名",dataIndex:"name",width:150,filters:[{text:"Male",value:"male"},{text:"Female",value:"female"}]},{title:"年龄",dataIndex:"age",width:100,resizable:!0,customSummaryRender:({text:t})=>s("span",{style:{color:"red"}},[t])},{title:"得分",dataIndex:"score",width:100,resizable:!0},{title:"地址",dataIndex:"address",width:300},{title:"编号",dataIndex:"no",width:150,sorter:!0,defaultHidden:!0},{title:"开始时间",width:150,sorter:!0,dataIndex:"beginTime"},{title:"结束时间",width:150,sorter:!0,dataIndex:"endTime"}],[n]=f({title:"原生总结栏(表尾合计)示例",api:h,rowSelection:{type:"checkbox"},columns:a(),summaryFunc:r,scroll:{x:1e3},canResize:!1});return{registerTable:n}}}),w={class:"p-4"};function b(r,a,n,t,o,i){const e=d("BasicTable");return c(),l("div",w,[u(e,{onRegister:r.registerTable},null,8,["onRegister"])])}const _t=_(g,[["render",b]]);export{_t as default};