vxe-table 3.4.14-beta.1 → 3.4.15

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (45) hide show
  1. package/README.md +1 -5
  2. package/lib/filter/src/mixin.js +24 -13
  3. package/lib/filter/src/mixin.min.js +1 -1
  4. package/lib/form/src/form-item.js +5 -0
  5. package/lib/form/src/form-item.min.js +1 -1
  6. package/lib/form/src/form.js +31 -27
  7. package/lib/form/src/form.min.js +1 -1
  8. package/lib/form/src/util.js +11 -0
  9. package/lib/form/src/util.min.js +1 -1
  10. package/lib/index.umd.js +591 -1272
  11. package/lib/index.umd.min.js +1 -1
  12. package/lib/input/src/date.js +54 -0
  13. package/lib/input/src/date.min.js +1 -0
  14. package/lib/input/src/input.js +12 -59
  15. package/lib/input/src/input.min.js +1 -1
  16. package/lib/input/src/number.js +23 -0
  17. package/lib/input/src/number.min.js +1 -0
  18. package/lib/pager/src/pager.js +15 -1
  19. package/lib/pager/src/pager.min.js +1 -1
  20. package/lib/table/src/body.js +35 -12
  21. package/lib/table/src/body.min.js +1 -1
  22. package/lib/table/src/methods.js +356 -304
  23. package/lib/table/src/methods.min.js +1 -1
  24. package/lib/tools/src/dom.js +12 -1
  25. package/lib/tools/src/dom.min.js +1 -1
  26. package/lib/tooltip/src/tooltip.js +81 -44
  27. package/lib/tooltip/src/tooltip.min.js +1 -1
  28. package/lib/v-x-e-table/src/conf.js +1 -0
  29. package/lib/v-x-e-table/src/conf.min.js +1 -1
  30. package/package.json +3 -3
  31. package/packages/filter/src/mixin.js +17 -10
  32. package/packages/form/src/form-item.js +5 -0
  33. package/packages/form/src/form.js +22 -16
  34. package/packages/form/src/util.js +7 -0
  35. package/packages/input/src/date.js +38 -0
  36. package/packages/input/src/input.js +4 -46
  37. package/packages/input/src/number.js +12 -0
  38. package/packages/pager/src/pager.js +15 -1
  39. package/packages/table/src/body.js +31 -13
  40. package/packages/table/src/methods.js +63 -26
  41. package/packages/tools/src/dom.js +13 -1
  42. package/packages/tooltip/src/tooltip.js +47 -23
  43. package/packages/v-x-e-table/src/conf.js +1 -0
  44. package/README.en.md +0 -170
  45. package/README.zh-TW.md +0 -174
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var _xeUtils=_interopRequireDefault(require("xe-utils")),_conf=_interopRequireDefault(require("../../v-x-e-table/src/conf")),_vXETable=_interopRequireDefault(require("../../v-x-e-table")),_tools=require("../../tools"),_util=require("./util"),_dom=require("../../tools/src/dom");function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function _defineProperty(e,l,t){return l in e?Object.defineProperty(e,l,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[l]=t,e}function _toConsumableArray(e){return _arrayWithoutHoles(e)||_iterableToArray(e)||_unsupportedIterableToArray(e)||_nonIterableSpread()}function _nonIterableSpread(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _unsupportedIterableToArray(e,l){if(e){if("string"==typeof e)return _arrayLikeToArray(e,l);var t=Object.prototype.toString.call(e).slice(8,-1);return"Map"===(t="Object"===t&&e.constructor?e.constructor.name:t)||"Set"===t?Array.from(e):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?_arrayLikeToArray(e,l):void 0}}function _iterableToArray(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function _arrayWithoutHoles(e){if(Array.isArray(e))return _arrayLikeToArray(e)}function _arrayLikeToArray(e,l){(null==l||l>e.length)&&(l=e.length);for(var t=0,o=new Array(l);t<l;t++)o[t]=e[t];return o}var scrollProcessTimeout,renderType="body";function isOperateMouse(e){return e._isResize||e.lastScrollTime&&Date.now()<e.lastScrollTime+e.delayHover}function renderLine(e,l,t,o){var r=o.row,i=o.column,n=t.treeOpts,a=t.treeConfig,s=t.fullAllDataRowIdData,c=i.slots,d=i.treeNode,u=s[_tools.UtilTools.getRowid(t,r)],i=0,s=0,r=[];return u&&(i=u.level,s=u._index,r=u.items),c&&c.line?t.callSlot(c.line,o,e):a&&d&&n.line?[e("div",{class:"vxe-tree--line-wrapper"},[e("div",{class:"vxe-tree--line",style:{height:"".concat((0,_util.calcTreeLine)(o,r,s),"px"),left:"".concat(i*n.indent+(i?2-(0,_util.getOffsetSize)(t):0)+16,"px")}})])]:[]}function renderColumn(e,l,t,o,r,i,n,a,s,c,d,u,p,h,f){var y,v=t.$listeners,g=t.afterFullData,m=t.tableData,w=t.height,x=t.columnKey,b=t.overflowX,T=t.sYOpts,_=t.scrollXLoad,S=t.scrollYLoad,O=t.highlightCurrentRow,C=t.showOverflow,L=t.isAllOverflow,$=t.align,I=t.currentColumn,k=t.cellClassName,H=t.cellStyle,E=t.mergeList,R=t.spanMethod,A=t.radioOpts,Y=t.checkboxOpts,D=t.expandOpts,B=t.treeOpts,P=t.tooltipOpts,M=t.mouseConfig,U=t.editConfig,W=t.editOpts,q=t.editRules,X=t.validOpts,j=t.editStore,N=t.validStore,z=t.tooltipConfig,F=t.rowOpts,V=u.type,K=u.cellRender,G=u.editRender,J=u.align,Q=u.showOverflow,Z=u.className,ee=u.treeNode,le=j.actived,te=T.rHeight,oe=F.height,re=P.showAll||P.enabled,ie=t.getColumnIndex(u),ne=t.getVTColumnIndex(u),j=(0,_tools.isEnableConf)(G),T=i?u.fixed!==i:u.fixed&&b,P=_xeUtils.default.isUndefined(Q)||_xeUtils.default.isNull(Q)?C:Q,b="ellipsis"===P,ae="title"===P,se=!0===P||"tooltip"===P,Q=ae||se||b,P={},J=J||$,$=N.row===a&&N.column===u,q=q&&X.showMessage&&("default"===X.message?w||1<m.length:"inline"===X.message),w={colid:u.id},ce=v["cell-mouseenter"],de=v["cell-mouseleave"],X=G&&U&&"dblclick"===W.trigger,ue={$table:t,seq:o,rowid:r,row:a,rowIndex:s,$rowIndex:c,_rowIndex:d,column:u,columnIndex:ie,$columnIndex:p,_columnIndex:ne,fixed:i,type:renderType,isHidden:T,level:n,visibleData:g,data:m,items:f};if(!_&&!S||Q||(b=Q=!0),(ae||se||re||ce||z)&&(P.mouseenter=function(e){isOperateMouse(t)||(ae?_tools.DomTools.updateCellTitle(e.currentTarget,u):(se||re)&&t.triggerBodyTooltipEvent(e,ue),ce&&t.emitEvent("cell-mouseenter",Object.assign({cell:e.currentTarget},ue),e))}),(se||re||de||z)&&(P.mouseleave=function(e){isOperateMouse(t)||((se||re)&&t.handleTargetLeaveEvent(e),de&&t.emitEvent("cell-mouseleave",Object.assign({cell:e.currentTarget},ue),e))}),(Y.range||M)&&(P.mousedown=function(e){t.triggerCellMousedownEvent(e,ue)}),(F.isCurrent||O||v["cell-click"]||G&&U||"row"===D.trigger||"cell"===D.trigger||"row"===A.trigger||"radio"===u.type&&"cell"===A.trigger||"row"===Y.trigger||"checkbox"===u.type&&"cell"===Y.trigger||"row"===B.trigger||u.treeNode&&"cell"===B.trigger)&&(P.click=function(e){t.triggerCellClickEvent(e,ue)}),(X||v["cell-dblclick"])&&(P.dblclick=function(e){t.triggerCellDblclickEvent(e,ue)}),E.length){d=(0,_util.mergeBodyMethod)(E,d,ne);if(d){var ne=d.rowspan,pe=d.colspan;if(!ne||!pe)return null;1<ne&&(w.rowspan=ne),1<pe&&(w.colspan=pe)}}else if(R){pe=R(ue)||{},R=pe.rowspan,R=void 0===R?1:R,pe=pe.colspan,pe=void 0===pe?1:pe;if(!R||!pe)return null;1<R&&(w.rowspan=R),1<pe&&(w.colspan=pe)}!(T=T&&E&&(1<w.colspan||1<w.rowspan)?!1:T)&&U&&(G||K)&&(W.showStatus||W.showUpdateStatus)&&(y=t.isUpdateByRow(a,u.property));K=[];return T&&C&&L?K.push(e("div",{class:["vxe-cell",{"c--title":ae,"c--tooltip":se,"c--ellipsis":b}],style:{maxHeight:Q&&(te||oe)?"".concat(te||oe,"px"):""}})):(K.push.apply(K,_toConsumableArray(renderLine(e,l,t,ue)).concat([e("div",{class:["vxe-cell",{"c--title":ae,"c--tooltip":se,"c--ellipsis":b}],style:{maxHeight:Q&&(te||oe)?"".concat(te||oe,"px"):""},attrs:{title:ae?t.getCellLabel(a,u):null}},u.renderCell(e,ue))])),q&&$&&K.push(e("div",{class:"vxe-cell--valid",style:N.rule&&N.rule.maxWidth?{width:"".concat(N.rule.maxWidth,"px")}:null},[e("span",{class:"vxe-cell--valid-msg"},N.content)]))),e("td",{class:["vxe-body--column",u.id,(_defineProperty(e={},"col--".concat(J),J),_defineProperty(e,"col--".concat(V),V),_defineProperty(e,"col--last",p===h.length-1),_defineProperty(e,"col--tree-node",ee),_defineProperty(e,"col--edit",j),_defineProperty(e,"col--ellipsis",Q),_defineProperty(e,"fixed--hidden",T),_defineProperty(e,"col--dirty",y),_defineProperty(e,"col--actived",U&&j&&le.row===a&&(le.column===u||"row"===W.mode)),_defineProperty(e,"col--valid-error",$),_defineProperty(e,"col--current",I===u),e),_tools.UtilTools.getClass(Z,ue),_tools.UtilTools.getClass(k,ue)],key:x?u.id:p,attrs:w,style:Object.assign({height:Q&&(te||oe)?"".concat(te||oe,"px"):""},H?_xeUtils.default.isFunction(H)?H(ue):H:null),on:P},K)}function renderRows(p,h,f,y,v,g){var m=f.stripe,w=f.rowKey,x=f.highlightHoverRow,b=f.rowClassName,T=f.rowStyle,_=f.editConfig,S=f.showOverflow,O=f.treeConfig,C=f.treeOpts,L=f.editOpts,$=f.treeExpandeds,I=f.scrollYLoad,k=f.editStore,H=f.rowExpandeds,E=f.radioOpts,R=f.checkboxOpts,A=f.expandColumn,Y=f.hasFixedColumn,D=f.fullAllDataRowIdData,B=f.rowOpts,P=[];return v.forEach(function(t,o){var e={},r=f.getVTRowIndex(t),i=f.getRowIndex(t);(B.isHover||x)&&(e.mouseenter=function(e){isOperateMouse(f)||f.triggerHoverEvent(e,{row:t,rowIndex:i})},e.mouseleave=function(){isOperateMouse(f)||f.clearHoverRow()});var l,n,a=_tools.UtilTools.getRowid(f,t),s=D[a],c=s?s.level:0,d=s?s.seq:-1,u={$table:f,seq:d,rowid:a,fixed:y,type:renderType,level:c,row:t,rowIndex:i,$rowIndex:o},s=!1;_&&(s=-1<k.insertList.indexOf(t)),P.push(p("tr",{class:["vxe-body--row",{"row--stripe":m&&(f.getVTRowIndex(t)+1)%2==0,"is--new":s,"row--new":s&&(L.showStatus||L.showInsertStatus),"row--radio":E.highlight&&f.selectRow===t,"row--checked":R.highlight&&f.isCheckedByCheckboxRow(t)},b?_xeUtils.default.isFunction(b)?b(u):b:""],attrs:{rowid:a},style:T?_xeUtils.default.isFunction(T)?T(u):T:null,key:w||O?a:o,on:e},g.map(function(e,l){return renderColumn(p,h,f,d,a,y,c,t,i,o,r,e,l,g,v)}))),A&&H.length&&-1<H.indexOf(t)&&(O&&(l={paddingLeft:"".concat(c*C.indent+30,"px")}),n=A.showOverflow,u=_xeUtils.default.isUndefined(n)||_xeUtils.default.isNull(n)?S:n,n={$table:f,seq:d,column:A,fixed:y,type:renderType,level:c,row:t,rowIndex:i,$rowIndex:o},P.push(p("tr",{class:"vxe-body--expanded-row",key:"expand_".concat(a),style:T?_xeUtils.default.isFunction(T)?T(n):T:null,on:e},[p("td",{class:["vxe-body--expanded-column",{"fixed--hidden":y&&!Y,"col--ellipsis":u}],attrs:{colspan:g.length}},[p("div",{class:"vxe-body--expanded-cell",style:l},[A.renderData(p,n)])])]))),!O||I||C.transform||!$.length||(n=t[C.children])&&n.length&&-1<$.indexOf(t)&&P.push.apply(P,_toConsumableArray(renderRows(p,h,f,y,n,g)))}),P}function syncBodyScroll(e,l,t){(l||t)&&(l&&((0,_util.removeScrollListener)(l),l.scrollTop=e),t&&((0,_util.removeScrollListener)(t),t.scrollTop=e),clearTimeout(scrollProcessTimeout),scrollProcessTimeout=setTimeout(function(){(0,_util.restoreScrollListener)(l),(0,_util.restoreScrollListener)(t)},300))}var _default={name:"VxeTableBody",props:{tableData:Array,tableColumn:Array,fixedColumn:Array,size:String,fixedType:String},data:function(){return{wheelTime:null,wheelYSize:0,wheelYInterval:0,wheelYTotal:0}},mounted:function(){var e=this.$parent,l=this.$el,t=this.$refs,o=this.fixedType,e=e.elemStore,o="".concat(o||"main","-body-");e["".concat(o,"wrapper")]=l,e["".concat(o,"table")]=t.table,e["".concat(o,"colgroup")]=t.colgroup,e["".concat(o,"list")]=t.tbody,e["".concat(o,"xSpace")]=t.xSpace,e["".concat(o,"ySpace")]=t.ySpace,e["".concat(o,"emptyBlock")]=t.emptyBlock,this.$el.onscroll=this.scrollEvent,this.$el._onscroll=this.scrollEvent},beforeDestroy:function(){clearTimeout(this.wheelTime),this.$el._onscroll=null,this.$el.onscroll=null},destroyed:function(){var e=this.$parent,l=this.fixedType,e=e.elemStore,l="".concat(l||"main","-body-");e["".concat(l,"wrapper")]=null,e["".concat(l,"table")]=null,e["".concat(l,"colgroup")]=null,e["".concat(l,"list")]=null,e["".concat(l,"xSpace")]=null,e["".concat(l,"ySpace")]=null,e["".concat(l,"emptyBlock")]=null},render:function(t){var e=this._e,l=this.$parent,o=this.fixedColumn,r=this.fixedType,i=l.$scopedSlots,n=l.tId,a=l.tableData,s=l.tableColumn,c=l.visibleColumn,d=l.showOverflow,u=l.keyboardConfig,p=l.keyboardOpts,h=l.mergeList,f=l.spanMethod,y=l.scrollXLoad,v=l.scrollYLoad,g=l.isAllOverflow,m=l.emptyOpts,w=l.mouseConfig,x=l.mouseOpts,b=l.sYOpts;return r&&(s=!(y||v||d&&g)||h.length||f||u&&p.isMerge?c:o),m=i.empty?i.empty.call(this,{$table:l},t):(i=(i=m.name?_vXETable.default.renderer.get(m.name):null)?i.renderEmpty:null)?i.call(this,t,m,{$table:l}):l.emptyText||_conf.default.i18n("vxe.table.emptyText"),t("div",{class:["vxe-table--body-wrapper",r?"fixed-".concat(r,"--wrapper"):"body--wrapper"],attrs:{xid:n},on:v&&"wheel"===b.mode?{wheel:this.wheelEvent}:{}},[r?e():t("div",{class:"vxe-body--x-space",ref:"xSpace"}),t("div",{class:"vxe-body--y-space",ref:"ySpace"}),t("table",{class:"vxe-table--body",attrs:{xid:n,cellspacing:0,cellpadding:0,border:0},ref:"table"},[t("colgroup",{ref:"colgroup"},s.map(function(e,l){return t("col",{attrs:{name:e.id},key:l})})),t("tbody",{ref:"tbody"},renderRows(t,this,l,r,a,s))]),t("div",{class:"vxe-table--checkbox-range"}),w&&x.area?t("div",{class:"vxe-table--cell-area"},[t("span",{class:"vxe-table--cell-main-area"},x.extension?[t("span",{class:"vxe-table--cell-main-area-btn",on:{mousedown:function(e){l.triggerCellExtendMousedownEvent(e,{$table:l,fixed:r,type:renderType})}}})]:null),t("span",{class:"vxe-table--cell-copy-area"}),t("span",{class:"vxe-table--cell-extend-area"}),t("span",{class:"vxe-table--cell-multi-area"}),t("span",{class:"vxe-table--cell-active-area"})]):null,r?null:t("div",{class:"vxe-table--empty-block",ref:"emptyBlock"},[t("div",{class:"vxe-table--empty-content"},m)])])},methods:{scrollEvent:function(e){var l=this.$el,t=this.$parent,o=this.fixedType,r=t.$refs,i=t.elemStore,n=t.highlightHoverRow,a=t.scrollXLoad,s=t.scrollYLoad,c=t.lastScrollTop,d=t.lastScrollLeft,u=t.rowOpts,p=r.tableHeader,h=r.tableBody,f=r.leftBody,y=r.rightBody,v=r.tableFooter,g=r.validTip,m=p?p.$el:null,r=v?v.$el:null,p=h.$el,v=f?f.$el:null,h=y?y.$el:null,f=i["main-body-ySpace"],y=i["main-body-xSpace"],i=(s&&f?f:p).clientHeight,f=(a&&y?y:p).clientWidth,y=l.scrollTop,l=p.scrollLeft,d=l!==d,c=y!==c;t.lastScrollTop=y,t.lastScrollLeft=l,t.lastScrollTime=Date.now(),(u.isHover||n)&&t.clearHoverRow(),v&&"left"===o?syncBodyScroll(y=v.scrollTop,p,h):h&&"right"===o?syncBodyScroll(y=h.scrollTop,p,v):(d&&(m&&(m.scrollLeft=p.scrollLeft),r&&(r.scrollLeft=p.scrollLeft)),(v||h)&&(t.checkScrolling(),c&&syncBodyScroll(y,v,h))),a&&d&&t.triggerScrollXEvent(e),s&&c&&t.triggerScrollYEvent(e),d&&g&&g.visible&&g.updatePlacement(),t.emitEvent("scroll",{type:renderType,fixed:o,scrollTop:y,scrollLeft:l,scrollHeight:p.scrollHeight,scrollWidth:p.scrollWidth,bodyHeight:i,bodyWidth:f,isX:d,isY:c},e)},handleWheel:function(a,s,e,c,d){var u=this,p=this.$parent,l=p.$refs,t=p.elemStore,o=p.scrollYLoad,r=p.scrollXLoad,i=l.tableBody,n=l.leftBody,l=l.rightBody,h=i.$el,f=n?n.$el:null,y=l?l.$el:null,n=this.isPrevWheelTop===s?Math.max(0,this.wheelYSize-this.wheelYTotal):0,l=t["main-body-ySpace"],t=t["main-body-xSpace"],v=(o&&l?l:h).clientHeight,g=(r&&t?t:h).clientWidth;this.isPrevWheelTop=s,this.wheelYSize=Math.abs(s?e-n:e+n),this.wheelYInterval=0,this.wheelYTotal=0,clearTimeout(this.wheelTime),function e(){var l,t,o=u.fixedType,r=u.wheelYTotal,i=u.wheelYSize,n=u.wheelYInterval;r<i&&(i<(r+=n=Math.max(5,Math.floor(1.5*n)))&&(n-=r-i),t=h.scrollTop,l=h.clientHeight,i=h.scrollHeight,h.scrollTop=t=t+n*(s?-1:1),f&&(f.scrollTop=t),y&&(y.scrollTop=t),(s?t<i-l:0<=t)&&(u.wheelTime=setTimeout(e,10)),u.wheelYTotal=r,u.wheelYInterval=n,p.emitEvent("scroll",{type:renderType,fixed:o,scrollTop:h.scrollTop,scrollLeft:h.scrollLeft,scrollHeight:h.scrollHeight,scrollWidth:h.scrollWidth,bodyHeight:v,bodyWidth:g,isX:c,isY:d},a))}()},wheelEvent:function(e){var l=e.deltaY,t=e.deltaX,o=this.$el,r=this.$parent,i=r.$refs,n=r.highlightHoverRow,a=r.scrollYLoad,s=r.lastScrollTop,c=r.lastScrollLeft,d=r.rowOpts,u=i.tableBody.$el,i=_dom.browse.firefox?40*l:l,l=_dom.browse.firefox?40*t:t,t=i<0;(t?o.scrollTop<=0:o.scrollTop>=o.scrollHeight-o.clientHeight)||(o=o.scrollTop+i,c=(l=u.scrollLeft+l)!==c,(s=o!==s)&&(e.preventDefault(),r.lastScrollTop=o,r.lastScrollLeft=l,r.lastScrollTime=Date.now(),(d.isHover||n)&&r.clearHoverRow(),this.handleWheel(e,t,i,c,s),a&&r.triggerScrollYEvent(e)))}}};exports.default=_default;
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var _xeUtils=_interopRequireDefault(require("xe-utils")),_conf=_interopRequireDefault(require("../../v-x-e-table/src/conf")),_vXETable=_interopRequireDefault(require("../../v-x-e-table")),_tools=require("../../tools"),_util=require("./util"),_dom=require("../../tools/src/dom");function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function _defineProperty(e,l,t){return l in e?Object.defineProperty(e,l,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[l]=t,e}function _toConsumableArray(e){return _arrayWithoutHoles(e)||_iterableToArray(e)||_unsupportedIterableToArray(e)||_nonIterableSpread()}function _nonIterableSpread(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _unsupportedIterableToArray(e,l){if(e){if("string"==typeof e)return _arrayLikeToArray(e,l);var t=Object.prototype.toString.call(e).slice(8,-1);return"Map"===(t="Object"===t&&e.constructor?e.constructor.name:t)||"Set"===t?Array.from(e):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?_arrayLikeToArray(e,l):void 0}}function _iterableToArray(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function _arrayWithoutHoles(e){if(Array.isArray(e))return _arrayLikeToArray(e)}function _arrayLikeToArray(e,l){(null==l||l>e.length)&&(l=e.length);for(var t=0,o=new Array(l);t<l;t++)o[t]=e[t];return o}var scrollProcessTimeout,renderType="body";function isOperateMouse(e){return e._isResize||e.lastScrollTime&&Date.now()<e.lastScrollTime+e.delayHover}function renderLine(e,l,t,o){var r=o.row,i=o.column,n=t.treeOpts,s=t.treeConfig,a=t.fullAllDataRowIdData,c=i.slots,d=i.treeNode,u=a[_tools.UtilTools.getRowid(t,r)],i=0,a=0,r=[];return u&&(i=u.level,a=u._index,r=u.items),c&&c.line?t.callSlot(c.line,o,e):s&&d&&n.line?[e("div",{class:"vxe-tree--line-wrapper"},[e("div",{class:"vxe-tree--line",style:{height:"".concat((0,_util.calcTreeLine)(o,r,a),"px"),left:"".concat(i*n.indent+(i?2-(0,_util.getOffsetSize)(t):0)+16,"px")}})])]:[]}function renderColumn(e,l,t,o,r,i,n,s,a,c,d,u,p,h,f){var y,v=t.$listeners,g=t.afterFullData,m=t.tableData,w=t.height,x=t.columnKey,b=t.overflowX,T=t.sYOpts,_=t.scrollXLoad,S=t.scrollYLoad,O=t.highlightCurrentRow,$=t.showOverflow,C=t.isAllOverflow,L=t.align,I=t.currentColumn,k=t.cellClassName,H=t.cellStyle,E=t.mergeList,R=t.spanMethod,A=t.radioOpts,Y=t.checkboxOpts,B=t.expandOpts,D=t.treeOpts,P=t.tooltipOpts,M=t.mouseConfig,U=t.editConfig,W=t.editOpts,q=t.editRules,X=t.validOpts,j=t.editStore,N=t.validStore,z=t.tooltipConfig,F=t.rowOpts,V=u.type,K=u.cellRender,G=u.editRender,J=u.align,Q=u.showOverflow,Z=u.className,ee=u.treeNode,le=j.actived,te=T.rHeight,oe=F.height,re=P.showAll||P.enabled,ie=t.getColumnIndex(u),ne=t.getVTColumnIndex(u),j=(0,_tools.isEnableConf)(G),T=i?u.fixed!==i:u.fixed&&b,P=_xeUtils.default.isUndefined(Q)||_xeUtils.default.isNull(Q)?$:Q,b="ellipsis"===P,se="title"===P,ae=!0===P||"tooltip"===P,Q=se||ae||b,P={},J=J||L,L=N.row===s&&N.column===u,q=q&&X.showMessage&&("default"===X.message?w||1<m.length:"inline"===X.message),w={colid:u.id},ce=v["cell-mouseenter"],de=v["cell-mouseleave"],X=G&&U&&"dblclick"===W.trigger,ue={$table:t,seq:o,rowid:r,row:s,rowIndex:a,$rowIndex:c,_rowIndex:d,column:u,columnIndex:ie,$columnIndex:p,_columnIndex:ne,fixed:i,type:renderType,isHidden:T,level:n,visibleData:g,data:m,items:f};if(!_&&!S||Q||(b=Q=!0),(se||ae||re||ce||z)&&(P.mouseenter=function(e){isOperateMouse(t)||(se?_tools.DomTools.updateCellTitle(e.currentTarget,u):(ae||re)&&t.triggerBodyTooltipEvent(e,ue),ce&&t.emitEvent("cell-mouseenter",Object.assign({cell:e.currentTarget},ue),e))}),(ae||re||de||z)&&(P.mouseleave=function(e){isOperateMouse(t)||((ae||re)&&t.handleTargetLeaveEvent(e),de&&t.emitEvent("cell-mouseleave",Object.assign({cell:e.currentTarget},ue),e))}),(Y.range||M)&&(P.mousedown=function(e){t.triggerCellMousedownEvent(e,ue)}),(F.isCurrent||O||v["cell-click"]||G&&U||"row"===B.trigger||"cell"===B.trigger||"row"===A.trigger||"radio"===u.type&&"cell"===A.trigger||"row"===Y.trigger||"checkbox"===u.type&&"cell"===Y.trigger||"row"===D.trigger||u.treeNode&&"cell"===D.trigger)&&(P.click=function(e){t.triggerCellClickEvent(e,ue)}),(X||v["cell-dblclick"])&&(P.dblclick=function(e){t.triggerCellDblclickEvent(e,ue)}),E.length){d=(0,_util.mergeBodyMethod)(E,d,ne);if(d){var ne=d.rowspan,pe=d.colspan;if(!ne||!pe)return null;1<ne&&(w.rowspan=ne),1<pe&&(w.colspan=pe)}}else if(R){pe=R(ue)||{},R=pe.rowspan,R=void 0===R?1:R,pe=pe.colspan,pe=void 0===pe?1:pe;if(!R||!pe)return null;1<R&&(w.rowspan=R),1<pe&&(w.colspan=pe)}!(T=T&&E&&(1<w.colspan||1<w.rowspan)?!1:T)&&U&&(G||K)&&(W.showStatus||W.showUpdateStatus)&&(y=t.isUpdateByRow(s,u.property));K=[];return T&&$&&C?K.push(e("div",{class:["vxe-cell",{"c--title":se,"c--tooltip":ae,"c--ellipsis":b}],style:{maxHeight:Q&&(te||oe)?"".concat(te||oe,"px"):""}})):(K.push.apply(K,_toConsumableArray(renderLine(e,l,t,ue)).concat([e("div",{class:["vxe-cell",{"c--title":se,"c--tooltip":ae,"c--ellipsis":b}],style:{maxHeight:Q&&(te||oe)?"".concat(te||oe,"px"):""},attrs:{title:se?t.getCellLabel(s,u):null}},u.renderCell(e,ue))])),q&&L&&K.push(e("div",{class:"vxe-cell--valid",style:N.rule&&N.rule.maxWidth?{width:"".concat(N.rule.maxWidth,"px")}:null},[e("span",{class:"vxe-cell--valid-msg"},N.content)]))),e("td",{class:["vxe-body--column",u.id,(_defineProperty(e={},"col--".concat(J),J),_defineProperty(e,"col--".concat(V),V),_defineProperty(e,"col--last",p===h.length-1),_defineProperty(e,"col--tree-node",ee),_defineProperty(e,"col--edit",j),_defineProperty(e,"col--ellipsis",Q),_defineProperty(e,"fixed--hidden",T),_defineProperty(e,"col--dirty",y),_defineProperty(e,"col--actived",U&&j&&le.row===s&&(le.column===u||"row"===W.mode)),_defineProperty(e,"col--valid-error",L),_defineProperty(e,"col--current",I===u),e),_tools.UtilTools.getClass(Z,ue),_tools.UtilTools.getClass(k,ue)],key:x?u.id:p,attrs:w,style:Object.assign({height:Q&&(te||oe)?"".concat(te||oe,"px"):""},H?_xeUtils.default.isFunction(H)?H(ue):H:null),on:P},K)}function renderRows(p,h,f,y,v,g){var m=f.stripe,w=f.rowKey,x=f.highlightHoverRow,b=f.rowClassName,T=f.rowStyle,_=f.editConfig,S=f.showOverflow,O=f.treeConfig,$=f.treeOpts,C=f.editOpts,L=f.treeExpandeds,I=f.scrollYLoad,k=f.editStore,H=f.rowExpandeds,E=f.radioOpts,R=f.checkboxOpts,A=f.expandColumn,Y=f.hasFixedColumn,B=f.fullAllDataRowIdData,D=f.rowOpts,P=[];return v.forEach(function(t,o){var e={},r=f.getVTRowIndex(t),i=f.getRowIndex(t);(D.isHover||x)&&(e.mouseenter=function(e){isOperateMouse(f)||f.triggerHoverEvent(e,{row:t,rowIndex:i})},e.mouseleave=function(){isOperateMouse(f)||f.clearHoverRow()});var l,n,s=_tools.UtilTools.getRowid(f,t),a=B[s],c=a?a.level:0,d=a?a.seq:-1,u={$table:f,seq:d,rowid:s,fixed:y,type:renderType,level:c,row:t,rowIndex:i,$rowIndex:o},a=!1;_&&(a=-1<k.insertList.indexOf(t)),P.push(p("tr",{class:["vxe-body--row",{"row--stripe":m&&(f.getVTRowIndex(t)+1)%2==0,"is--new":a,"row--new":a&&(C.showStatus||C.showInsertStatus),"row--radio":E.highlight&&f.selectRow===t,"row--checked":R.highlight&&f.isCheckedByCheckboxRow(t)},b?_xeUtils.default.isFunction(b)?b(u):b:""],attrs:{rowid:s},style:T?_xeUtils.default.isFunction(T)?T(u):T:null,key:w||O?s:o,on:e},g.map(function(e,l){return renderColumn(p,h,f,d,s,y,c,t,i,o,r,e,l,g,v)}))),A&&H.length&&-1<H.indexOf(t)&&(O&&(l={paddingLeft:"".concat(c*$.indent+30,"px")}),n=A.showOverflow,u=_xeUtils.default.isUndefined(n)||_xeUtils.default.isNull(n)?S:n,n={$table:f,seq:d,column:A,fixed:y,type:renderType,level:c,row:t,rowIndex:i,$rowIndex:o},P.push(p("tr",{class:"vxe-body--expanded-row",key:"expand_".concat(s),style:T?_xeUtils.default.isFunction(T)?T(n):T:null,on:e},[p("td",{class:["vxe-body--expanded-column",{"fixed--hidden":y&&!Y,"col--ellipsis":u}],attrs:{colspan:g.length}},[p("div",{class:"vxe-body--expanded-cell",style:l},[A.renderData(p,n)])])]))),!O||I||$.transform||!L.length||(n=t[$.children])&&n.length&&-1<L.indexOf(t)&&P.push.apply(P,_toConsumableArray(renderRows(p,h,f,y,n,g)))}),P}function syncBodyScroll(r,i,e,n,s){(n||s)&&(n&&((0,_util.removeScrollListener)(n),n.scrollTop=e),s&&((0,_util.removeScrollListener)(s),s.scrollTop=e),clearTimeout(scrollProcessTimeout),scrollProcessTimeout=setTimeout(function(){var e=r.$refs,l=e.tableBody,t=e.leftBody,o=e.rightBody,e=l.$el,l=t?t.$el:null,t=o?o.$el:null;(0,_util.restoreScrollListener)(n),(0,_util.restoreScrollListener)(s);o=e.scrollTop;"left"===i?l&&(o=l.scrollTop):"right"===i&&t&&(o=t.scrollTop),(0,_dom.setScrollTop)(e,o),(0,_dom.setScrollTop)(l,o),(0,_dom.setScrollTop)(t,o)},300))}var _default={name:"VxeTableBody",props:{tableData:Array,tableColumn:Array,fixedColumn:Array,size:String,fixedType:String},data:function(){return{wheelTime:null,wheelYSize:0,wheelYInterval:0,wheelYTotal:0}},mounted:function(){var e=this.$parent,l=this.$el,t=this.$refs,o=this.fixedType,e=e.elemStore,o="".concat(o||"main","-body-");e["".concat(o,"wrapper")]=l,e["".concat(o,"table")]=t.table,e["".concat(o,"colgroup")]=t.colgroup,e["".concat(o,"list")]=t.tbody,e["".concat(o,"xSpace")]=t.xSpace,e["".concat(o,"ySpace")]=t.ySpace,e["".concat(o,"emptyBlock")]=t.emptyBlock,this.$el.onscroll=this.scrollEvent,this.$el._onscroll=this.scrollEvent},beforeDestroy:function(){clearTimeout(this.wheelTime),this.$el._onscroll=null,this.$el.onscroll=null},destroyed:function(){var e=this.$parent,l=this.fixedType,e=e.elemStore,l="".concat(l||"main","-body-");e["".concat(l,"wrapper")]=null,e["".concat(l,"table")]=null,e["".concat(l,"colgroup")]=null,e["".concat(l,"list")]=null,e["".concat(l,"xSpace")]=null,e["".concat(l,"ySpace")]=null,e["".concat(l,"emptyBlock")]=null},render:function(t){var e=this._e,l=this.$parent,o=this.fixedColumn,r=this.fixedType,i=l.$scopedSlots,n=l.tId,s=l.tableData,a=l.tableColumn,c=l.visibleColumn,d=l.showOverflow,u=l.keyboardConfig,p=l.keyboardOpts,h=l.mergeList,f=l.spanMethod,y=l.scrollXLoad,v=l.scrollYLoad,g=l.isAllOverflow,m=l.emptyOpts,w=l.mouseConfig,x=l.mouseOpts,b=l.sYOpts;return r&&(a=!(y||v||d&&g)||h.length||f||u&&p.isMerge?c:o),m=i.empty?i.empty.call(this,{$table:l},t):(i=(i=m.name?_vXETable.default.renderer.get(m.name):null)?i.renderEmpty:null)?i.call(this,t,m,{$table:l}):l.emptyText||_conf.default.i18n("vxe.table.emptyText"),t("div",{class:["vxe-table--body-wrapper",r?"fixed-".concat(r,"--wrapper"):"body--wrapper"],attrs:{xid:n},on:v&&"wheel"===b.mode?{wheel:this.wheelEvent}:{}},[r?e():t("div",{class:"vxe-body--x-space",ref:"xSpace"}),t("div",{class:"vxe-body--y-space",ref:"ySpace"}),t("table",{class:"vxe-table--body",attrs:{xid:n,cellspacing:0,cellpadding:0,border:0},ref:"table"},[t("colgroup",{ref:"colgroup"},a.map(function(e,l){return t("col",{attrs:{name:e.id},key:l})})),t("tbody",{ref:"tbody"},renderRows(t,this,l,r,s,a))]),t("div",{class:"vxe-table--checkbox-range"}),w&&x.area?t("div",{class:"vxe-table--cell-area"},[t("span",{class:"vxe-table--cell-main-area"},x.extension?[t("span",{class:"vxe-table--cell-main-area-btn",on:{mousedown:function(e){l.triggerCellExtendMousedownEvent(e,{$table:l,fixed:r,type:renderType})}}})]:null),t("span",{class:"vxe-table--cell-copy-area"}),t("span",{class:"vxe-table--cell-extend-area"}),t("span",{class:"vxe-table--cell-multi-area"}),t("span",{class:"vxe-table--cell-active-area"})]):null,r?null:t("div",{class:"vxe-table--empty-block",ref:"emptyBlock"},[t("div",{class:"vxe-table--empty-content"},m)])])},methods:{scrollEvent:function(e){var l=this.$el,t=this.$parent,o=this.fixedType,r=t.$refs,i=t.elemStore,n=t.highlightHoverRow,s=t.scrollXLoad,a=t.scrollYLoad,c=t.lastScrollTop,d=t.lastScrollLeft,u=t.rowOpts,p=r.tableHeader,h=r.tableBody,f=r.leftBody,y=r.rightBody,v=r.tableFooter,g=r.validTip,m=p?p.$el:null,r=v?v.$el:null,p=h.$el,v=f?f.$el:null,h=y?y.$el:null,f=i["main-body-ySpace"],y=i["main-body-xSpace"],i=(a&&f?f:p).clientHeight,f=(s&&y?y:p).clientWidth,y=l.scrollTop,l=p.scrollLeft,d=l!==d,c=y!==c;t.lastScrollTop=y,t.lastScrollLeft=l,t.lastScrollTime=Date.now(),(u.isHover||n)&&t.clearHoverRow(),v&&"left"===o?syncBodyScroll(t,o,y=v.scrollTop,p,h):h&&"right"===o?syncBodyScroll(t,o,y=h.scrollTop,p,v):(d&&(m&&(m.scrollLeft=p.scrollLeft),r&&(r.scrollLeft=p.scrollLeft)),(v||h)&&(t.checkScrolling(),c&&syncBodyScroll(t,o,y,v,h))),s&&d&&t.triggerScrollXEvent(e),a&&c&&t.triggerScrollYEvent(e),d&&g&&g.visible&&g.updatePlacement(),t.emitEvent("scroll",{type:renderType,fixed:o,scrollTop:y,scrollLeft:l,scrollHeight:p.scrollHeight,scrollWidth:p.scrollWidth,bodyHeight:i,bodyWidth:f,isX:d,isY:c},e)},handleWheel:function(s,a,e,c,d){var u=this,p=this.$parent,l=p.$refs,t=p.elemStore,o=p.scrollYLoad,r=p.scrollXLoad,i=l.tableBody,n=l.leftBody,l=l.rightBody,h=i.$el,f=n?n.$el:null,y=l?l.$el:null,n=this.isPrevWheelTop===a?Math.max(0,this.wheelYSize-this.wheelYTotal):0,l=t["main-body-ySpace"],t=t["main-body-xSpace"],v=(o&&l?l:h).clientHeight,g=(r&&t?t:h).clientWidth;this.isPrevWheelTop=a,this.wheelYSize=Math.abs(a?e-n:e+n),this.wheelYInterval=0,this.wheelYTotal=0,clearTimeout(this.wheelTime),function e(){var l,t,o=u.fixedType,r=u.wheelYTotal,i=u.wheelYSize,n=u.wheelYInterval;r<i&&(i<(r+=n=Math.max(5,Math.floor(1.5*n)))&&(n-=r-i),t=h.scrollTop,l=h.clientHeight,i=h.scrollHeight,h.scrollTop=t=t+n*(a?-1:1),f&&(f.scrollTop=t),y&&(y.scrollTop=t),(a?t<i-l:0<=t)&&(u.wheelTime=setTimeout(e,10)),u.wheelYTotal=r,u.wheelYInterval=n,p.emitEvent("scroll",{type:renderType,fixed:o,scrollTop:h.scrollTop,scrollLeft:h.scrollLeft,scrollHeight:h.scrollHeight,scrollWidth:h.scrollWidth,bodyHeight:v,bodyWidth:g,isX:c,isY:d},s))}()},wheelEvent:function(e){var l=e.deltaY,t=e.deltaX,o=this.$el,r=this.$parent,i=r.$refs,n=r.highlightHoverRow,s=r.scrollYLoad,a=r.lastScrollTop,c=r.lastScrollLeft,d=r.rowOpts,u=i.tableBody.$el,i=l,l=i<0;(l?o.scrollTop<=0:o.scrollTop>=o.scrollHeight-o.clientHeight)||(o=o.scrollTop+i,c=(t=u.scrollLeft+t)!==c,(a=o!==a)&&(e.preventDefault(),r.lastScrollTop=o,r.lastScrollLeft=t,r.lastScrollTime=Date.now(),(d.isHover||n)&&r.clearHoverRow(),this.handleWheel(e,l,i,c,a),s&&r.triggerScrollYEvent(e)))}}};exports.default=_default;