UNPKG

vexip-ui

Version:

A Vue 3 UI library, Highly customizability, full TypeScript, performance pretty good

3 lines (2 loc) 21.4 kB
"use strict";const e=require("vue");require("../native-scroll/index.cjs");require("../renderer/index.cjs");require("../scrollbar/index.cjs");const Ot=require("./table-column.cjs"),Xt=require("./table-column-group.cjs"),Yt=require("./table-summary.cjs");require("./table-head.vue.cjs");require("./table-body.vue.cjs");require("./table-foot.vue.cjs");const u=require("@vexip-ui/config"),f=require("@vexip-ui/utils"),Kt=require("@vexip-ui/hooks"),Ut=require("./props.cjs"),jt=require("./store.cjs"),g=require("./symbol.cjs"),G=require("../native-scroll/native-scroll.cjs"),ve=require("./table-head.vue2.cjs"),R=require("./table-foot.vue2.cjs"),ge=require("./table-body.vue2.cjs"),be=require("../renderer/renderer.cjs"),Ve=require("../scrollbar/scrollbar.vue2.cjs"),Gt=["aria-rowcount"],Jt={role:"none","aria-hidden":""},Qt=e.defineComponent({name:"Table",__name:"table",props:Ut.tableProps,emits:["update:data"],setup($e,{expose:Ae,emit:Pe}){const Me={id:"id",children:"children",checked:"checked",height:"height",expanded:"expanded",treeExpanded:"treeExpanded"},qe=$e,l=u.useProps("table",qe,{locale:null,columns:{default:()=>[],static:!0},summaries:{default:()=>[],static:!0},data:{default:()=>[],static:!0},width:null,height:null,minHeight:null,rowClass:null,rowStyle:null,rowAttrs:null,stripe:!1,border:!1,highlight:!1,useXBar:!1,useYBar:!1,barFade:1500,rowDraggable:!1,rowHeight:{default:null,validator:t=>t>0},rowMinHeight:{default:36,validator:t=>t>0},virtual:!1,bufferCount:{default:5,validator:t=>t>=0},scrollClass:()=>({}),expandRenderer:{default:null,isFunc:!0},currentPage:{default:1,validator:t=>t>0,static:!0},pageSize:0,transparent:!1,tooltipTheme:{default:"dark",validator:t=>["light","dark"].includes(t)},tooltipWidth:500,singleSorter:!1,singleFilter:!1,cellClass:null,cellStyle:null,cellAttrs:null,headClass:null,headStyle:null,headAttrs:null,footClass:null,footStyle:null,footAttrs:null,customSorter:!1,customFilter:!1,keyConfig:()=>({}),disabledTree:!1,rowIndent:"16px",noCascaded:!1,colResizable:!1,cellSpan:{default:null,isFunc:!0},sidePadding:0,icons:()=>({}),borderWidth:1,dataFilter:{default:null,isFunc:!0},noTransition:!1,ellipsis:!1,slots:()=>({})}),Le=Pe,B=e.useSlots(),n=u.useNameHelper("table"),{timer:F}=Kt.useSetTimeout(),S=e.ref(l.height),T=e.ref(l.height||0),x=e.ref(!1),V=e.ref(!1),C=e.ref(0),z=e.ref(0),J=e.ref(0),$=e.ref(0),A=e.ref(!1),Q=e.ref(g.DropType.BEFORE),Z=e.reactive(new Set),ee=e.reactive(new Set),te=e.ref(),re=e.ref(!1),ye=e.ref(0),P=e.ref(),h=e.ref(),le=e.ref(),oe=e.ref(),ne=e.ref(),_=e.ref(),D=e.ref(),N=e.ref(),M=e.ref(),ae=e.ref(),ie=e.ref();let q=!1;const we=u.useLocale("table",e.toRef(l,"locale")),L=e.computed(()=>({...Me,...l.keyConfig})),se=e.computed(()=>Array.from(Z)),ce=e.computed(()=>Array.from(ee)),ke=["rowClass","rowStyle","rowAttrs","cellClass","cellStyle","cellAttrs","headClass","headStyle","headAttrs","footClass","footStyle","footAttrs","border","stripe","highlight","currentPage","pageSize","rowHeight","rowMinHeight","rowDraggable","tooltipTheme","tooltipWidth","singleSorter","singleFilter","customSorter","customFilter","noCascaded","colResizable","expandRenderer","cellSpan","sidePadding","borderWidth","dataFilter","ellipsis"],ue=jt.useStore({...ke.reduce((t,r)=>(t[r]=l[r],t),{}),columns:se.value,summaries:ce.value,data:l.data,dataKey:L.value.id,virtual:l.virtual,locale:we.value,keyConfig:L.value,disabledTree:l.disabledTree,colResizable:l.colResizable===!0?"lazy":l.colResizable,sidePadding:Array.isArray(l.sidePadding)?l.sidePadding:[l.sidePadding,l.sidePadding]});e.provide(g.TABLE_STORE,ue),e.provide(g.TABLE_ACTIONS,{increaseColumn:pt,decreaseColumn:vt,increaseSummary:gt,decreaseSummary:bt,getTableElement:kt,refreshXScroll:Fe,emitRowCheck:St,emitAllRowCheck:xt,emitRowExpand:Ct,emitRowTreeExpand:Et,emitRowFilter:Rt,emitRowSort:Bt,handleRowDragStart:Tt,handleRowDragOver:zt,handleRowDrop:Dt,handleRowDragEnd:Nt,emitRowEvent:Ht,emitCellEvent:Ft,emitHeadEvent:Vt,emitColResize:$t,emitFootEvent:At,hasIcon:t=>!!l.icons[t],getIcon:t=>l.icons[t],renderTableSlot:Lt,runInLocked:b,updateColumns:()=>f.debounceMinor(Ne),setColumnProp:yt,updateSummaries:()=>f.debounceMinor(He),setSummaryProp:wt}),e.provide(g.TABLE_SLOTS,B);const{state:a,getters:w,mutations:W}=ue,Se=e.computed(()=>l.noTransition||a.locked||a.barScrolling),We=e.computed(()=>({[n.b()]:!0,[n.bs("vars")]:!0,[n.bm("inherit")]:l.inherit,[n.bm("stripe")]:l.stripe,[n.bm("border")]:l.border,[n.bm("highlight")]:l.highlight,[n.bm("use-y-bar")]:l.useYBar,[n.bm("transparent")]:l.transparent,[n.bm("virtual")]:l.virtual,[n.bm("col-resizable")]:l.colResizable,[n.bm("col-resizing")]:a.colResizing,[n.bm("locked")]:Se.value,[n.bm("above-foot")]:a.aboveSummaries.length,[n.bm("below-foot")]:a.belowSummaries.length,[n.bm("using-bar")]:a.barScrolling})),Ie=e.computed(()=>{const t=te.value??l.width,[r,o]=a.sidePadding,i={[n.cv("row-indent-width")]:typeof l.rowIndent=="number"?`${l.rowIndent}px`:l.rowIndent,[n.cv("b-width")]:`${l.borderWidth}px`,[n.cv("expanded-width")]:`${ye.value}px`};return r&&(i[n.cv("side-pad-left")]=`${r}px`),o&&(i[n.cv("side-pad-right")]=`${o}px`),f.isDefined(t)&&(typeof t=="number"||f.isValidNumber(t,!0)?(i.width=`${t}px`,i.minWidth=`${t}px`):i.width=t),i}),Oe=e.computed(()=>!!(f.isDefined(l.width)||a.leftFixedColumns.length||a.rightFixedColumns.length)),v=e.computed(()=>{const{totalHeight:t}=a;return S.value?Math.min(S.value,t):void 0}),Xe=e.computed(()=>{var t;return((t=h.value)==null?void 0:t.xBarLength)||35}),Ye=e.computed(()=>{const{totalHeight:t}=a;return v.value&&t&&Math.max(Math.min(v.value/t*100,99),5)||35}),Ke=e.computed(()=>(f.getLast(w.totalWidths)||0)+(a.sidePadding[0]||0)+(a.sidePadding[1]||0)),I=e.computed(()=>x.value&&C.value>0),O=e.computed(()=>x.value&&C.value<100),{setColumns:Ue,setSummaries:je,setData:X,setDataKey:Ge,setTableWidth:Je,setBodyYScroll:xe,setBodyXScroll:Ce,setRenderRows:de,setVirtual:Qe,setLocale:Ze,setDragging:Ee,setKeyConfig:et,setDisabledTree:tt,setLocked:Re,setBarScrolling:Y,clearSort:rt,clearFilter:lt,refreshRowIndex:ot,clearCheckAll:nt,getParentRow:fe,getCurrentData:Be,flatTreeRows:at,refreshRowDepth:it,queryRow:Te,handleCheck:st,setTreeExpanded:ct}=W;e.watch(se,Ne),e.watch(ce,He),e.watch(()=>L.value.id,Ge),e.watch(()=>l.data,_e,{deep:!0}),e.watch(()=>l.width,he),e.watch([()=>l.height,()=>l.borderWidth],()=>{e.nextTick(pe)}),e.watch(we,Ze,{deep:!0}),e.watch(()=>l.virtual,t=>{Qe(t),X(l.data),U()}),e.watch(L,t=>{et(t),X(l.data)},{deep:!0}),e.watch(()=>l.disabledTree,t=>{tt(t),X(l.data)}),e.watch([()=>l.rowHeight,()=>l.rowMinHeight],()=>{H()});for(const t of ke){const r=W[`set${t.charAt(0).toLocaleUpperCase()}${t.slice(1)}`];e.watch(()=>l[t],r)}function me(){var t,r;(t=ae.value)==null||t.handleScroll(C.value),(r=ie.value)==null||r.handleScroll(z.value)}const ze=f.debounce(H);e.onMounted(()=>{q=!0,e.watch(v,U),H(),window.addEventListener("resize",ze),e.nextTick(()=>{re.value=w.hasDragColumn}),h.value&&(x.value=h.value.enableXScroll,V.value=h.value.enableYScroll)}),e.onBeforeUnmount(()=>{q=!1,window.removeEventListener("resize",ze)}),Ae({bodyHeight:S,xScrollEnabled:x,yScrollEnabled:V,xScrollPercent:C,yScrollPercent:z,headHeight:J,footHeight:$,indicatorShow:A,bodyScrollHeight:v,totalWidths:Ke,totalHeight:e.computed(()=>a.totalHeight),locked:Se,store:ue,wrapper:P,mainScroll:h,xHeadScroll:le,xAboveScroll:oe,xBelowScroll:ne,thead:_,aboveTfoot:D,belowTfoot:N,indicator:M,xScrollbar:ae,yScrollbar:ie,clearSort:rt,clearFilter:lt,clearSelected:nt,refresh:H,refreshData:_e,getSelected:Pt,getData:Be,selectRow:Mt,treeExpandRow:qt});function _e(t=l.data){return b(()=>{X(t),e.nextTick(()=>E(!0)),U()})}function he(){const t=l.width;f.isDefined(t)&&(typeof t=="string"&&parseFloat(t).toString()!==t?te.value=t:te.value=`${f.toNumber(t)}px`),e.nextTick(()=>{var r;(r=h.value)!=null&&r.content&&Je(h.value.content.offsetWidth),Fe()})}function pe(){const t=l.height,r=l.minHeight,o=l.borderWidth;let i=0;_.value||D.value||N.value?(_.value&&(i=_.value.offsetHeight),D.value&&(i+=D.value.offsetHeight),N.value&&(i=N.value.offsetHeight)):i=l.rowHeight||l.rowMinHeight,i+=2*o,f.isDefined(t)?S.value=t-i:S.value=void 0,f.isDefined(r)?T.value=Math.min(r,t??1/0)-i:T.value=0}function ut(t){a.barScrolling||(t.type!=="vertical"&&K(t),t.type!=="horizontal"&&dt(t))}function K({clientX:t,percentX:r}){a.barScrolling||(C.value=r,Ce(t),me(),u.emitEvent(l.onScroll,{type:"horizontal",client:t,percent:r}))}function dt({clientY:t,percentY:r}){a.barScrolling||(z.value=r,xe(t),me(),De(t,r))}function ft(t){if(!h.value)return;const r=h.value.xScrollLimit*t/100;C.value=t,Ce(r),u.emitEvent(l.onScroll,{type:"horizontal",client:r,percent:t})}function mt(t){const{totalHeight:r}=a,o=t*(r-(v.value??0))/100;z.value=t,xe(o),De(o,t)}function De(t,r){b(),f.nextFrameOnce(E),u.emitEvent(l.onScroll,{type:"vertical",client:t,percent:r})}function ht(){var t;(t=h.value)!=null&&t.content&&(ye.value=h.value.content.offsetWidth),q&&H()}function pt(t){Z.add(t)}function vt(t){Z.delete(t)}function gt(t){ee.add(t)}function bt(t){ee.delete(t)}function Ne(){b(()=>{Ue(se.value),q&&he(),e.nextTick(()=>{re.value=w.hasDragColumn})})}function yt(t,r,o){W.setColumnProp(t,r,o)}function He(){b(()=>{je(ce.value)})}function wt(t,r,o){W.setSummaryProp(t,r,o)}function kt(){return P.value}function Fe(){var t,r,o,i;(t=h.value)==null||t.refresh(),(r=le.value)==null||r.refresh(),(o=oe.value)==null||o.refresh(),(i=ne.value)==null||i.refresh()}function St(t){u.emitEvent(l.onRowCheck,t)}function xt(t,r){u.emitEvent(l.onRowCheckAll,t,r)}function Ct(t){u.emitEvent(l.onRowExpand,t)}function Et(t){u.emitEvent(l.onRowTreeExpand,t)}function Rt(){const{columns:t,filters:r}=a,o=f.listToMap(t,"key"),i=Array.from(r.keys()).filter(s=>r.get(s).active).map(s=>{const m=o[s];return{name:m.name,key:m.key,meta:m.meta,active:r.get(s).active}});E(!0),u.emitEvent(l.onRowFilter,i,w.filteredData.map(s=>s.data))}function Bt(){const{columns:t,sorters:r}=a,o=f.listToMap(t,"key"),i=Array.from(r.keys()).filter(s=>r.get(s).type).map(s=>{const m=o[s],c=r.get(s);return{name:m.name,key:m.key,meta:m.meta,type:c.type,order:c.order}});E(!0),u.emitEvent(l.onRowSort,i,w.sortedData.map(s=>s.data))}let p;function Tt(t,r){p={draggingRow:t.row,tableRect:P.value.getBoundingClientRect(),willDropRow:null,dropType:g.DropType.BEFORE,dropped:!1},Ee(!0),u.emitEvent(l.onRowDragStart,t.row.data,r)}function zt(t,r){if(!p||!t.el)return;const o=t.el.getBoundingClientRect(),i=p.tableRect,s=a.disabledTree?.5:.25,m=a.disabledTree?.5:.75,c=r.clientY-o.top,y=o.height;let d,k=-9999,j=!0;c<y*s?(d=g.DropType.BEFORE,k=o.top-i.top):c>=y*m?(d=g.DropType.AFTER,k=o.bottom-i.top):(d=g.DropType.INNER,j=!1),M.value&&(M.value.style.top=`${k-2}px`),p.willDropRow=t.row,p.dropType=d,A.value=j,Q.value=d,u.emitEvent(l.onRowDragOver,t.row.data,r)}function _t(t,r){if(!t||!r)return!0;for(;t;){if(t===r||t.key===r.key)return!0;t=fe(t.key)}return!1}function Dt(t,r){var y;if(!p)return;const{draggingRow:o,willDropRow:i,dropType:s}=p;if(!i||_t(i,o))return;let m,c;if(o&&(c=fe(o.key),c||(c={children:a.treeRowData}),m=o.key,f.removeArrayItem(c.children,d=>d.key===m),(y=c.children)!=null&&y.length||(c.treeExpanded=!1)),s===g.DropType.INNER){Array.isArray(i.children)||(i.children=[]);const d=Array.from(i.children);d.push(o),i.children=d,i.treeExpanded=!0,o.parent=i.key}else{m=i.key,c=fe(i.key),c||(c={children:a.treeRowData});const d=c.children.findIndex(k=>k.key===m);~d&&(c.children.splice(+(s===g.DropType.AFTER)+d,0,o),o.parent=c.key)}p.dropped=!0,it(),at(),ot(),u.emitEvent(l.onRowDrop,t.row.data,s,r)}function Nt(t){if(!p)return;const{draggingRow:r,dropped:o}=p;p=null,A.value=!1,e.nextTick(()=>{const i=o?Be():a.data;Ee(!1),o&&Le("update:data",i),u.emitEvent(l.onRowDragEnd,r.data,i,t)})}function Ht(t,r){u.emitEvent(l[`onRow${t}`],r)}function Ft(t,r){u.emitEvent(l[`onCell${t}`],r)}function Vt(t,r){u.emitEvent(l[`onHead${t}`],r)}function $t(t,r){u.emitEvent(l[`onColResize${t}`],r)}function At(t,r){u.emitEvent(l[`onFoot${t}`],r)}function E(t=!1){const{totalHeight:r,bodyYScroll:o,heightBITree:i}=a,{processedData:s}=w,m=s.length;if(!l.virtual){de(0,m,t);return}const c=Math.max(Math.min(S.value||0,v.value||0),T.value);c||de(0,0,t);let y=o,d=o+c;d>r&&(d=r,y=d-c);const k=i.boundIndex(y),j=i.boundIndex(d),Wt=Math.max(k-l.bufferCount,0),It=Math.min(j+l.bufferCount+1,m);de(Wt,It,t)}function H(){return b(()=>{e.nextTick(he),setTimeout(()=>{pe(),U(),f.nextFrameOnce(E)},0)})}async function b(t=f.noop,r=250){return clearTimeout(F.locked),Re(!0),await t(),new Promise(o=>{F.locked=setTimeout(()=>{Re(!1),o()},r)})}function U(){clearTimeout(F.scroll),F.scroll=setTimeout(()=>{const{totalHeight:t,bodyYScroll:r}=a;z.value=Math.max(Math.min(r/(t-(v.value??0)||1)*100,100),0),me(),e.nextTick(()=>{pe()}),b(),f.nextFrameOnce(E)},10)}function Pt(){const t=a.rowData,r=[];for(let o=0,i=t.length;o<i;++o){const s=t[o];s.checked&&r.push(s.data)}return r}function Mt(t,r){const o=Te(t);!o||w.disableCheckRows.has(o.key)||st(o.key,r??!o.checked)}function qt(t,r){const o=Te(t);o&&(b(),ct(o.key,r??!o.treeExpanded))}function Lt({name:t}){return e.renderSlot(B,t)}return(t,r)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"wrapper",ref:P,class:e.normalizeClass(We.value),role:"table",style:e.normalizeStyle(Ie.value),"aria-rowcount":e.unref(l).data.length},[e.withDirectives(e.createElementVNode("div",Jt,[e.renderSlot(t.$slots,"default"),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(l).columns,(o,i)=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:o.key??`__inner-column-${i}`},["children"in o?(e.openBlock(),e.createBlock(e.unref(Xt),e.mergeProps({key:0,ref_for:!0},o),null,16)):(e.openBlock(),e.createBlock(e.unref(Ot),e.mergeProps({key:1,ref_for:!0},o,{"id-key":o.key}),null,16,["id-key"]))],64))),128)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(l).summaries,({key:o,...i},s)=>(e.openBlock(),e.createBlock(e.unref(Yt),e.mergeProps({ref_for:!0},i,{key:`__inner-summary-${s}`,"id-key":o}),null,16,["id-key"]))),128))],512),[[e.vShow,!1]]),e.createElementVNode("div",{ref_key:"thead",ref:_,class:e.normalizeClass(e.unref(n).be("head-wrapper"))},[e.createVNode(e.unref(G),{ref_key:"xHeadScroll",ref:le,inherit:"",mode:"horizontal","scroll-only":"",class:e.normalizeClass([e.unref(n).be("wrapper"),e.unref(l).scrollClass.horizontal]),"scroll-x":e.unref(a).bodyXScroll,onScroll:K},{default:e.withCtx(()=>[e.unref(a).leftFixedColumns.length?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass({[e.unref(n).bem("fixed","left")]:!0,[e.unref(n).bem("fixed","active")]:I.value})},[e.createVNode(ve,{fixed:"left"})],2)):e.createCommentVNode("",!0),e.createVNode(ve),e.unref(a).rightFixedColumns.length?(e.openBlock(),e.createElementBlock("div",{key:1,class:e.normalizeClass({[e.unref(n).bem("fixed","right")]:!0,[e.unref(n).bem("fixed","active")]:O.value})},[e.createVNode(ve,{fixed:"right"})],2)):e.createCommentVNode("",!0)]),_:1},8,["class","scroll-x"])],2),e.unref(a).aboveSummaries.length?(e.openBlock(),e.createElementBlock("div",{key:0,ref_key:"aboveTfoot",ref:D,class:e.normalizeClass([e.unref(n).be("foot-wrapper"),e.unref(n).bem("foot-wrapper","above")])},[e.createVNode(e.unref(G),{ref_key:"xAboveScroll",ref:oe,inherit:"",mode:"horizontal","scroll-only":"",class:e.normalizeClass([e.unref(n).be("wrapper"),e.unref(l).scrollClass.horizontal]),"scroll-x":e.unref(a).bodyXScroll,onScroll:K},{default:e.withCtx(()=>[e.unref(a).leftFixedColumns.length?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass({[e.unref(n).bem("fixed","left")]:!0,[e.unref(n).bem("fixed","active")]:I.value})},[e.createVNode(R,{fixed:"left",above:""})],2)):e.createCommentVNode("",!0),e.createVNode(R,{above:""}),e.unref(a).rightFixedColumns.length?(e.openBlock(),e.createElementBlock("div",{key:1,class:e.normalizeClass({[e.unref(n).bem("fixed","right")]:!0,[e.unref(n).bem("fixed","active")]:O.value})},[e.createVNode(R,{fixed:"right",above:""})],2)):e.createCommentVNode("",!0)]),_:1},8,["class","scroll-x"])],2)):e.createCommentVNode("",!0),e.createElementVNode("div",{class:e.normalizeClass([e.unref(n).be("body-wrapper"),e.unref(a).totalHeight>=T.value&&e.unref(n).bem("body-wrapper","scrolled")]),style:e.normalizeStyle({...!v.value&&e.unref(a).totalHeight?{height:`${e.unref(a).totalHeight}px`,transition:e.unref(l).noTransition||e.unref(a).locked?void 0:`height ${e.unref(n).gnv("transition-base")}`}:void 0,minHeight:`${T.value}px`})},[e.createVNode(e.unref(G),{ref_key:"mainScroll",ref:h,inherit:"",mode:"both","scroll-only":"","observe-deep":"",class:e.normalizeClass([e.unref(n).be("wrapper"),e.unref(l).scrollClass.major]),"bar-class":e.unref(n).bem("bar","horizontal"),height:v.value,"scroll-x":e.unref(a).bodyXScroll,"scroll-y":e.unref(a).bodyYScroll,onScroll:ut,onXEnabledChange:r[0]||(r[0]=o=>x.value=o),onYEnabledChange:r[1]||(r[1]=o=>V.value=o),onResize:ht},{default:e.withCtx(()=>[e.unref(a).leftFixedColumns.length?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass({[e.unref(n).bem("fixed","left")]:!0,[e.unref(n).bem("fixed","active")]:I.value}),style:e.normalizeStyle({minHeight:`${e.unref(a).totalHeight}px`})},[e.createVNode(ge,{fixed:"left"},e.createSlots({_:2},[B.empty||e.unref(l).slots.empty?{name:"empty",fn:e.withCtx(({isFixed:o})=>[e.renderSlot(t.$slots,"empty",{isFixed:o},()=>[e.createVNode(e.unref(be),{renderer:e.unref(l).slots.empty,data:{isFixed:o}},null,8,["renderer","data"])])]),key:"0"}:void 0]),1024)],6)):e.createCommentVNode("",!0),e.createVNode(ge,null,e.createSlots({_:2},[B.empty||e.unref(l).slots.empty?{name:"empty",fn:e.withCtx(({isFixed:o})=>[e.renderSlot(t.$slots,"empty",{isFixed:o},()=>[e.createVNode(e.unref(be),{renderer:e.unref(l).slots.empty,data:{isFixed:o}},null,8,["renderer","data"])])]),key:"0"}:void 0]),1024),e.unref(a).rightFixedColumns.length?(e.openBlock(),e.createElementBlock("div",{key:1,class:e.normalizeClass({[e.unref(n).bem("fixed","right")]:!0,[e.unref(n).bem("fixed","active")]:O.value}),style:e.normalizeStyle({minHeight:`${e.unref(a).totalHeight}px`})},[e.createVNode(ge,{fixed:"right"},e.createSlots({_:2},[B.empty||e.unref(l).slots.empty?{name:"empty",fn:e.withCtx(({isFixed:o})=>[e.renderSlot(t.$slots,"empty",{isFixed:o},()=>[e.createVNode(e.unref(be),{renderer:e.unref(l).slots.empty,data:{isFixed:o}},null,8,["renderer","data"])])]),key:"0"}:void 0]),1024)],6)):e.createCommentVNode("",!0)]),_:3},8,["class","bar-class","height","scroll-x","scroll-y"])],6),e.unref(a).belowSummaries.length?(e.openBlock(),e.createElementBlock("div",{key:1,ref_key:"belowTfoot",ref:N,class:e.normalizeClass([e.unref(n).be("foot-wrapper"),e.unref(n).bem("foot-wrapper","below")])},[e.createVNode(e.unref(G),{ref_key:"xBelowScroll",ref:ne,inherit:"",mode:"horizontal","scroll-only":"",class:e.normalizeClass([e.unref(n).be("wrapper"),e.unref(l).scrollClass.horizontal]),"bar-class":e.unref(n).bem("bar","horizontal"),"bar-fade":e.unref(l).barFade,"scroll-x":e.unref(a).bodyXScroll,onScroll:K},{default:e.withCtx(()=>[e.unref(a).leftFixedColumns.length?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass({[e.unref(n).bem("fixed","left")]:!0,[e.unref(n).bem("fixed","active")]:I.value})},[e.createVNode(R,{fixed:"left"})],2)):e.createCommentVNode("",!0),e.createVNode(R),e.unref(a).rightFixedColumns.length?(e.openBlock(),e.createElementBlock("div",{key:1,class:e.normalizeClass({[e.unref(n).bem("fixed","right")]:!0,[e.unref(n).bem("fixed","active")]:O.value})},[e.createVNode(R,{fixed:"right"})],2)):e.createCommentVNode("",!0)]),_:1},8,["class","bar-class","bar-fade","scroll-x"])],2)):e.createCommentVNode("",!0),e.unref(l).useXBar&&Oe.value?(e.openBlock(),e.createBlock(e.unref(Ve),{key:2,ref_key:"xScrollbar",ref:ae,inherit:"",placement:"bottom",class:e.normalizeClass(e.unref(n).bem("bar","horizontal")),fade:e.unref(l).barFade,disabled:!x.value,"bar-length":Xe.value,style:e.normalizeStyle({bottom:`${$.value}px`}),onScrollStart:r[2]||(r[2]=o=>e.unref(Y)(!0)),onScroll:ft,onScrollEnd:r[3]||(r[3]=o=>e.unref(Y)(!1))},null,8,["class","fade","disabled","bar-length","style"])):e.createCommentVNode("",!0),e.unref(l).useYBar&&v.value?(e.openBlock(),e.createBlock(e.unref(Ve),{key:3,ref_key:"yScrollbar",ref:ie,inherit:"",placement:"right",class:e.normalizeClass(e.unref(n).bem("bar","vertical")),fade:e.unref(l).barFade,disabled:!V.value,"bar-length":Ye.value,style:e.normalizeStyle({top:J.value?`${J.value}px`:void 0,bottom:$.value?`${$.value}px`:void 0}),onScrollStart:r[4]||(r[4]=o=>e.unref(Y)(!0)),onScroll:mt,onScrollEnd:r[5]||(r[5]=o=>e.unref(Y)(!1))},null,8,["class","fade","disabled","bar-length","style"])):e.createCommentVNode("",!0),e.unref(l).rowDraggable||re.value?e.withDirectives((e.openBlock(),e.createElementBlock("div",{key:4,ref_key:"indicator",ref:M,class:e.normalizeClass([e.unref(n).be("indicator"),Q.value==="before"&&e.unref(n).bem("indicator","before"),Q.value==="after"&&e.unref(n).bem("indicator","after")])},null,2)),[[e.vShow,A.value]]):e.createCommentVNode("",!0),e.unref(a).colResizable==="lazy"?e.withDirectives((e.openBlock(),e.createElementBlock("div",{key:5,class:e.normalizeClass(e.unref(n).be("resize-indicator")),style:e.normalizeStyle({left:`${e.unref(a).resizeLeft}px`})},null,6)),[[e.vShow,e.unref(a).colResizing]]):e.createCommentVNode("",!0)],14,Gt))}});module.exports=Qt; //# sourceMappingURL=table.vue2.cjs.map