vxe-table
Version:
A PC-end table component based on Vxe UI, supporting copy-paste, data pivot table, and high-performance virtual list table solution.
1 lines • 21.8 kB
JavaScript
Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var _vue=require("vue"),_comp=require("../../../ui/src/comp"),_ui=require("../../../ui"),_utils=require("../../../ui/src/utils"),_dom=require("../../../ui/src/dom"),_log=require("../../../ui/src/log"),_xeUtils=_interopRequireDefault(require("xe-utils"));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}let{getI18n,getIcon,renderEmptyElement}=_ui.VxeUI;var _default=exports.default=(0,_comp.defineVxeComponent)({name:"TableCustomPanel",props:{customStore:{type:Object,default:()=>({})}},setup(L,t){var e=_xeUtils.default.uniqueId();let M=_ui.VxeUI.getComponent("VxeModal"),R=_ui.VxeUI.getComponent("VxeDrawer"),H=_ui.VxeUI.getComponent("VxeButton"),G=_ui.VxeUI.getComponent("VxeNumberInput"),z=_ui.VxeUI.getComponent("VxeRadioGroup"),P=(0,_vue.inject)("$xeTable",{}),{props:W,reactData:K,internalData:r}=P,{computeCustomOpts:$,computeColumnDragOpts:X,computeColumnOpts:ue,computeIsMaxFixedColumn:q,computeResizableOpts:de}=P.getComputeMaps(),y=(0,_vue.ref)(),j=(0,_vue.ref)(),Y=(0,_vue.ref)(),u=(0,_vue.ref)(),d=(0,_vue.ref)(),f=(0,_vue.reactive)({dragCol:null,dragGroupField:null,dragAggFnCol:null,dragTipText:""}),T={},a={refElem:y,refBodyWrapperElem:j,refCustomBodyElem:Y,refDragLineElem:u,refDragTipElem:d},i={},S=e=>{var t=L.customStore;t.activeWrapper=!0,P.customOpenEvent(e)},k=e=>{let t=L.customStore;t.activeWrapper=!1,setTimeout(()=>{t.activeBtn||t.activeWrapper||P.customCloseEvent(e)},300)},Z=({$event:e})=>{K.isCustomStatus=!0,P.saveCustom(),P.closeCustom(),P.emitCustomEvent("confirm",e)},J=({$event:e})=>{P.closeCustom(),P.emitCustomEvent("close",e)},Q=({$event:e})=>{P.cancelCustom(),P.closeCustom(),P.emitCustomEvent("cancel",e)},l=e=>{P.resetCustom(!0),P.closeCustom(),P.emitCustomEvent("reset",e)},ee=({$event:t})=>{_ui.VxeUI.modal?_ui.VxeUI.modal.confirm({content:getI18n("vxe.custom.cstmConfirmRestore"),className:"vxe-table--ignore-clear",escClosable:!0}).then(e=>{"confirm"===e&&l(t)}):l(t)},o=t=>{var e=K.customColumnList,e=_xeUtils.default.findTree(e,e=>e===t);e&&e.parent&&(e=e.parent,e.children)&&e.children.length&&(e.renderVisible=e.children.every(e=>e.renderVisible),e.halfVisible=!e.renderVisible&&e.children.some(e=>e.renderVisible||e.halfVisible),o(e))},te=(e,t)=>{let l=!e.renderVisible;$.value.immediate?(_xeUtils.default.eachTree([e],e=>{e.visible=l,e.renderVisible=l,e.halfVisible=!1}),K.isCustomStatus=!0,P.handleCustom(),P.saveCustomStore("update:visible")):_xeUtils.default.eachTree([e],e=>{e.renderVisible=l,e.halfVisible=!1}),o(e),P.checkCustomStatus(),P.dispatchEvent("custom-visible-change",{column:e,checked:l},t)},ce=e=>{$.value.immediate&&e.renderResizeWidth!==e.renderWidth&&(e.resizeWidth=e.renderResizeWidth,e.renderWidth=e.renderResizeWidth,K.isCustomStatus=!0,P.handleCustom(),P.saveCustomStore("update:width"))},le=(e,t,l)=>{var o=q.value;let a=null;$.value.immediate?(e.renderFixed===t?(a="",_xeUtils.default.eachTree([e],e=>{e.fixed="",e.renderFixed=""})):o&&!e.renderFixed||(a=t,_xeUtils.default.eachTree([e],e=>{e.fixed=t,e.renderFixed=t})),K.isCustomStatus=!0,P.handleCustom(),P.saveCustomStore("update:fixed")):e.renderFixed===t?(a="",_xeUtils.default.eachTree([e],e=>{e.renderFixed=""})):o&&!e.renderFixed||(a=t,_xeUtils.default.eachTree([e],e=>{e.renderFixed=t})),null!==a&&P.dispatchEvent("custom-fixed-change",{column:e,fixed:a},l)},oe=e=>{var t=K.customStore,t=!t.isAll;P.toggleCustomAllCheckbox(),P.dispatchEvent("custom-visible-all",{checked:t},e)},c=(e,t,l,o)=>{var a,i,s,r,n=j.value;n&&(r=Y.value)&&(a=T.prevDragToChild,i=n.getBoundingClientRect(),r=r.getBoundingClientRect(),s=u.value,t?s&&(l?(t=t.getBoundingClientRect(),s.style.display="block",s.style.left=Math.max(0,r.x-i.x)+"px",s.style.top=Math.max(1,t.y+n.scrollTop-i.y)+"px",s.style.height=t.height+"px",s.style.width=t.width+"px",s.setAttribute("drag-pos",o),s.setAttribute("drag-to-child",a?"y":"n")):s.style.display=""):s&&(s.style.display="node"),r=d.value)&&(r.style.display="block",r.style.top=Math.min(n.clientHeight+n.scrollTop-r.clientHeight,e.clientY+n.scrollTop-i.y)+"px",r.style.left=Math.min(n.clientWidth+n.scrollLeft-r.clientWidth,e.clientX+n.scrollLeft-i.x)+"px",r.setAttribute("drag-status",l?a?"sub":"normal":"disabled"))},n=()=>{var e=f.dragCol,t=X.value.tooltipMethod;let l="";l=t?""+(t({$table:P,column:e})||""):getI18n("vxe.custom.cstmDragTarget",[e&&"html"!==e.type?e.getTitle():""]),f.dragTipText=l},s=()=>{var e=d.value,t=u.value;e&&(e.style.display=""),t&&(t.style.display="")},ae=e=>{var e=e.currentTarget.parentElement.parentElement.parentElement,t=e.getAttribute("colid"),t=P.getColumnById(t);e.draggable=!0,f.dragCol=t,f.dragGroupField=null,f.dragAggFnCol=null,n(),(0,_dom.addClass)(e,"active--drag-origin")},ie=e=>{e=e.currentTarget.parentElement.parentElement.parentElement;s(),e.draggable=!1,f.dragCol=null,f.dragGroupField=null,(f.dragAggFnCol=null,_dom.removeClass)(e,"active--drag-origin")},se=e=>{e.dataTransfer&&e.dataTransfer.setDragImage((0,_dom.getTpImg)(),0,0),T.prevDragGroupField=null,T.prevDragAggFnColid=null},re=d=>{let c=W.mouseConfig,m=K.customColumnList,v=r.collectColumn;let p=$.value.immediate;var e=d.currentTarget;let{isCrossDrag:g,isSelfToChildDrag:x,isToChildDrag:h,dragEndMethod:t}=X.value;var l=f.dragCol;let{prevDragCol:o,prevDragGroupField:a,prevDragAggFnColid:i,prevDragPos:_,prevDragToChild:b}=T,C="bottom"===_?1:0;if(a||i)P.handlePivotTableAggregatePanelDragendEvent&&P.handlePivotTableAggregatePanelDragendEvent(d);else if(o&&l&&o!==l){let n=l,u=o;Promise.resolve(!t||t({oldColumn:n,newColumn:u,dragColumn:n,dragPos:_,dragToChild:!!b,offsetIndex:C})).then(a=>{if(a){let e=-1,t=-1,l={},o=(_xeUtils.default.eachTree([n],e=>{l[e.id]=e}),!1);if(p){if(n.parentId&&u.parentId){if(!g)return;if(l[u.id]&&(o=!0,!g||!x))return void(_ui.VxeUI.modal&&_ui.VxeUI.modal.message({status:"error",content:getI18n("vxe.error.treeDragChild")}))}else if(n.parentId){if(!g)return}else if(u.parentId){if(!g)return;if(l[u.id]&&(o=!0,!g||!x))return void(_ui.VxeUI.modal&&_ui.VxeUI.modal.message({status:"error",content:getI18n("vxe.error.treeDragChild")}))}var i,s,r,a=_xeUtils.default.findTree(v,e=>e.id===n.id),a=(o&&g&&x?a&&({items:i,index:r}=a,(s=n.children||[]).forEach(e=>{e.parentId=n.parentId}),i.splice(r,1,...s),n.children=[]):a&&({items:i,index:r,parent:s}=a,i.splice(r,1),s||(e=r)),_xeUtils.default.findTree(v,e=>e.id===u.id));a&&({items:i,index:s,parent:r}=a,g&&h&&b?(n.parentId=u.id,u.children=(u.children||[]).concat([n])):(n.parentId=u.parentId,i.splice(s+C,0,n)),r||(t=s)),_xeUtils.default.eachTree(v,(e,t,l,o,a)=>{a||(e.renderSortNumber=t+1)})}else e=_xeUtils.default.findIndexOf(m,e=>e.id===n.id),m.splice(e,1),t=_xeUtils.default.findIndexOf(m,e=>e.id===u.id),m.splice(t+C,0,n);c&&(P.clearSelected&&P.clearSelected(),P.clearCellAreas)&&(P.clearCellAreas(),P.clearCopyCellArea()),P.dispatchEvent("column-dragend",{oldColumn:n,newColumn:u,dragColumn:n,dragPos:_,offsetIndex:C,_index:{newIndex:t,oldIndex:e}},d),p&&(K.customColumnList=v.slice(0),P.handleColDragSwapColumn())}}).catch(()=>{})}s(),f.dragCol=null,f.dragGroupField=null,f.dragAggFnCol=null,T.prevDragGroupField=null,T.prevDragAggFnColid=null,e.draggable=!1,e.removeAttribute("drag-pos"),(0,_dom.removeClass)(e,"active--drag-target"),(0,_dom.removeClass)(e,"active--drag-origin")},ne=e=>{var t,l=$.value.immediate,{isCrossDrag:o,isToChildDrag:a}=X.value,i=e.currentTarget,s=(0,_dom.hasControlKey)(e),r=i.getAttribute("colid"),r=P.getColumnById(r),n=f.dragCol;T.prevDragGroupField=null,T.prevDragAggFnColid=null,r&&(o||1===r.level)&&(e.preventDefault(),t=e.clientY-i.getBoundingClientRect().y<i.clientHeight/2?"top":"bottom",!n||n.id===r.id||!o&&1<r.level||!l&&1<r.level||r.renderFixed?c(e,i,!1,t):(T.prevDragToChild=!!(o&&a&&s&&l),T.prevDragCol=r,T.prevDragPos=t,c(e,i,!0,t)))},me=()=>{var e=f.dragTipText,t=X.value;return(0,_vue.h)("div",{},[(0,_vue.h)("div",{ref:u,class:["vxe-table-custom-popup--drag-line",{"is--guides":t.showGuidesStatus}]}),(0,_vue.h)("div",{ref:d,class:"vxe-table-custom-popup--drag-tip"},[(0,_vue.h)("div",{class:"vxe-table-custom-popup--drag-tip-wrapper"},[(0,_vue.h)("div",{class:"vxe-table-custom-popup--drag-tip-status"},[(0,_vue.h)("span",{class:["vxe-table-custom-popup--drag-tip-normal-status",getIcon().TABLE_DRAG_STATUS_ROW]}),(0,_vue.h)("span",{class:["vxe-table-custom-popup--drag-tip-sub-status",getIcon().TABLE_DRAG_STATUS_SUB_ROW]}),(0,_vue.h)("span",{class:["vxe-table-custom-popup--drag-tip-group-status",getIcon().TABLE_DRAG_STATUS_AGG_GROUP]}),(0,_vue.h)("span",{class:["vxe-table-custom-popup--drag-tip-values-status",getIcon().TABLE_DRAG_STATUS_AGG_VALUES]}),(0,_vue.h)("span",{class:["vxe-table-custom-popup--drag-tip-disabled-status",getIcon().TABLE_DRAG_DISABLED]})]),(0,_vue.h)("div",{class:"vxe-table-custom-popup--drag-tip-content"},""+(e||""))])])])};(0,_vue.nextTick)(()=>{var e=$.value.mode;M||"modal"!==e||(0,_log.errLog)("vxe.error.reqComp",["vxe-modal"]),R||"drawer"!==e||(0,_log.errLog)("vxe.error.reqComp",["vxe-drawer"]),H||(0,_log.errLog)("vxe.error.reqComp",["vxe-button"]),G||(0,_log.errLog)("vxe.error.reqComp",["vxe-number-input"]),z||(0,_log.errLog)("vxe.error.reqComp",["vxe-radio-group"])});e={xID:e,props:L,context:t,reactData:f,internalData:T,xeTable:P,getRefMaps:()=>a,getComputeMaps:()=>i,renderVN:()=>{var e=$.value;return(["modal","drawer","popup"].includes(""+e.mode)?()=>{var e=P.xeGrid;let t=L.customStore,{treeConfig:l,rowGroupConfig:o,aggregateConfig:a,resizable:d}=W,{isCustomStatus:i,customColumnList:s}=K,r=$.value,c=r.immediate;var n=X.value;let{mode:u,modalOptions:m,drawerOptions:v,allowVisible:p,allowSort:g,allowFixed:x,allowResizable:h,checkMethod:_,visibleMethod:b}=r,C=ue.value,f=C.maxFixedSize,{minWidth:T,maxWidth:I}=de.value;var E=Object.assign({},m),V=Object.assign({},v);let A=q.value,U=n.isCrossDrag;n=r.slots||{};let D=n.header,y=n.top,S=n.bottom,k=n.default,F=n.footer,B=[],w=t.isAll,O=t.isIndeterminate,N={$table:P,$grid:e,columns:s,isAllChecked:w,isAllIndeterminate:O,isCustomStatus:i};_xeUtils.default.eachTree(s,(o,a,e,t,i)=>{if(!b||b({$table:P,column:o})){let e=0,t=0;h&&(a={$table:P,column:o,columnIndex:a,$columnIndex:a,$rowIndex:-1},T&&(e=_xeUtils.default.toNumber(_xeUtils.default.isFunction(T)?T(a):T)),I)&&(t=_xeUtils.default.toNumber(_xeUtils.default.isFunction(I)?I(a):I));var a=o.renderVisible,s=o.halfVisible,r=(0,_utils.formatText)(o.getTitle(),1),n=o.children&&o.children.length;let l=!!_&&!_({$table:P,column:o});var u=!a;B.push((0,_vue.h)("tr",{key:o.id,colid:o.id,class:["vxe-table-custom-popup--row level--"+o.level,{"is--group":n}],onDragstart:se,onDragend:re,onDragover:ne},[p?(0,_vue.h)("td",{class:"vxe-table-custom-popup--column-item col--visible"},[(0,_vue.h)("div",{class:["vxe-table-custom--checkbox-option",{"is--checked":a,"is--indeterminate":s,"is--disabled":l}],title:getI18n("vxe.custom.setting.colVisible"),onClick:e=>{l||te(o,e)}},[(0,_vue.h)("span",{class:["vxe-checkbox--icon",s?getIcon().TABLE_CHECKBOX_INDETERMINATE:a?getIcon().TABLE_CHECKBOX_CHECKED:getIcon().TABLE_CHECKBOX_UNCHECKED]})])]):(0,_vue.createCommentVNode)(),(0,_vue.h)("td",{class:"vxe-table-custom-popup--column-item col--name"},[(0,_vue.h)("div",{class:"vxe-table-custom-popup--name"},[g?U&&c||1===o.level?(0,_vue.h)("div",Object.assign({class:["vxe-table-custom-popup--column-sort-btn",{"is--disabled":l||u||o.renderFixed}],title:getI18n("vxe.custom.setting.sortHelpTip")},l||u||o.renderFixed?{}:{onMousedown:ae,onMouseup:ie}),[(0,_vue.h)("i",{class:getIcon().TABLE_CUSTOM_SORT})]):(0,_vue.h)("div",{class:"vxe-table-custom-popup--column-sort-placeholder"}):(0,_vue.createCommentVNode)(),"html"===o.type?(0,_vue.h)("div",{key:"1",class:"vxe-table-custom-popup--title",innerHTML:r}):(0,_vue.h)("div",{key:"0",class:"vxe-table-custom-popup--title",title:r},r)])]),h?(0,_vue.h)("td",{class:"vxe-table-custom-popup--column-item col--resizable"},[o.children&&o.children.length||!(_xeUtils.default.isBoolean(o.resizable)?o.resizable:C.resizable||d)?(0,_vue.h)("span","-"):G?(0,_vue.h)(G,{type:"integer",immediate:!1,disabled:l||u,modelValue:o.renderResizeWidth,min:e||void 0,max:t||void 0,"onUpdate:modelValue"(e){e=Math.max(0,Number(e));o.renderResizeWidth=e},onChange(){ce(o)}}):(0,_vue.createCommentVNode)()]):(0,_vue.createCommentVNode)(),x?(0,_vue.h)("td",{class:"vxe-table-custom-popup--column-item col--fixed"},[i?(0,_vue.h)("span","-"):z?(0,_vue.h)(z,{modelValue:o.renderFixed||"",type:"button",size:"mini",disabled:l||u,options:[{label:getI18n("vxe.custom.setting.fixedLeft"),value:"left",disabled:l||u||A},{label:getI18n("vxe.custom.setting.fixedUnset"),value:"",disabled:l||u},{label:getI18n("vxe.custom.setting.fixedRight"),value:"right",disabled:l||u||A}],onChange({label:e,$event:t}){le(o,e,t)}}):(0,_vue.createCommentVNode)()]):(0,_vue.createCommentVNode)()]))}});n={default:()=>(0,_vue.h)("div",{ref:j,class:"vxe-table-custom-popup--body-wrapper"},k?P.callSlot(k,N):[(0,_vue.h)("div",{ref:Y,class:"vxe-table-custom-popup--handle-wrapper"},[y?(0,_vue.h)("div",{class:"vxe-table-custom-popup--table-top"},P.callSlot(y,N)):renderEmptyElement(P),(0,_vue.h)("div",{class:"vxe-table-custom-popup--table-wrapper"},[(0,_vue.h)("table",{},[(0,_vue.h)("colgroup",{},[p?(0,_vue.h)("col",{class:"vxe-table-custom-popup--table-col-seq"}):(0,_vue.createCommentVNode)(),(0,_vue.h)("col",{class:"vxe-table-custom-popup--table-col-title"}),h?(0,_vue.h)("col",{class:"vxe-table-custom-popup--table-col-width"}):(0,_vue.createCommentVNode)(),x?(0,_vue.h)("col",{class:"vxe-table-custom-popup--table-col-fixed"}):(0,_vue.createCommentVNode)()]),(0,_vue.h)("thead",{},[(0,_vue.h)("tr",{},[p?(0,_vue.h)("th",{},[(0,_vue.h)("div",{class:["vxe-table-custom--checkbox-option",{"is--checked":w,"is--indeterminate":O}],title:getI18n("vxe.table.allTitle"),onClick:oe},[(0,_vue.h)("span",{class:["vxe-checkbox--icon",O?getIcon().TABLE_CHECKBOX_INDETERMINATE:w?getIcon().TABLE_CHECKBOX_CHECKED:getIcon().TABLE_CHECKBOX_UNCHECKED]}),(0,_vue.h)("span",{class:"vxe-checkbox--label"},getI18n("vxe.toolbar.customAll"))])]):(0,_vue.createCommentVNode)(),(0,_vue.h)("th",{},getI18n("vxe.custom.setting.colTitle")),h?(0,_vue.h)("th",{},getI18n("vxe.custom.setting.colResizable")):(0,_vue.createCommentVNode)(),x?(0,_vue.h)("th",{},getI18n("vxe.custom.setting."+(f?"colFixedMax":"colFixed"),[f])):(0,_vue.createCommentVNode)()])]),(0,_vue.h)(_vue.TransitionGroup,{class:"vxe-table-custom--panel-list",tag:"tbody",name:"vxe-table-custom--list"},{default:()=>B})])]),S?(0,_vue.h)("div",{class:"vxe-table-custom-popup--table-bottom"},P.callSlot(S,N)):renderEmptyElement(P),me()]),!l&&(a||o)&&P.getPivotTableAggregatePopupPanel?(0,_vue.h)(P.getPivotTableAggregatePopupPanel(),{customStore:t}):renderEmptyElement(P)]),footer:()=>F?P.callSlot(F,N):(0,_vue.h)("div",{class:"vxe-table-custom-popup--footer"},[H?(0,_vue.h)(H,{content:r.resetButtonText||getI18n("vxe.custom.cstmRestore"),disabled:!i,onClick:ee}):(0,_vue.createCommentVNode)(),c?H?(0,_vue.h)(H,{content:r.closeButtonText||getI18n("vxe.table.customClose"),onClick:J}):(0,_vue.createCommentVNode)():H?(0,_vue.h)(H,{content:r.cancelButtonText||getI18n("vxe.table.customCancel"),onClick:Q}):(0,_vue.createCommentVNode)(),!c&&H?(0,_vue.h)(H,{status:"primary",content:r.confirmButtonText||getI18n("vxe.custom.cstmConfirm"),onClick:Z}):(0,_vue.createCommentVNode)()])};return D&&(n.header=()=>P.callSlot(D,N)),"drawer"===u?R?(0,_vue.h)(R,{key:"drawer",className:["vxe-table-custom-drawer-wrapper","vxe-table--ignore-clear",V.className||""].join(" "),modelValue:t.visible,title:V.title||getI18n("vxe.custom.cstmTitle"),width:V.width||Math.min(880,Math.floor(.6*document.documentElement.clientWidth)),position:V.position,resize:!!V.resize,escClosable:!!V.escClosable,maskClosable:!!V.maskClosable,destroyOnClose:!0,showFooter:!0,"onUpdate:modelValue"(e){t.visible=e}},n):(0,_vue.createCommentVNode)():M?(0,_vue.h)(M,{key:"modal",className:["vxe-table-custom-modal-wrapper","vxe-table--ignore-clear",E.className||""].join(" "),modelValue:t.visible,title:E.title||getI18n("vxe.custom.cstmTitle"),width:E.width||Math.min(880,document.documentElement.clientWidth),minWidth:E.minWidth||700,height:E.height||Math.min(680,document.documentElement.clientHeight),minHeight:E.minHeight||400,showZoom:E.showZoom,showMaximize:E.showMaximize,showMinimize:E.showMinimize,mask:E.mask,lockView:E.lockView,resize:E.resize,escClosable:!!E.escClosable,maskClosable:!!E.maskClosable,destroyOnClose:!0,showFooter:!0,"onUpdate:modelValue"(e){t.visible=e}},n):(0,_vue.createCommentVNode)()}:()=>{var e=P.xeGrid,t=P.props,l=L.customStore,{treeConfig:t,rowGroupConfig:o,aggregateConfig:a}=t,{isCustomStatus:i,customColumnList:s}=K,r=$.value;let d=r.immediate;var n=X.value,u=l.maxHeight;let{checkMethod:c,visibleMethod:m,allowVisible:v,allowSort:p,allowFixed:g,trigger:x,placement:h}=r,_=q.value,b=n.isCrossDrag;var n=r.slots||{},C=n.header,f=n.top,T=n.bottom,I=n.default,n=n.footer;let E=[];var V={},A=l.isAll,D=l.isIndeterminate,e=("hover"===x&&(V.onMouseenter=S,V.onMouseleave=k),{$table:P,$grid:e,columns:s,isAllChecked:A,isAllIndeterminate:D,isCustomStatus:i});return _xeUtils.default.eachTree(s,(l,e,t,o,a)=>{if(!m||m({$table:P,column:l})){var i=l.renderVisible,s=l.halfVisible,r=l.children&&l.children.length,n=(0,_utils.formatText)(l.getTitle(),1);let t=!!c&&!c({$table:P,column:l});var u=!i;E.push((0,_vue.h)("li",{key:l.id,colid:l.id,class:["vxe-table-custom--option","level--"+l.level,{"is--hidden":t||u,"is--group":r}],onDragstart:se,onDragend:re,onDragover:ne},[v?(0,_vue.h)("div",{class:["vxe-table-custom--checkbox-option",{"is--checked":i,"is--indeterminate":s,"is--disabled":t}],title:getI18n("vxe.custom.setting.colVisible"),onClick:e=>{t||te(l,e)}},[(0,_vue.h)("span",{class:["vxe-checkbox--icon",s?getIcon().TABLE_CHECKBOX_INDETERMINATE:i?getIcon().TABLE_CHECKBOX_CHECKED:getIcon().TABLE_CHECKBOX_UNCHECKED]})]):(0,_vue.createCommentVNode)(),(0,_vue.h)("div",{class:"vxe-table-custom--name-option"},[p&&(b&&d||1===l.level)?(0,_vue.h)("div",{class:"vxe-table-custom--sort-option"},[(0,_vue.h)("span",Object.assign({class:["vxe-table-custom--sort-btn",{"is--disabled":t||u||l.renderFixed}],title:getI18n("vxe.custom.setting.sortHelpTip")},t||u||l.renderFixed?{}:{onMousedown:ae,onMouseup:ie}),[(0,_vue.h)("i",{class:getIcon().TABLE_CUSTOM_SORT})])]):(0,_vue.createCommentVNode)(),"html"===l.type?(0,_vue.h)("div",{key:"1",class:"vxe-table-custom--checkbox-label",innerHTML:n}):(0,_vue.h)("div",{key:"0",class:"vxe-table-custom--checkbox-label"},n)]),!a&&g?(0,_vue.h)("div",{class:"vxe-table-custom--fixed-option"},[H?(0,_vue.h)(H,{mode:"text",icon:"left"===l.renderFixed?getIcon().TOOLBAR_TOOLS_FIXED_LEFT_ACTIVE:getIcon().TOOLBAR_TOOLS_FIXED_LEFT,status:"left"===l.renderFixed?"primary":"",disabled:t||u||_&&!l.renderFixed,title:getI18n("left"===l.renderFixed?"vxe.toolbar.cancelFixed":"vxe.toolbar.fixedLeft"),onClick:({$event:e})=>{le(l,"left",e)}}):(0,_vue.createCommentVNode)(),H?(0,_vue.h)(H,{mode:"text",icon:"right"===l.renderFixed?getIcon().TOOLBAR_TOOLS_FIXED_RIGHT_ACTIVE:getIcon().TOOLBAR_TOOLS_FIXED_RIGHT,status:"right"===l.renderFixed?"primary":"",disabled:t||u||_&&!l.renderFixed,title:getI18n("right"===l.renderFixed?"vxe.toolbar.cancelFixed":"vxe.toolbar.fixedRight"),onClick:({$event:e})=>{le(l,"right",e)}}):(0,_vue.createCommentVNode)()]):(0,_vue.createCommentVNode)()]))}}),(0,_vue.h)("div",{ref:y,key:"simple",class:["vxe-table-custom-wrapper","placement--"+h,{"is--active":l.visible}],style:u&&!["left","right"].includes(h||"")?{maxHeight:u+"px"}:{}},l.visible?[(0,_vue.h)("div",{ref:j,class:"vxe-table-custom-simple--body-wrapper"},[!t&&(a||o)&&P.getPivotTableAggregateSimplePanel?(0,_vue.h)(P.getPivotTableAggregateSimplePanel(),{customStore:l}):renderEmptyElement(P),(0,_vue.h)("div",{ref:Y,class:"vxe-table-custom--handle-wrapper"},[(0,_vue.h)("div",{class:"vxe-table-custom--header"},C?P.callSlot(C,e):[(0,_vue.h)("ul",{class:"vxe-table-custom--panel-list"},[(0,_vue.h)("li",{class:"vxe-table-custom--option"},[v?(0,_vue.h)("div",{class:["vxe-table-custom--checkbox-option",{"is--checked":A,"is--indeterminate":D}],title:getI18n("vxe.table.allTitle"),onClick:oe},[(0,_vue.h)("span",{class:["vxe-checkbox--icon",D?getIcon().TABLE_CHECKBOX_INDETERMINATE:A?getIcon().TABLE_CHECKBOX_CHECKED:getIcon().TABLE_CHECKBOX_UNCHECKED]}),(0,_vue.h)("span",{class:"vxe-checkbox--label"},getI18n("vxe.toolbar.customAll"))]):(0,_vue.h)("span",{class:"vxe-checkbox--label"},getI18n("vxe.table.customTitle"))])])]),(0,_vue.h)("div",{class:"vxe-table-custom--body"},[f?(0,_vue.h)("div",{class:"vxe-table-custom--panel-top"},P.callSlot(f,e)):renderEmptyElement(P),I?(0,_vue.h)("div",{class:"vxe-table-custom--panel-body"},P.callSlot(I,e)):(0,_vue.h)(_vue.TransitionGroup,Object.assign({class:"vxe-table-custom--panel-list",name:"vxe-table-custom--list",tag:"ul"},V),{default:()=>E}),T?(0,_vue.h)("div",{class:"vxe-table-custom--panel-bottom"},P.callSlot(T,e)):renderEmptyElement(P)]),r.showFooter?(0,_vue.h)("div",{class:"vxe-table-custom--footer"},n?P.callSlot(n,e):[(0,_vue.h)("div",{class:"vxe-table-custom--footer-buttons"},[H?(0,_vue.h)(H,{mode:"text",content:r.resetButtonText||getI18n("vxe.table.customRestore"),disabled:!i,onClick:ee}):(0,_vue.createCommentVNode)(),d?H?(0,_vue.h)(H,{mode:"text",content:r.closeButtonText||getI18n("vxe.table.customClose"),onClick:J}):(0,_vue.createCommentVNode)():H?(0,_vue.h)(H,{mode:"text",content:r.cancelButtonText||getI18n("vxe.table.customCancel"),onClick:Q}):(0,_vue.createCommentVNode)(),!d&&H?(0,_vue.h)(H,{mode:"text",status:"primary",content:r.confirmButtonText||getI18n("vxe.table.customConfirm"),onClick:Z}):(0,_vue.createCommentVNode)()])]):null]),me()])]:[])})()}};return(0,_vue.provide)("$xeTableCustomPanel",e),e},render(){return this.renderVN()}});