vxe-table 3.5.5-beta.0 → 3.5.7-beta.1

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.
@@ -2367,16 +2367,21 @@ var _default2 = {
2367
2367
  _this6.visiblePanel = true;
2368
2368
  }, 10);
2369
2369
  this.updateZindex();
2370
- this.updatePlacement();
2370
+ return this.updatePlacement();
2371
2371
  }
2372
+
2373
+ return this.$nextTick();
2372
2374
  },
2373
2375
  hidePanel: function hidePanel() {
2374
2376
  var _this7 = this;
2375
2377
 
2376
- this.visiblePanel = false;
2377
- this.hidePanelTimeout = setTimeout(function () {
2378
- _this7.animatVisible = false;
2379
- }, 350);
2378
+ return new Promise(function (resolve) {
2379
+ _this7.visiblePanel = false;
2380
+ _this7.hidePanelTimeout = setTimeout(function () {
2381
+ _this7.animatVisible = false;
2382
+ resolve();
2383
+ }, 350);
2384
+ });
2380
2385
  },
2381
2386
  updatePlacement: function updatePlacement() {
2382
2387
  var _this8 = this;
@@ -1 +1 @@
1
- "use strict";function _typeof(e){return(_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}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")),_size=_interopRequireDefault(require("../../mixins/size")),_utils=_interopRequireWildcard(require("../../tools/utils")),_dom=_interopRequireDefault(require("../../tools/dom")),_event=require("../../tools/event"),_date=require("./date"),_number=require("./number"),_log=require("../../tools/log");function _getRequireWildcardCache(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,i=new WeakMap;return(_getRequireWildcardCache=function(e){return e?i:t})(e)}function _interopRequireWildcard(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!==_typeof(e)&&"function"!=typeof e)return{default:e};t=_getRequireWildcardCache(t);if(t&&t.has(e))return t.get(e);var i,a,n={},s=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(i in e)"default"!==i&&Object.prototype.hasOwnProperty.call(e,i)&&((a=s?Object.getOwnPropertyDescriptor(e,i):null)&&(a.get||a.set)?Object.defineProperty(n,i,a):n[i]=e[i]);return n.default=e,t&&t.set(e,n),n}function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function ownKeys(t,e){var i,a=Object.keys(t);return Object.getOwnPropertySymbols&&(i=Object.getOwnPropertySymbols(t),e&&(i=i.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),a.push.apply(a,i)),a}function _objectSpread(t){for(var e=1;e<arguments.length;e++){var i=null!=arguments[e]?arguments[e]:{};e%2?ownKeys(Object(i),!0).forEach(function(e){_defineProperty(t,e,i[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):ownKeys(Object(i)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(i,e))})}return t}function _defineProperty(e,t,i){return t in e?Object.defineProperty(e,t,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[t]=i,e}var yearSize=12,monthSize=20,quarterSize=8;function getNumberValue(e,t){var i=e.type,a=e.exponential,n=e.digitsValue,e=e.inpMaxlength,n="float"===i?(0,_number.toFloatValueFixed)(t,n):_xeUtils.default.toValueString(t);return!a||t!==n&&_xeUtils.default.toValueString(t).toLowerCase()!==_xeUtils.default.toNumber(n).toExponential()?n.slice(0,e):t}function renderDateLabel(t,e,i,a){var n=e.festivalMethod;if(n){n=n(_objectSpread({$input:e,type:e.datePanelType,viewType:e.datePanelType},i)),e=n?_xeUtils.default.isString(n)?{label:n}:n:{},i=e.extra?_xeUtils.default.isString(e.extra)?{label:e.extra}:e.extra:null,n=[t("span",{class:["vxe-input--date-label",{"is-notice":e.notice}]},i&&i.label?[t("span",a),t("span",{class:["vxe-input--date-label--extra",i.important?"is-important":"",i.className],style:i.style},_xeUtils.default.toValueString(i.label))]:a)],i=e.label;return i&&(i=_xeUtils.default.toValueString(i).split(","),n.push(t("span",{class:["vxe-input--date-festival",e.important?"is-important":"",e.className],style:e.style},[1<i.length?t("span",{class:["vxe-input--date-festival--overlap","overlap--".concat(i.length)]},i.map(function(e){return t("span",e.substring(0,3))})):t("span",{class:"vxe-input--date-festival--label"},i[0].substring(0,3))]))),n}return a}function isDateDisabled(e,t){var i=e.disabledMethod;return i&&i({$input:e,type:e.datePanelType,viewType:e.datePanelType,date:t.date})}function renderDateDayTable(i,a){var e=a.datePanelType,n=a.dateValue,s=a.datePanelValue,t=a.dateHeaders,r=a.dayDatas,l=a.multiple,u=a.dateListValue,o="yyyy-MM-dd";return[i("table",{class:"vxe-input--date-".concat(e,"-view"),attrs:{cellspacing:0,cellpadding:0,border:0}},[i("thead",[i("tr",t.map(function(e){return i("th",e.label)}))]),i("tbody",r.map(function(e){return i("tr",e.map(function(t){return i("td",{class:{"is--prev":t.isPrev,"is--current":t.isCurrent,"is--now":t.isNow,"is--next":t.isNext,"is--disabled":isDateDisabled(a,t),"is--selected":l?u.some(function(e){return _xeUtils.default.isDateSame(e,t.date,o)}):_xeUtils.default.isDateSame(n,t.date,o),"is--hover":_xeUtils.default.isDateSame(s,t.date,o)},on:{click:function(){return a.dateSelectEvent(t)},mouseenter:function(){return a.dateMouseenterEvent(t)}}},renderDateLabel(i,a,t,t.label))}))}))])]}function renderDateWeekTable(a,n){var e=n.datePanelType,s=n.dateValue,r=n.datePanelValue,t=n.weekHeaders,i=n.weekDates,l=n.multiple,u=n.dateListValue,o="yyyyMMdd";return[a("table",{class:"vxe-input--date-".concat(e,"-view"),attrs:{cellspacing:0,cellpadding:0,border:0}},[a("thead",[a("tr",t.map(function(e){return a("th",e.label)}))]),a("tbody",i.map(function(e){var t=l?e.some(function(t){return u.some(function(e){return _xeUtils.default.isDateSame(e,t.date,o)})}):e.some(function(e){return _xeUtils.default.isDateSame(s,e.date,o)}),i=e.some(function(e){return _xeUtils.default.isDateSame(r,e.date,o)});return a("tr",e.map(function(e){return a("td",{class:{"is--prev":e.isPrev,"is--current":e.isCurrent,"is--now":e.isNow,"is--next":e.isNext,"is--disabled":isDateDisabled(n,e),"is--selected":t,"is--hover":i},on:{click:function(){return n.dateSelectEvent(e)},mouseenter:function(){return n.dateMouseenterEvent(e)}}},renderDateLabel(a,n,e,e.label))}))}))])]}function renderDateMonthTable(i,a){var n=a.dateValue,e=a.datePanelType,t=a.monthDatas,s=a.datePanelValue,r=a.multiple,l=a.dateListValue,u="yyyyMM";return[i("table",{class:"vxe-input--date-".concat(e,"-view"),attrs:{cellspacing:0,cellpadding:0,border:0}},[i("tbody",t.map(function(e){return i("tr",e.map(function(t){return i("td",{class:{"is--prev":t.isPrev,"is--current":t.isCurrent,"is--now":t.isNow,"is--next":t.isNext,"is--disabled":isDateDisabled(a,t),"is--selected":r?l.some(function(e){return _xeUtils.default.isDateSame(e,t.date,u)}):_xeUtils.default.isDateSame(n,t.date,u),"is--hover":_xeUtils.default.isDateSame(s,t.date,u)},on:{click:function(){return a.dateSelectEvent(t)},mouseenter:function(){return a.dateMouseenterEvent(t)}}},renderDateLabel(i,a,t,_conf.default.i18n("vxe.input.date.months.m".concat(t.month))))}))}))])]}function renderDateQuarterTable(i,a){var n=a.dateValue,e=a.datePanelType,t=a.quarterDatas,s=a.datePanelValue,r=a.multiple,l=a.dateListValue,u="yyyyq";return[i("table",{class:"vxe-input--date-".concat(e,"-view"),attrs:{cellspacing:0,cellpadding:0,border:0}},[i("tbody",t.map(function(e){return i("tr",e.map(function(t){return i("td",{class:{"is--prev":t.isPrev,"is--current":t.isCurrent,"is--now":t.isNow,"is--next":t.isNext,"is--disabled":isDateDisabled(a,t),"is--selected":r?l.some(function(e){return _xeUtils.default.isDateSame(e,t.date,u)}):_xeUtils.default.isDateSame(n,t.date,u),"is--hover":_xeUtils.default.isDateSame(s,t.date,u)},on:{click:function(){return a.dateSelectEvent(t)},mouseenter:function(){return a.dateMouseenterEvent(t)}}},renderDateLabel(i,a,t,_conf.default.i18n("vxe.input.date.quarters.q".concat(t.quarter))))}))}))])]}function renderDateYearTable(i,a){var n=a.dateValue,e=a.datePanelType,t=a.yearDatas,s=a.datePanelValue,r=a.multiple,l=a.dateListValue,u="yyyy";return[i("table",{class:"vxe-input--date-".concat(e,"-view"),attrs:{cellspacing:0,cellpadding:0,border:0}},[i("tbody",t.map(function(e){return i("tr",e.map(function(t){return i("td",{class:{"is--prev":t.isPrev,"is--current":t.isCurrent,"is--now":t.isNow,"is--next":t.isNext,"is--disabled":isDateDisabled(t),"is--selected":r?l.some(function(e){return _xeUtils.default.isDateSame(e,t.date,u)}):_xeUtils.default.isDateSame(n,t.date,u),"is--hover":_xeUtils.default.isDateSame(s,t.date,u)},on:{click:function(){return a.dateSelectEvent(t)},mouseenter:function(){return a.dateMouseenterEvent(t)}}},renderDateLabel(i,a,t,t.year))}))}))])]}function renderDateTable(e,t){switch(t.datePanelType){case"week":return renderDateWeekTable(e,t);case"month":return renderDateMonthTable(e,t);case"quarter":return renderDateQuarterTable(e,t);case"year":return renderDateYearTable(e,t)}return renderDateDayTable(e,t)}function renderDatePanel(e,t){var i=t.datePanelType,a=t.selectDatePanelLabel,n=t.isDisabledPrevDateBtn,s=t.isDisabledNextDateBtn,r=t.multiple,l=t.supportMultiples;return[e("div",{class:"vxe-input--date-picker-header"},[e("div",{class:"vxe-input--date-picker-type-wrapper"},[e("span","year"===i?{class:"vxe-input--date-picker-label"}:{class:"vxe-input--date-picker-btn",on:{click:t.dateToggleTypeEvent}},a)]),e("div",{class:"vxe-input--date-picker-btn-wrapper"},[e("span",{class:["vxe-input--date-picker-btn vxe-input--date-picker-prev-btn",{"is--disabled":n}],on:{click:t.datePrevEvent}},[e("i",{class:"vxe-icon--caret-left"})]),e("span",{class:"vxe-input--date-picker-btn vxe-input--date-picker-current-btn",on:{click:t.dateTodayMonthEvent}},[e("i",{class:"vxe-icon--dot"})]),e("span",{class:["vxe-input--date-picker-btn vxe-input--date-picker-next-btn",{"is--disabled":s}],on:{click:t.dateNextEvent}},[e("i",{class:"vxe-icon--caret-right"})]),r&&l?e("span",{class:"vxe-input--date-picker-btn vxe-input--date-picker-confirm-btn"},[e("button",{class:"vxe-input--date-picker-confirm",attrs:{type:"button"},on:{click:t.dateConfirmEvent}},_conf.default.i18n("vxe.button.confirm"))]):null])]),e("div",{class:"vxe-input--date-picker-body"},renderDateTable(e,t))]}function renderTimePanel(i,a){var e=a.dateTimeLabel,n=a.datetimePanelValue,t=a.hourList,s=a.minuteList,r=a.secondList;return[i("div",{class:"vxe-input--time-picker-header"},[i("span",{class:"vxe-input--time-picker-title"},e),i("button",{class:"vxe-input--time-picker-confirm",attrs:{type:"button"},on:{click:a.dateConfirmEvent}},_conf.default.i18n("vxe.button.confirm"))]),i("div",{ref:"timeBody",class:"vxe-input--time-picker-body"},[i("ul",{class:"vxe-input--time-picker-hour-list"},t.map(function(t,e){return i("li",{key:e,class:{"is--selected":n&&n.getHours()===t.value},on:{click:function(e){return a.dateHourEvent(e,t)}}},t.label)})),i("ul",{class:"vxe-input--time-picker-minute-list"},s.map(function(t,e){return i("li",{key:e,class:{"is--selected":n&&n.getMinutes()===t.value},on:{click:function(e){return a.dateMinuteEvent(e,t)}}},t.label)})),i("ul",{class:"vxe-input--time-picker-second-list"},r.map(function(t,e){return i("li",{key:e,class:{"is--selected":n&&n.getSeconds()===t.value},on:{click:function(e){return a.dateSecondEvent(e,t)}}},t.label)}))])]}function renderPanel(e,t){var i=t.type,a=t.vSize,n=t.isDatePickerType,s=t.transfer,r=t.animatVisible,l=t.visiblePanel,u=t.panelPlacement,o=t.panelStyle,d=[];return n?("datetime"===i?d.push(e("div",{class:"vxe-input--panel-layout-wrapper"},[e("div",{class:"vxe-input--panel-left-wrapper"},renderDatePanel(e,t)),e("div",{class:"vxe-input--panel-right-wrapper"},renderTimePanel(e,t))])):"time"===i?d.push(e("div",{class:"vxe-input--panel-wrapper"},renderTimePanel(e,t))):d.push(e("div",{class:"vxe-input--panel-wrapper"},renderDatePanel(e,t))),e("div",{ref:"panel",class:["vxe-table--ignore-clear vxe-input--panel","type--".concat(i),(_defineProperty(i={},"size--".concat(a),a),_defineProperty(i,"is--transfer",s),_defineProperty(i,"animat--leave",r),_defineProperty(i,"animat--enter",l),i)],attrs:{placement:u},style:o},d)):null}function renderNumberIcon(e,t){return e("span",{class:"vxe-input--number-suffix"},[e("span",{class:"vxe-input--number-prev is--prev",on:{mousedown:t.numberMousedownEvent,mouseup:t.numberStopDown,mouseleave:t.numberStopDown}},[e("i",{class:["vxe-input--number-prev-icon",_conf.default.icon.INPUT_PREV_NUM]})]),e("span",{class:"vxe-input--number-next is--next",on:{mousedown:t.numberMousedownEvent,mouseup:t.numberStopDown,mouseleave:t.numberStopDown}},[e("i",{class:["vxe-input--number-next-icon",_conf.default.icon.INPUT_NEXT_NUM]})])])}function renderDatePickerIcon(e,t){return e("span",{class:"vxe-input--date-picker-suffix",on:{click:t.datePickerOpenEvent}},[e("i",{class:["vxe-input--date-picker-icon",_conf.default.icon.INPUT_DATE]})])}function renderSearchIcon(e,t){return e("span",{class:"vxe-input--search-suffix",on:{click:t.searchEvent}},[e("i",{class:["vxe-input--search-icon",_conf.default.icon.INPUT_SEARCH]})])}function renderPasswordIcon(e,t){var i=t.showPwd;return e("span",{class:"vxe-input--password-suffix",on:{click:t.passwordToggleEvent}},[e("i",{class:["vxe-input--password-icon",i?_conf.default.icon.INPUT_SHOW_PWD:_conf.default.icon.INPUT_PWD]})])}function rendePrefixIcon(e,t){var i=t.$scopedSlots,a=t.prefixIcon,n=[];return i.prefix?n.push(e("span",{class:"vxe-input--prefix-icon"},i.prefix.call(this,{},e))):a&&n.push(e("i",{class:["vxe-input--prefix-icon",a]})),n.length?e("span",{class:"vxe-input--prefix",on:{click:t.clickPrefixEvent}},n):null}function renderSuffixIcon(e,t){var i=t.$scopedSlots,a=t.inputValue,n=t.isClearable,s=t.disabled,r=t.suffixIcon,l=[];return i.suffix?l.push(e("span",{class:"vxe-input--suffix-icon"},i.suffix.call(this,{},e))):r&&l.push(e("i",{class:["vxe-input--suffix-icon",r]})),n&&l.push(e("i",{class:["vxe-input--clear-icon",_conf.default.icon.INPUT_CLEAR]})),l.length?e("span",{class:["vxe-input--suffix",{"is--clear":n&&!s&&!(""===a||_xeUtils.default.eqNull(a))}],on:{click:t.clickSuffixEvent}},l):null}function renderExtraSuffixIcon(e,t){var i,a=t.controls,n=t.isPawdType,s=t.isNumType,r=t.isDatePickerType,l=t.isSearch;return n?i=renderPasswordIcon(e,t):s?a&&(i=renderNumberIcon(e,t)):r?i=renderDatePickerIcon(e,t):l&&(i=renderSearchIcon(e,t)),i?e("span",{class:"vxe-input--extra-suffix"},[i]):null}var _default2={name:"VxeInput",mixins:[_size.default],model:{prop:"value",event:"modelValue"},props:{value:[String,Number,Date],immediate:{type:Boolean,default:!0},name:String,type:{type:String,default:"text"},clearable:{type:Boolean,default:function(){return _conf.default.input.clearable}},readonly:Boolean,disabled:Boolean,placeholder:String,maxlength:[String,Number],autocomplete:{type:String,default:"off"},align:String,form:String,className:String,size:{type:String,default:function(){return _conf.default.input.size||_conf.default.size}},multiple:Boolean,min:{type:[String,Number],default:null},max:{type:[String,Number],default:null},step:[String,Number],exponential:{type:Boolean,default:function(){return _conf.default.input.exponential}},controls:{type:Boolean,default:function(){return _conf.default.input.controls}},digits:{type:[String,Number],default:function(){return _conf.default.input.digits}},dateConfig:Object,minDate:{type:[String,Number,Date],default:function(){return _conf.default.input.minDate}},maxDate:{type:[String,Number,Date],default:function(){return _conf.default.input.maxDate}},startWeek:Number,startDay:{type:[String,Number],default:function(){return _conf.default.input.startDay}},labelFormat:{type:String,default:function(){return _conf.default.input.labelFormat}},valueFormat:{type:String,default:function(){return _conf.default.input.valueFormat}},editable:{type:Boolean,default:!0},festivalMethod:{type:Function,default:function(){return _conf.default.input.festivalMethod}},disabledMethod:{type:Function,default:function(){return _conf.default.input.disabledMethod}},selectDay:{type:Number,default:function(){return _conf.default.input.selectDay}},prefixIcon:String,suffixIcon:String,placement:String,transfer:{type:Boolean,default:function(){return _conf.default.input.transfer}}},data:function(){return{panelIndex:0,showPwd:!1,visiblePanel:!1,animatVisible:!1,panelStyle:null,panelPlacement:null,isActivated:!1,inputValue:this.value,datetimePanelValue:null,datePanelValue:null,datePanelLabel:"",datePanelType:"day",selectMonth:null,currentDate:null}},computed:{isNumType:function(){return-1<["number","integer","float"].indexOf(this.type)},isDatePickerType:function(){return this.isDateTimeType||-1<["date","week","month","quarter","year"].indexOf(this.type)},isDateTimeType:function(){var e=this.type;return"time"===e||"datetime"===e},isPawdType:function(){return"password"===this.type},isSearch:function(){return"search"===this.type},stepValue:function(){var e=this.type,t=this.step;return"integer"===e?_xeUtils.default.toInteger(t)||1:"float"===e?_xeUtils.default.toNumber(t)||1/Math.pow(10,this.digitsValue):_xeUtils.default.toNumber(t)||1},digitsValue:function(){return _xeUtils.default.toInteger(this.digits)||1},isClearable:function(){return this.clearable&&(this.isPawdType||this.isNumType||this.isDatePickerType||"text"===this.type||"search"===this.type)},isDisabledPrevDateBtn:function(){var e=this.selectMonth,t=this.dateMinTime;return!!e&&e<=t},isDisabledNextDateBtn:function(){var e=this.selectMonth,t=this.dateMaxTime;return!!e&&t<=e},dateMinTime:function(){return this.minDate?_xeUtils.default.toStringDate(this.minDate):null},dateMaxTime:function(){return this.maxDate?_xeUtils.default.toStringDate(this.maxDate):null},supportMultiples:function(){return["date","week","month","quarter","year"].includes(this.type)},dateListValue:function(){var t=this,e=this.value,i=this.multiple,a=this.isDatePickerType,n=this.dateValueFormat;return i&&e&&a?_xeUtils.default.toValueString(e).split(",").map(function(e){e=t.parseDate(e,n);return _xeUtils.default.isValidDate(e)?e:null}):[]},dateMultipleValue:function(){var e=this.dateListValue,t=this.dateValueFormat;return e.map(function(e){return _xeUtils.default.toDateString(e,t)})},dateMultipleLabel:function(){var e=this.dateListValue,t=this.dateLabelFormat;return e.map(function(e){return _xeUtils.default.toDateString(e,t)}).join(", ")},dateValue:function(){var e=this.value,t=this.isDatePickerType,i=this.dateValueFormat,a=null;return e&&t&&(i=this.parseDate(e,i),_xeUtils.default.isValidDate(i)&&(a=i)),a},dateTimeLabel:function(){var e=this.datetimePanelValue;return e?_xeUtils.default.toDateString(e,"HH:mm:ss"):""},hmsTime:function(){var e=this.dateValue;return e&&this.isDateTimeType?1e3*(3600*e.getHours()+60*e.getMinutes()+e.getSeconds()):0},dateLabelFormat:function(){return this.isDatePickerType?this.labelFormat||_conf.default.i18n("vxe.input.date.labelFormat.".concat(this.type)):null},dateValueFormat:function(){var e=this.type;return"time"===e?"HH:mm:ss":this.valueFormat||("datetime"===e?"yyyy-MM-dd HH:mm:ss":"yyyy-MM-dd")},selectDatePanelLabel:function(){if(this.isDatePickerType){var e,t=this.datePanelType,i=this.selectMonth,a=this.yearList,n="";return i&&(n=i.getFullYear(),e=i.getMonth()+1),"quarter"===t?_conf.default.i18n("vxe.input.date.quarterLabel",[n]):"month"===t?_conf.default.i18n("vxe.input.date.monthLabel",[n]):"year"===t?a.length?"".concat(a[0].year," - ").concat(a[a.length-1].year):"":_conf.default.i18n("vxe.input.date.dayLabel",[n,e?_conf.default.i18n("vxe.input.date.m".concat(e)):"-"])}return""},firstDayOfWeek:function(){var e=this.startDay,t=this.startWeek;return _xeUtils.default.toNumber(_xeUtils.default.isNumber(e)||_xeUtils.default.isString(e)?e:t)},weekDatas:function(){var e=[];if(this.isDatePickerType){var t=this.firstDayOfWeek;e.push(t);for(var i=0;i<6;i++)6<=t?t=0:t++,e.push(t)}return e},dateHeaders:function(){return this.isDatePickerType?this.weekDatas.map(function(e){return{value:e,label:_conf.default.i18n("vxe.input.date.weeks.w".concat(e))}}):[]},weekHeaders:function(){return this.isDatePickerType?[{label:_conf.default.i18n("vxe.input.date.weeks.w")}].concat(this.dateHeaders):[]},yearList:function(){var e=this.selectMonth,t=this.currentDate,i=[];if(e&&t)for(var a=t.getFullYear(),e=e.getFullYear(),n=new Date(e-e%yearSize,0,1),s=-4;s<yearSize+4;s++){var r=_xeUtils.default.getWhatYear(n,s,"first"),l=r.getFullYear();i.push({date:r,isCurrent:!0,isPrev:s<0,isNow:a===l,isNext:yearSize<=s,year:l})}return i},yearDatas:function(){return _xeUtils.default.chunk(this.yearList,4)},quarterList:function(){var e=this.selectMonth,t=this.currentDate,i=[];if(e&&t)for(var a=t.getFullYear(),n=(0,_date.getDateQuarter)(t),s=_xeUtils.default.getWhatYear(e,0,"first"),r=s.getFullYear(),l=-2;l<quarterSize-2;l++){var u=_xeUtils.default.getWhatQuarter(s,l),o=u.getFullYear(),d=(0,_date.getDateQuarter)(u),c=o<r;i.push({date:u,isPrev:c,isCurrent:o===r,isNow:o===a&&d===n,isNext:!c&&r<o,quarter:d})}return i},quarterDatas:function(){return _xeUtils.default.chunk(this.quarterList,2)},monthList:function(){var e=this.selectMonth,t=this.currentDate,i=[];if(e&&t)for(var a=t.getFullYear(),n=t.getMonth(),s=_xeUtils.default.getWhatYear(e,0,"first").getFullYear(),r=-4;r<monthSize-4;r++){var l=_xeUtils.default.getWhatYear(e,0,r),u=l.getFullYear(),o=l.getMonth(),d=u<s;i.push({date:l,isPrev:d,isCurrent:u===s,isNow:u===a&&o===n,isNext:!d&&s<u,month:o})}return i},monthDatas:function(){return _xeUtils.default.chunk(this.monthList,4)},dayList:function(){var e=this.weekDatas,t=this.selectMonth,i=this.currentDate,a=this.hmsTime,n=[];if(t&&i)for(var s=i.getFullYear(),r=i.getMonth(),l=i.getDate(),u=t.getFullYear(),o=t.getMonth(),i=t.getDay(),i=-e.indexOf(i),d=new Date(_xeUtils.default.getWhatDay(t,i).getTime()+a),c=0;c<42;c++){var h=_xeUtils.default.getWhatDay(d,c),f=h.getFullYear(),p=h.getMonth(),v=h.getDate(),m=h<t;n.push({date:h,isPrev:m,isCurrent:f===u&&p===o,isNow:f===s&&p===r&&v===l,isNext:!m&&o!==p,label:v})}return n},dayDatas:function(){return _xeUtils.default.chunk(this.dayList,7)},weekDates:function(){var e=this.dayDatas,i=this.firstDayOfWeek;return e.map(function(e){var t=e[0];return[{date:t.date,isWeekNumber:!0,isPrev:!1,isCurrent:!1,isNow:!1,isNext:!1,label:_xeUtils.default.getYearWeek(t.date,i)}].concat(e)})},hourList:function(){var e=[];if(this.isDateTimeType)for(var t=0;t<24;t++)e.push({value:t,label:(""+t).padStart(2,0)});return e},minuteList:function(){var e=[];if(this.isDateTimeType)for(var t=0;t<60;t++)e.push({value:t,label:(""+t).padStart(2,0)});return e},secondList:function(){return this.minuteList},inpImmediate:function(){var e=this.type;return this.immediate||!("text"===e||"number"===e||"integer"===e||"float"===e)},inpPlaceholder:function(){var e=this.placeholder;return e?(0,_utils.getFuncText)(e):""},inputType:function(){var e=this.isDatePickerType,t=this.isNumType,i=this.isPawdType,a=this.type,n=this.showPwd;return e||t||i&&n||"number"===a?"text":a},inpMaxlength:function(){var e=this.isNumType,t=this.maxlength;return e&&!_xeUtils.default.toNumber(t)?16:t},inpReadonly:function(){var e=this.type,t=this.readonly,i=this.editable,a=this.multiple;return t||a||!i||"week"===e||"quarter"===e}},watch:{value:function(e){this.inputValue=e,this.changeValue()},type:function(){Object.assign(this,{inputValue:this.value,datetimePanelValue:null,datePanelValue:null,datePanelLabel:"",datePanelType:"day",selectMonth:null,currentDate:null}),this.initValue()},dateLabelFormat:function(){this.isDatePickerType&&(this.dateParseValue(this.datePanelValue),this.inputValue=this.multiple?this.dateMultipleLabel:this.datePanelLabel)}},created:function(){this.initValue(),_event.GlobalEvent.on(this,"mousewheel",this.handleGlobalMousewheelEvent),_event.GlobalEvent.on(this,"mousedown",this.handleGlobalMousedownEvent),_event.GlobalEvent.on(this,"keydown",this.handleGlobalKeydownEvent),_event.GlobalEvent.on(this,"blur",this.handleGlobalBlurEvent)},mounted:function(){this.dateConfig&&(0,_log.warnLog)("vxe.error.removeProp",["date-config"]),this.isDatePickerType&&this.transfer&&document.body.appendChild(this.$refs.panel)},beforeDestroy:function(){var e=this.$refs.panel;e&&e.parentNode&&e.parentNode.removeChild(e)},destroyed:function(){this.numberStopDown(),_event.GlobalEvent.off(this,"mousewheel"),_event.GlobalEvent.off(this,"mousedown"),_event.GlobalEvent.off(this,"keydown"),_event.GlobalEvent.off(this,"blur")},render:function(e){var t=this.name,i=this.form,a=this.inputType,n=this.inpPlaceholder,s=this.inpMaxlength,r=this.inpReadonly,l=this.className,u=this.controls,o=this.inputValue,d=this.isDatePickerType,c=this.visiblePanel,h=this.isActivated,f=this.vSize,p=this.type,v=this.align,m=this.readonly,y=this.disabled,x=this.autocomplete,b=[],g=rendePrefixIcon(e,this),D=renderSuffixIcon(e,this);return g&&b.push(g),b.push(e("input",{ref:"input",class:"vxe-input--inner",domProps:{value:o},attrs:{name:t,form:i,type:a,placeholder:n,maxlength:s,readonly:r,disabled:y,autocomplete:x},on:{keydown:this.keydownEvent,keyup:this.triggerEvent,wheel:this.wheelEvent,click:this.clickEvent,input:this.inputEvent,change:this.changeEvent,focus:this.focusEvent,blur:this.blurEvent}})),D&&b.push(D),b.push(renderExtraSuffixIcon(e,this)),d&&b.push(renderPanel(e,this)),e("div",{class:["vxe-input","type--".concat(p),l,(_defineProperty(l={},"size--".concat(f),f),_defineProperty(l,"is--".concat(v),v),_defineProperty(l,"is--controls",u),_defineProperty(l,"is--prefix",!!g),_defineProperty(l,"is--suffix",!!D),_defineProperty(l,"is--readonly",m),_defineProperty(l,"is--visivle",c),_defineProperty(l,"is--disabled",y),_defineProperty(l,"is--active",h),l)]},b)},methods:{focus:function(){return this.isActivated=!0,this.$refs.input.focus(),this.$nextTick()},blur:function(){return this.$refs.input.blur(),this.isActivated=!1,this.$nextTick()},triggerEvent:function(e){var t=this.$refs,i=this.inputValue;this.$emit(e.type,{$panel:t.panel,value:i,$event:e})},emitModel:function(e,t){this.inputValue=e,this.$emit("modelValue",e),this.$emit("input",{value:e,$event:t}),_xeUtils.default.toValueString(this.value)!==e&&this.$emit("change",{value:e,$event:t})},emitInputEvent:function(e,t){var i=this.inpImmediate,a=this.isDatePickerType;this.inputValue=e,a||(i?this.emitModel(e,t):this.$emit("input",{value:e,$event:t}))},inputEvent:function(e){var t=e.target.value;this.emitInputEvent(t,e)},changeEvent:function(e){this.inpImmediate||this.triggerEvent(e)},focusEvent:function(e){this.isActivated=!0,this.triggerEvent(e)},blurEvent:function(e){var t=this.inputValue;this.inpImmediate||this.emitModel(t,e),this.afterCheckValue(),this.visiblePanel||(this.isActivated=!1),this.$emit("blur",{value:t,$event:e})},keydownEvent:function(e){var t,i,a,n,s=this.exponential,r=this.controls;this.isNumType&&(t=e.ctrlKey,i=e.shiftKey,a=e.altKey,n=e.keyCode,t||i||a||!(32===n||(!s||69!==n)&&65<=n&&n<=90||186<=n&&n<=188||191<=n)||e.preventDefault(),r&&this.numberKeydownEvent(e)),this.triggerEvent(e)},wheelEvent:function(e){var t;this.isNumType&&this.controls&&this.isActivated&&(0<(t=e.deltaY)?this.numberNextEvent(e):t<0&&this.numberPrevEvent(e),e.preventDefault()),this.triggerEvent(e)},clickEvent:function(e){this.isDatePickerType&&this.datePickerOpenEvent(e),this.triggerEvent(e)},clickPrefixEvent:function(e){var t=this.$refs,i=this.disabled,a=this.inputValue;i||this.$emit("prefix-click",{$panel:t.panel,value:a,$event:e})},clickSuffixEvent:function(e){var t=this.$refs,i=this.disabled,a=this.inputValue;i||(_dom.default.hasClass(e.currentTarget,"is--clear")?(this.emitModel("",e),this.clearValueEvent(e,"")):this.$emit("suffix-click",{$panel:t.panel,value:a,$event:e}))},clearValueEvent:function(e,t){var i=this.$refs,a=this.type,n=this.isNumType;this.isDatePickerType&&this.hidePanel(),(n||-1<["text","search","password"].indexOf(a))&&this.focus(),this.$emit("clear",{$panel:i.panel,value:t,$event:e})},parseDate:function(e,t){return"time"===this.type?(0,_date.toStringTimeDate)(e):_xeUtils.default.toStringDate(e,t)},initValue:function(){var e=this.type,t=this.isDatePickerType,i=this.inputValue,a=this.digitsValue;t?this.changeValue():"float"===e&&(!i||i!==(a=(0,_number.toFloatValueFixed)(i,a))&&this.emitModel(a,{type:"init"}))},changeValue:function(){this.isDatePickerType&&(this.dateParseValue(this.inputValue),this.inputValue=this.multiple?this.dateMultipleLabel:this.datePanelLabel)},afterCheckValue:function(){var e,t=this.type,i=this.exponential,a=this.inpReadonly,n=this.inputValue,s=this.isDatePickerType,r=this.isNumType,l=this.datetimePanelValue,u=this.dateLabelFormat,o=this.min,d=this.max,c=this.firstDayOfWeek;a||(r?n&&(e="integer"===t?_xeUtils.default.toInteger((0,_number.handleNumber)(n)):_xeUtils.default.toNumber((0,_number.handleNumber)(n)),this.vaildMinNum(e)?this.vaildMaxNum(e)||(e=d):e=o,!i||(i=_xeUtils.default.toValueString(n).toLowerCase())===_xeUtils.default.toNumber(e).toExponential()&&(e=i),this.emitModel(getNumberValue(this,e),{type:"check"})):s&&(n?"week"===t||"quarter"===t||(e=this.parseDate(n,u),_xeUtils.default.isValidDate(e)?"time"===t?(n!==(e=(0,_date.toStringTimeDate)(e))&&this.emitModel(e,{type:"check"}),this.inputValue=e):(s=!1,"datetime"===t?n===_xeUtils.default.toDateString(this.dateValue,u)&&n===_xeUtils.default.toDateString(e,u)||(s=!0,l.setHours(e.getHours()),l.setMinutes(e.getMinutes()),l.setSeconds(e.getSeconds())):s=!0,this.inputValue=_xeUtils.default.toDateString(e,u,{firstDay:c}),s&&this.dateChange(e)):this.dateRevert()):this.emitModel("",{type:"check"})))},passwordToggleEvent:function(e){var t=this.disabled,i=this.readonly,a=this.showPwd;t||i||(this.showPwd=!a),this.$emit("toggle-visible",{visible:this.showPwd,$event:e})},searchEvent:function(e){this.$emit("search-click",{$event:e})},vaildMinNum:function(e){return null===this.min||e>=_xeUtils.default.toNumber(this.min)},vaildMaxNum:function(e){return null===this.max||e<=_xeUtils.default.toNumber(this.max)},numberStopDown:function(){clearTimeout(this.downbumTimeout)},numberDownPrevEvent:function(e){var t=this;this.downbumTimeout=setTimeout(function(){t.numberPrevEvent(e),t.numberDownPrevEvent(e)},60)},numberDownNextEvent:function(e){var t=this;this.downbumTimeout=setTimeout(function(){t.numberNextEvent(e),t.numberDownNextEvent(e)},60)},numberKeydownEvent:function(e){var t=e.keyCode,i=38===t;!i&&40!==t||(e.preventDefault(),i?this.numberPrevEvent(e):this.numberNextEvent(e))},numberMousedownEvent:function(e){var t,i=this;this.numberStopDown(),0===e.button&&((t=_dom.default.hasClass(e.currentTarget,"is--prev"))?this.numberPrevEvent(e):this.numberNextEvent(e),this.downbumTimeout=setTimeout(function(){t?i.numberDownPrevEvent(e):i.numberDownNextEvent(e)},500))},numberPrevEvent:function(e){var t=this.disabled,i=this.readonly;clearTimeout(this.downbumTimeout),t||i||this.numberChange(!0,e),this.$emit("prev-number",{$event:e})},numberNextEvent:function(e){var t=this.disabled,i=this.readonly;clearTimeout(this.downbumTimeout),t||i||this.numberChange(!1,e),this.$emit("next-number",{$event:e})},numberChange:function(e,t){var i=this.min,a=this.max,n=this.type,s=this.inputValue,r=this.stepValue,s="integer"===n?_xeUtils.default.toInteger((0,_number.handleNumber)(s)):_xeUtils.default.toNumber((0,_number.handleNumber)(s)),r=e?_xeUtils.default.add(s,r):_xeUtils.default.subtract(s,r),i=this.vaildMinNum(r)?this.vaildMaxNum(r)?r:a:i;this.emitInputEvent(getNumberValue(this,i),t)},datePickerOpenEvent:function(e){this.readonly||(e.preventDefault(),this.showPanel())},dateMonthHandle:function(e,t){this.selectMonth=_xeUtils.default.getWhatMonth(e,t,"first")},dateNowHandle:function(){var e=_xeUtils.default.getWhatDay(Date.now(),0,"first");this.currentDate=e,this.dateMonthHandle(e,0)},dateToggleTypeEvent:function(){var e="month"===(e=this.datePanelType)||"quarter"===e?"year":"month";this.datePanelType=e},datePrevEvent:function(e){var t=this.isDisabledPrevDateBtn,i=this.type,a=this.datePanelType;t||(this.selectMonth="year"===i?_xeUtils.default.getWhatYear(this.selectMonth,-yearSize,"first"):"month"===i||"quarter"===i?"year"===a?_xeUtils.default.getWhatYear(this.selectMonth,-yearSize,"first"):_xeUtils.default.getWhatYear(this.selectMonth,-1,"first"):"year"===a?_xeUtils.default.getWhatYear(this.selectMonth,-yearSize,"first"):"month"===a?_xeUtils.default.getWhatYear(this.selectMonth,-1,"first"):_xeUtils.default.getWhatMonth(this.selectMonth,-1,"first"),this.$emit("date-prev",{type:i,$event:e}))},dateTodayMonthEvent:function(e){this.dateNowHandle(),this.multiple||(this.dateChange(this.currentDate),this.hidePanel()),this.$emit("date-today",{type:this.type,$event:e})},dateNextEvent:function(e){var t=this.isDisabledNextDateBtn,i=this.type,a=this.datePanelType;t||(this.selectMonth="year"===i?_xeUtils.default.getWhatYear(this.selectMonth,yearSize,"first"):"month"===i||"quarter"===i?"year"===a?_xeUtils.default.getWhatYear(this.selectMonth,yearSize,"first"):_xeUtils.default.getWhatYear(this.selectMonth,1,"first"):"year"===a?_xeUtils.default.getWhatYear(this.selectMonth,yearSize,"first"):"month"===a?_xeUtils.default.getWhatYear(this.selectMonth,1,"first"):_xeUtils.default.getWhatMonth(this.selectMonth,1,"first"),this.$emit("date-next",{type:i,$event:e}))},dateSelectEvent:function(e){isDateDisabled(this,e)||this.dateSelectItem(e.date)},dateSelectItem:function(e){var t=this.type,i=this.datePanelType,a=this.multiple,n="week"===t;"month"===t?"year"===i?(this.datePanelType="month",this.dateCheckMonth(e)):(this.dateChange(e),a||this.hidePanel()):"year"===t?(this.dateChange(e),a||this.hidePanel()):"quarter"===t?"year"===i?(this.datePanelType="quarter",this.dateCheckMonth(e)):(this.dateChange(e),a||this.hidePanel()):"month"===i?(this.datePanelType="week"===t?t:"day",this.dateCheckMonth(e)):"year"===i?(this.datePanelType="month",this.dateCheckMonth(e)):(this.dateChange(e),a||this.hidePanel()),n&&this.changeValue()},dateMouseenterEvent:function(e){var t;isDateDisabled(this,e)||("month"===(t=this.datePanelType)?this.dateMoveMonth(e.date):"quarter"===t?this.dateMoveQuarter(e.date):"year"===t?this.dateMoveYear(e.date):this.dateMoveDay(e.date))},dateHourEvent:function(e,t){this.datetimePanelValue.setHours(t.value),this.dateTimeChangeEvent(e)},dateConfirmEvent:function(){this.dateChange(this.dateValue||this.currentDate),this.hidePanel()},dateMinuteEvent:function(e,t){this.datetimePanelValue.setMinutes(t.value),this.dateTimeChangeEvent(e)},dateSecondEvent:function(e,t){this.datetimePanelValue.setSeconds(t.value),this.dateTimeChangeEvent(e)},dateTimeChangeEvent:function(e){this.datetimePanelValue=new Date(this.datetimePanelValue.getTime()),this.updateTimePos(e.currentTarget)},updateTimePos:function(e){var t;e&&(t=e.offsetHeight,e.parentNode.scrollTop=e.offsetTop-4*t)},dateMoveDay:function(t){isDateDisabled(this,{date:t})||(this.dayList.some(function(e){return _xeUtils.default.isDateSame(e.date,t,"yyyyMMdd")})||this.dateCheckMonth(t),this.dateParseValue(t))},dateMoveMonth:function(t){isDateDisabled(this,{date:t})||(this.monthList.some(function(e){return _xeUtils.default.isDateSame(e.date,t,"yyyyMM")})||this.dateCheckMonth(t),this.dateParseValue(t))},dateMoveQuarter:function(t){isDateDisabled(this,{date:t})||(this.quarterList.some(function(e){return _xeUtils.default.isDateSame(e.date,t,"yyyyq")})||this.dateCheckMonth(t),this.dateParseValue(t))},dateMoveYear:function(t){isDateDisabled(this,{date:t})||(this.yearList.some(function(e){return _xeUtils.default.isDateSame(e.date,t,"yyyy")})||this.dateCheckMonth(t),this.dateParseValue(t))},dateParseValue:function(e){var t=this.type,i=this.dateLabelFormat,a=this.valueFormat,n=this.firstDayOfWeek,s=null,r="";e&&(s=this.parseDate(e,a)),_xeUtils.default.isValidDate(s)?(r=_xeUtils.default.toDateString(s,i,{firstDay:n}),i&&"week"===t&&_xeUtils.default.getWhatWeek(s,0,n,n).getFullYear()<s.getFullYear()&&(-1<(i=i.indexOf("yyyy"))&&((i=Number(r.substring(i,i+4)))&&!isNaN(i)&&(r=r.replace("".concat(i),"".concat(i-1)))))):s=null,this.datePanelValue=s,this.datePanelLabel=r},dateOffsetEvent:function(e){var t,i,a,n=this.isActivated,s=this.datePanelValue,r=this.datePanelType,l=this.firstDayOfWeek;n&&(e.preventDefault(),t=37===(i=e.keyCode),n=38===i,e=39===i,i=40===i,"year"===r?(a=_xeUtils.default.getWhatYear(s||Date.now(),0,"first"),t?a=_xeUtils.default.getWhatYear(a,-1):n?a=_xeUtils.default.getWhatYear(a,-4):e?a=_xeUtils.default.getWhatYear(a,1):i&&(a=_xeUtils.default.getWhatYear(a,4)),this.dateMoveYear(a)):"quarter"===r?(a=_xeUtils.default.getWhatQuarter(s||Date.now(),0,"first"),t?a=_xeUtils.default.getWhatQuarter(a,-1):n?a=_xeUtils.default.getWhatQuarter(a,-2):e?a=_xeUtils.default.getWhatQuarter(a,1):i&&(a=_xeUtils.default.getWhatQuarter(a,2)),this.dateMoveQuarter(a)):"month"===r?(r=_xeUtils.default.getWhatMonth(s||Date.now(),0,"first"),t?r=_xeUtils.default.getWhatMonth(r,-1):n?r=_xeUtils.default.getWhatMonth(r,-4):e?r=_xeUtils.default.getWhatMonth(r,1):i&&(r=_xeUtils.default.getWhatMonth(r,4)),this.dateMoveMonth(r)):(s=s||_xeUtils.default.getWhatDay(Date.now(),0,"first"),t?s=_xeUtils.default.getWhatDay(s,-1):n?s=_xeUtils.default.getWhatWeek(s,-1,l):e?s=_xeUtils.default.getWhatDay(s,1):i&&(s=_xeUtils.default.getWhatWeek(s,1,l)),this.dateMoveDay(s)))},datePgOffsetEvent:function(e){var t;this.isActivated&&(t=33===e.keyCode,e.preventDefault(),t?this.datePrevEvent(e):this.dateNextEvent(e))},dateChange:function(t){var e,i=this.value,a=this.datetimePanelValue,n=this.dateValueFormat,s=this.firstDayOfWeek,r=this.isDateTimeType,l=this.multiple;"week"===this.type?(e=_xeUtils.default.toNumber(this.selectDay),t=_xeUtils.default.getWhatWeek(t,0,e,s)):r&&(t.setHours(a.getHours()),t.setMinutes(a.getMinutes()),t.setSeconds(a.getSeconds()));var u,o=_xeUtils.default.toDateString(t,n,{firstDay:s});this.dateCheckMonth(t),l?(l=this.dateMultipleValue,r?(r=this.dateListValue,u=[],r.forEach(function(e){e&&!_xeUtils.default.isDateSame(t,e,"yyyyMMdd")&&(e.setHours(a.getHours()),e.setMinutes(a.getMinutes()),e.setSeconds(a.getSeconds()),u.push(e))}),u.push(t),this.emitModel(u.map(function(e){return _xeUtils.default.toDateString(e,n)}).join(","),{type:"update"})):l.some(function(e){return _xeUtils.default.isEqual(e,o)})?this.emitModel(l.filter(function(e){return!_xeUtils.default.isEqual(e,o)}).join(","),{type:"update"}):this.emitModel(l.concat([o]).join(","),{type:"update"})):_xeUtils.default.isEqual(i,o)||this.emitModel(o,{type:"update"})},dateCheckMonth:function(e){e=_xeUtils.default.getWhatMonth(e,0,"first");_xeUtils.default.isEqual(e,this.selectMonth)||(this.selectMonth=e)},dateOpenPanel:function(){var e=this,t=this.type,i=this.dateValue;-1<["year","quarter","month","week"].indexOf(t)?this.datePanelType=t:this.datePanelType="day",this.currentDate=_xeUtils.default.getWhatDay(Date.now(),0,"first"),i?(this.dateMonthHandle(i,0),this.dateParseValue(i)):this.dateNowHandle(),this.isDateTimeType&&(this.datetimePanelValue=this.datePanelValue||_xeUtils.default.getWhatDay(Date.now(),0,"first"),this.$nextTick(function(){_xeUtils.default.arrayEach(e.$refs.timeBody.querySelectorAll("li.is--selected"),e.updateTimePos)}))},dateRevert:function(){this.inputValue=this.multiple?this.dateMultipleLabel:this.datePanelLabel},updateZindex:function(){this.panelIndex<_utils.default.getLastZIndex()&&(this.panelIndex=_utils.default.nextZIndex())},showPanel:function(){var e=this,t=this.disabled,i=this.visiblePanel,a=this.isDatePickerType;t||i||(clearTimeout(this.hidePanelTimeout),this.isActivated=!0,this.animatVisible=!0,a&&this.dateOpenPanel(),setTimeout(function(){e.visiblePanel=!0},10),this.updateZindex(),this.updatePlacement())},hidePanel:function(){var e=this;this.visiblePanel=!1,this.hidePanelTimeout=setTimeout(function(){e.animatVisible=!1},350)},updatePlacement:function(){var h=this;return this.$nextTick().then(function(){var e=h.$refs,t=h.transfer,i=h.placement,a=h.panelIndex,n=e.input,s=e.panel;if(n&&s){var r=n.offsetHeight,l=n.offsetWidth,u=s.offsetHeight,o=s.offsetWidth,d={zIndex:a},c=_dom.default.getAbsolutePos(n),e=c.boundingTop,s=c.boundingLeft,a=c.visibleHeight,n=c.visibleWidth,c="bottom";return t?(t=e+r,"top"===i?(c="top",t=e-u):i||(a<t+u+5&&(c="top",t=e-u),t<5&&(c="bottom",t=e+r)),n<(s=s)+o+5&&(s-=s+o+5-n),s<5&&(s=5),Object.assign(d,{left:"".concat(s,"px"),top:"".concat(t,"px"),minWidth:"".concat(l,"px")})):"top"===i?(c="top",d.bottom="".concat(r,"px")):i||a<e+r+u&&5<e-r-u&&(c="top",d.bottom="".concat(r,"px")),h.panelStyle=d,h.panelPlacement=c,h.$nextTick()}})},handleGlobalMousedownEvent:function(e){var t=this.$refs,i=this.$el,a=this.disabled,n=this.visiblePanel,s=this.isActivated;!a&&s&&(this.isActivated=_dom.default.getEventTargetNode(e,i).flag||_dom.default.getEventTargetNode(e,t.panel).flag,this.isActivated||(this.isDatePickerType?n&&(this.hidePanel(),this.afterCheckValue()):this.afterCheckValue()))},handleGlobalKeydownEvent:function(e){var t,i,a,n,s,r,l,u,o,d,c=this.isDatePickerType,h=this.visiblePanel,f=this.clearable;this.disabled||(i=46===(t=e.keyCode),a=27===t,n=13===t,s=38===t,r=40===t,l=33===t,u=34===t,o=37===t||s||39===t||r,d=this.isActivated,(t=9===t)?(d&&this.afterCheckValue(),this.isActivated=d=!1):o?c&&d&&(h?this.dateOffsetEvent(e):(s||r)&&this.datePickerOpenEvent(e)):n?c&&(h?this.datePanelValue?this.dateSelectItem(this.datePanelValue):this.hidePanel():d&&this.datePickerOpenEvent(e)):(l||u)&&c&&d&&this.datePgOffsetEvent(e),t||a?h&&this.hidePanel():i&&f&&d&&this.clearValueEvent(e,null))},handleGlobalMousewheelEvent:function(e){var t=this.$refs,i=this.disabled,a=this.visiblePanel;i||a&&(_dom.default.getEventTargetNode(e,t.panel).flag?this.updatePlacement():(this.hidePanel(),this.afterCheckValue()))},handleGlobalBlurEvent:function(){var e=this.isActivated;this.visiblePanel?(this.hidePanel(),this.afterCheckValue()):e&&this.afterCheckValue()}}};exports.default=_default2;
1
+ "use strict";function _typeof(e){return(_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}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")),_size=_interopRequireDefault(require("../../mixins/size")),_utils=_interopRequireWildcard(require("../../tools/utils")),_dom=_interopRequireDefault(require("../../tools/dom")),_event=require("../../tools/event"),_date=require("./date"),_number=require("./number"),_log=require("../../tools/log");function _getRequireWildcardCache(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,i=new WeakMap;return(_getRequireWildcardCache=function(e){return e?i:t})(e)}function _interopRequireWildcard(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!==_typeof(e)&&"function"!=typeof e)return{default:e};t=_getRequireWildcardCache(t);if(t&&t.has(e))return t.get(e);var i,a,n={},s=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(i in e)"default"!==i&&Object.prototype.hasOwnProperty.call(e,i)&&((a=s?Object.getOwnPropertyDescriptor(e,i):null)&&(a.get||a.set)?Object.defineProperty(n,i,a):n[i]=e[i]);return n.default=e,t&&t.set(e,n),n}function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function ownKeys(t,e){var i,a=Object.keys(t);return Object.getOwnPropertySymbols&&(i=Object.getOwnPropertySymbols(t),e&&(i=i.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),a.push.apply(a,i)),a}function _objectSpread(t){for(var e=1;e<arguments.length;e++){var i=null!=arguments[e]?arguments[e]:{};e%2?ownKeys(Object(i),!0).forEach(function(e){_defineProperty(t,e,i[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):ownKeys(Object(i)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(i,e))})}return t}function _defineProperty(e,t,i){return t in e?Object.defineProperty(e,t,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[t]=i,e}var yearSize=12,monthSize=20,quarterSize=8;function getNumberValue(e,t){var i=e.type,a=e.exponential,n=e.digitsValue,e=e.inpMaxlength,n="float"===i?(0,_number.toFloatValueFixed)(t,n):_xeUtils.default.toValueString(t);return!a||t!==n&&_xeUtils.default.toValueString(t).toLowerCase()!==_xeUtils.default.toNumber(n).toExponential()?n.slice(0,e):t}function renderDateLabel(t,e,i,a){var n=e.festivalMethod;if(n){n=n(_objectSpread({$input:e,type:e.datePanelType,viewType:e.datePanelType},i)),e=n?_xeUtils.default.isString(n)?{label:n}:n:{},i=e.extra?_xeUtils.default.isString(e.extra)?{label:e.extra}:e.extra:null,n=[t("span",{class:["vxe-input--date-label",{"is-notice":e.notice}]},i&&i.label?[t("span",a),t("span",{class:["vxe-input--date-label--extra",i.important?"is-important":"",i.className],style:i.style},_xeUtils.default.toValueString(i.label))]:a)],i=e.label;return i&&(i=_xeUtils.default.toValueString(i).split(","),n.push(t("span",{class:["vxe-input--date-festival",e.important?"is-important":"",e.className],style:e.style},[1<i.length?t("span",{class:["vxe-input--date-festival--overlap","overlap--".concat(i.length)]},i.map(function(e){return t("span",e.substring(0,3))})):t("span",{class:"vxe-input--date-festival--label"},i[0].substring(0,3))]))),n}return a}function isDateDisabled(e,t){var i=e.disabledMethod;return i&&i({$input:e,type:e.datePanelType,viewType:e.datePanelType,date:t.date})}function renderDateDayTable(i,a){var e=a.datePanelType,n=a.dateValue,s=a.datePanelValue,t=a.dateHeaders,r=a.dayDatas,l=a.multiple,u=a.dateListValue,o="yyyy-MM-dd";return[i("table",{class:"vxe-input--date-".concat(e,"-view"),attrs:{cellspacing:0,cellpadding:0,border:0}},[i("thead",[i("tr",t.map(function(e){return i("th",e.label)}))]),i("tbody",r.map(function(e){return i("tr",e.map(function(t){return i("td",{class:{"is--prev":t.isPrev,"is--current":t.isCurrent,"is--now":t.isNow,"is--next":t.isNext,"is--disabled":isDateDisabled(a,t),"is--selected":l?u.some(function(e){return _xeUtils.default.isDateSame(e,t.date,o)}):_xeUtils.default.isDateSame(n,t.date,o),"is--hover":_xeUtils.default.isDateSame(s,t.date,o)},on:{click:function(){return a.dateSelectEvent(t)},mouseenter:function(){return a.dateMouseenterEvent(t)}}},renderDateLabel(i,a,t,t.label))}))}))])]}function renderDateWeekTable(a,n){var e=n.datePanelType,s=n.dateValue,r=n.datePanelValue,t=n.weekHeaders,i=n.weekDates,l=n.multiple,u=n.dateListValue,o="yyyyMMdd";return[a("table",{class:"vxe-input--date-".concat(e,"-view"),attrs:{cellspacing:0,cellpadding:0,border:0}},[a("thead",[a("tr",t.map(function(e){return a("th",e.label)}))]),a("tbody",i.map(function(e){var t=l?e.some(function(t){return u.some(function(e){return _xeUtils.default.isDateSame(e,t.date,o)})}):e.some(function(e){return _xeUtils.default.isDateSame(s,e.date,o)}),i=e.some(function(e){return _xeUtils.default.isDateSame(r,e.date,o)});return a("tr",e.map(function(e){return a("td",{class:{"is--prev":e.isPrev,"is--current":e.isCurrent,"is--now":e.isNow,"is--next":e.isNext,"is--disabled":isDateDisabled(n,e),"is--selected":t,"is--hover":i},on:{click:function(){return n.dateSelectEvent(e)},mouseenter:function(){return n.dateMouseenterEvent(e)}}},renderDateLabel(a,n,e,e.label))}))}))])]}function renderDateMonthTable(i,a){var n=a.dateValue,e=a.datePanelType,t=a.monthDatas,s=a.datePanelValue,r=a.multiple,l=a.dateListValue,u="yyyyMM";return[i("table",{class:"vxe-input--date-".concat(e,"-view"),attrs:{cellspacing:0,cellpadding:0,border:0}},[i("tbody",t.map(function(e){return i("tr",e.map(function(t){return i("td",{class:{"is--prev":t.isPrev,"is--current":t.isCurrent,"is--now":t.isNow,"is--next":t.isNext,"is--disabled":isDateDisabled(a,t),"is--selected":r?l.some(function(e){return _xeUtils.default.isDateSame(e,t.date,u)}):_xeUtils.default.isDateSame(n,t.date,u),"is--hover":_xeUtils.default.isDateSame(s,t.date,u)},on:{click:function(){return a.dateSelectEvent(t)},mouseenter:function(){return a.dateMouseenterEvent(t)}}},renderDateLabel(i,a,t,_conf.default.i18n("vxe.input.date.months.m".concat(t.month))))}))}))])]}function renderDateQuarterTable(i,a){var n=a.dateValue,e=a.datePanelType,t=a.quarterDatas,s=a.datePanelValue,r=a.multiple,l=a.dateListValue,u="yyyyq";return[i("table",{class:"vxe-input--date-".concat(e,"-view"),attrs:{cellspacing:0,cellpadding:0,border:0}},[i("tbody",t.map(function(e){return i("tr",e.map(function(t){return i("td",{class:{"is--prev":t.isPrev,"is--current":t.isCurrent,"is--now":t.isNow,"is--next":t.isNext,"is--disabled":isDateDisabled(a,t),"is--selected":r?l.some(function(e){return _xeUtils.default.isDateSame(e,t.date,u)}):_xeUtils.default.isDateSame(n,t.date,u),"is--hover":_xeUtils.default.isDateSame(s,t.date,u)},on:{click:function(){return a.dateSelectEvent(t)},mouseenter:function(){return a.dateMouseenterEvent(t)}}},renderDateLabel(i,a,t,_conf.default.i18n("vxe.input.date.quarters.q".concat(t.quarter))))}))}))])]}function renderDateYearTable(i,a){var n=a.dateValue,e=a.datePanelType,t=a.yearDatas,s=a.datePanelValue,r=a.multiple,l=a.dateListValue,u="yyyy";return[i("table",{class:"vxe-input--date-".concat(e,"-view"),attrs:{cellspacing:0,cellpadding:0,border:0}},[i("tbody",t.map(function(e){return i("tr",e.map(function(t){return i("td",{class:{"is--prev":t.isPrev,"is--current":t.isCurrent,"is--now":t.isNow,"is--next":t.isNext,"is--disabled":isDateDisabled(t),"is--selected":r?l.some(function(e){return _xeUtils.default.isDateSame(e,t.date,u)}):_xeUtils.default.isDateSame(n,t.date,u),"is--hover":_xeUtils.default.isDateSame(s,t.date,u)},on:{click:function(){return a.dateSelectEvent(t)},mouseenter:function(){return a.dateMouseenterEvent(t)}}},renderDateLabel(i,a,t,t.year))}))}))])]}function renderDateTable(e,t){switch(t.datePanelType){case"week":return renderDateWeekTable(e,t);case"month":return renderDateMonthTable(e,t);case"quarter":return renderDateQuarterTable(e,t);case"year":return renderDateYearTable(e,t)}return renderDateDayTable(e,t)}function renderDatePanel(e,t){var i=t.datePanelType,a=t.selectDatePanelLabel,n=t.isDisabledPrevDateBtn,s=t.isDisabledNextDateBtn,r=t.multiple,l=t.supportMultiples;return[e("div",{class:"vxe-input--date-picker-header"},[e("div",{class:"vxe-input--date-picker-type-wrapper"},[e("span","year"===i?{class:"vxe-input--date-picker-label"}:{class:"vxe-input--date-picker-btn",on:{click:t.dateToggleTypeEvent}},a)]),e("div",{class:"vxe-input--date-picker-btn-wrapper"},[e("span",{class:["vxe-input--date-picker-btn vxe-input--date-picker-prev-btn",{"is--disabled":n}],on:{click:t.datePrevEvent}},[e("i",{class:"vxe-icon--caret-left"})]),e("span",{class:"vxe-input--date-picker-btn vxe-input--date-picker-current-btn",on:{click:t.dateTodayMonthEvent}},[e("i",{class:"vxe-icon--dot"})]),e("span",{class:["vxe-input--date-picker-btn vxe-input--date-picker-next-btn",{"is--disabled":s}],on:{click:t.dateNextEvent}},[e("i",{class:"vxe-icon--caret-right"})]),r&&l?e("span",{class:"vxe-input--date-picker-btn vxe-input--date-picker-confirm-btn"},[e("button",{class:"vxe-input--date-picker-confirm",attrs:{type:"button"},on:{click:t.dateConfirmEvent}},_conf.default.i18n("vxe.button.confirm"))]):null])]),e("div",{class:"vxe-input--date-picker-body"},renderDateTable(e,t))]}function renderTimePanel(i,a){var e=a.dateTimeLabel,n=a.datetimePanelValue,t=a.hourList,s=a.minuteList,r=a.secondList;return[i("div",{class:"vxe-input--time-picker-header"},[i("span",{class:"vxe-input--time-picker-title"},e),i("button",{class:"vxe-input--time-picker-confirm",attrs:{type:"button"},on:{click:a.dateConfirmEvent}},_conf.default.i18n("vxe.button.confirm"))]),i("div",{ref:"timeBody",class:"vxe-input--time-picker-body"},[i("ul",{class:"vxe-input--time-picker-hour-list"},t.map(function(t,e){return i("li",{key:e,class:{"is--selected":n&&n.getHours()===t.value},on:{click:function(e){return a.dateHourEvent(e,t)}}},t.label)})),i("ul",{class:"vxe-input--time-picker-minute-list"},s.map(function(t,e){return i("li",{key:e,class:{"is--selected":n&&n.getMinutes()===t.value},on:{click:function(e){return a.dateMinuteEvent(e,t)}}},t.label)})),i("ul",{class:"vxe-input--time-picker-second-list"},r.map(function(t,e){return i("li",{key:e,class:{"is--selected":n&&n.getSeconds()===t.value},on:{click:function(e){return a.dateSecondEvent(e,t)}}},t.label)}))])]}function renderPanel(e,t){var i=t.type,a=t.vSize,n=t.isDatePickerType,s=t.transfer,r=t.animatVisible,l=t.visiblePanel,u=t.panelPlacement,o=t.panelStyle,d=[];return n?("datetime"===i?d.push(e("div",{class:"vxe-input--panel-layout-wrapper"},[e("div",{class:"vxe-input--panel-left-wrapper"},renderDatePanel(e,t)),e("div",{class:"vxe-input--panel-right-wrapper"},renderTimePanel(e,t))])):"time"===i?d.push(e("div",{class:"vxe-input--panel-wrapper"},renderTimePanel(e,t))):d.push(e("div",{class:"vxe-input--panel-wrapper"},renderDatePanel(e,t))),e("div",{ref:"panel",class:["vxe-table--ignore-clear vxe-input--panel","type--".concat(i),(_defineProperty(i={},"size--".concat(a),a),_defineProperty(i,"is--transfer",s),_defineProperty(i,"animat--leave",r),_defineProperty(i,"animat--enter",l),i)],attrs:{placement:u},style:o},d)):null}function renderNumberIcon(e,t){return e("span",{class:"vxe-input--number-suffix"},[e("span",{class:"vxe-input--number-prev is--prev",on:{mousedown:t.numberMousedownEvent,mouseup:t.numberStopDown,mouseleave:t.numberStopDown}},[e("i",{class:["vxe-input--number-prev-icon",_conf.default.icon.INPUT_PREV_NUM]})]),e("span",{class:"vxe-input--number-next is--next",on:{mousedown:t.numberMousedownEvent,mouseup:t.numberStopDown,mouseleave:t.numberStopDown}},[e("i",{class:["vxe-input--number-next-icon",_conf.default.icon.INPUT_NEXT_NUM]})])])}function renderDatePickerIcon(e,t){return e("span",{class:"vxe-input--date-picker-suffix",on:{click:t.datePickerOpenEvent}},[e("i",{class:["vxe-input--date-picker-icon",_conf.default.icon.INPUT_DATE]})])}function renderSearchIcon(e,t){return e("span",{class:"vxe-input--search-suffix",on:{click:t.searchEvent}},[e("i",{class:["vxe-input--search-icon",_conf.default.icon.INPUT_SEARCH]})])}function renderPasswordIcon(e,t){var i=t.showPwd;return e("span",{class:"vxe-input--password-suffix",on:{click:t.passwordToggleEvent}},[e("i",{class:["vxe-input--password-icon",i?_conf.default.icon.INPUT_SHOW_PWD:_conf.default.icon.INPUT_PWD]})])}function rendePrefixIcon(e,t){var i=t.$scopedSlots,a=t.prefixIcon,n=[];return i.prefix?n.push(e("span",{class:"vxe-input--prefix-icon"},i.prefix.call(this,{},e))):a&&n.push(e("i",{class:["vxe-input--prefix-icon",a]})),n.length?e("span",{class:"vxe-input--prefix",on:{click:t.clickPrefixEvent}},n):null}function renderSuffixIcon(e,t){var i=t.$scopedSlots,a=t.inputValue,n=t.isClearable,s=t.disabled,r=t.suffixIcon,l=[];return i.suffix?l.push(e("span",{class:"vxe-input--suffix-icon"},i.suffix.call(this,{},e))):r&&l.push(e("i",{class:["vxe-input--suffix-icon",r]})),n&&l.push(e("i",{class:["vxe-input--clear-icon",_conf.default.icon.INPUT_CLEAR]})),l.length?e("span",{class:["vxe-input--suffix",{"is--clear":n&&!s&&!(""===a||_xeUtils.default.eqNull(a))}],on:{click:t.clickSuffixEvent}},l):null}function renderExtraSuffixIcon(e,t){var i,a=t.controls,n=t.isPawdType,s=t.isNumType,r=t.isDatePickerType,l=t.isSearch;return n?i=renderPasswordIcon(e,t):s?a&&(i=renderNumberIcon(e,t)):r?i=renderDatePickerIcon(e,t):l&&(i=renderSearchIcon(e,t)),i?e("span",{class:"vxe-input--extra-suffix"},[i]):null}var _default2={name:"VxeInput",mixins:[_size.default],model:{prop:"value",event:"modelValue"},props:{value:[String,Number,Date],immediate:{type:Boolean,default:!0},name:String,type:{type:String,default:"text"},clearable:{type:Boolean,default:function(){return _conf.default.input.clearable}},readonly:Boolean,disabled:Boolean,placeholder:String,maxlength:[String,Number],autocomplete:{type:String,default:"off"},align:String,form:String,className:String,size:{type:String,default:function(){return _conf.default.input.size||_conf.default.size}},multiple:Boolean,min:{type:[String,Number],default:null},max:{type:[String,Number],default:null},step:[String,Number],exponential:{type:Boolean,default:function(){return _conf.default.input.exponential}},controls:{type:Boolean,default:function(){return _conf.default.input.controls}},digits:{type:[String,Number],default:function(){return _conf.default.input.digits}},dateConfig:Object,minDate:{type:[String,Number,Date],default:function(){return _conf.default.input.minDate}},maxDate:{type:[String,Number,Date],default:function(){return _conf.default.input.maxDate}},startWeek:Number,startDay:{type:[String,Number],default:function(){return _conf.default.input.startDay}},labelFormat:{type:String,default:function(){return _conf.default.input.labelFormat}},valueFormat:{type:String,default:function(){return _conf.default.input.valueFormat}},editable:{type:Boolean,default:!0},festivalMethod:{type:Function,default:function(){return _conf.default.input.festivalMethod}},disabledMethod:{type:Function,default:function(){return _conf.default.input.disabledMethod}},selectDay:{type:Number,default:function(){return _conf.default.input.selectDay}},prefixIcon:String,suffixIcon:String,placement:String,transfer:{type:Boolean,default:function(){return _conf.default.input.transfer}}},data:function(){return{panelIndex:0,showPwd:!1,visiblePanel:!1,animatVisible:!1,panelStyle:null,panelPlacement:null,isActivated:!1,inputValue:this.value,datetimePanelValue:null,datePanelValue:null,datePanelLabel:"",datePanelType:"day",selectMonth:null,currentDate:null}},computed:{isNumType:function(){return-1<["number","integer","float"].indexOf(this.type)},isDatePickerType:function(){return this.isDateTimeType||-1<["date","week","month","quarter","year"].indexOf(this.type)},isDateTimeType:function(){var e=this.type;return"time"===e||"datetime"===e},isPawdType:function(){return"password"===this.type},isSearch:function(){return"search"===this.type},stepValue:function(){var e=this.type,t=this.step;return"integer"===e?_xeUtils.default.toInteger(t)||1:"float"===e?_xeUtils.default.toNumber(t)||1/Math.pow(10,this.digitsValue):_xeUtils.default.toNumber(t)||1},digitsValue:function(){return _xeUtils.default.toInteger(this.digits)||1},isClearable:function(){return this.clearable&&(this.isPawdType||this.isNumType||this.isDatePickerType||"text"===this.type||"search"===this.type)},isDisabledPrevDateBtn:function(){var e=this.selectMonth,t=this.dateMinTime;return!!e&&e<=t},isDisabledNextDateBtn:function(){var e=this.selectMonth,t=this.dateMaxTime;return!!e&&t<=e},dateMinTime:function(){return this.minDate?_xeUtils.default.toStringDate(this.minDate):null},dateMaxTime:function(){return this.maxDate?_xeUtils.default.toStringDate(this.maxDate):null},supportMultiples:function(){return["date","week","month","quarter","year"].includes(this.type)},dateListValue:function(){var t=this,e=this.value,i=this.multiple,a=this.isDatePickerType,n=this.dateValueFormat;return i&&e&&a?_xeUtils.default.toValueString(e).split(",").map(function(e){e=t.parseDate(e,n);return _xeUtils.default.isValidDate(e)?e:null}):[]},dateMultipleValue:function(){var e=this.dateListValue,t=this.dateValueFormat;return e.map(function(e){return _xeUtils.default.toDateString(e,t)})},dateMultipleLabel:function(){var e=this.dateListValue,t=this.dateLabelFormat;return e.map(function(e){return _xeUtils.default.toDateString(e,t)}).join(", ")},dateValue:function(){var e=this.value,t=this.isDatePickerType,i=this.dateValueFormat,a=null;return e&&t&&(i=this.parseDate(e,i),_xeUtils.default.isValidDate(i)&&(a=i)),a},dateTimeLabel:function(){var e=this.datetimePanelValue;return e?_xeUtils.default.toDateString(e,"HH:mm:ss"):""},hmsTime:function(){var e=this.dateValue;return e&&this.isDateTimeType?1e3*(3600*e.getHours()+60*e.getMinutes()+e.getSeconds()):0},dateLabelFormat:function(){return this.isDatePickerType?this.labelFormat||_conf.default.i18n("vxe.input.date.labelFormat.".concat(this.type)):null},dateValueFormat:function(){var e=this.type;return"time"===e?"HH:mm:ss":this.valueFormat||("datetime"===e?"yyyy-MM-dd HH:mm:ss":"yyyy-MM-dd")},selectDatePanelLabel:function(){if(this.isDatePickerType){var e,t=this.datePanelType,i=this.selectMonth,a=this.yearList,n="";return i&&(n=i.getFullYear(),e=i.getMonth()+1),"quarter"===t?_conf.default.i18n("vxe.input.date.quarterLabel",[n]):"month"===t?_conf.default.i18n("vxe.input.date.monthLabel",[n]):"year"===t?a.length?"".concat(a[0].year," - ").concat(a[a.length-1].year):"":_conf.default.i18n("vxe.input.date.dayLabel",[n,e?_conf.default.i18n("vxe.input.date.m".concat(e)):"-"])}return""},firstDayOfWeek:function(){var e=this.startDay,t=this.startWeek;return _xeUtils.default.toNumber(_xeUtils.default.isNumber(e)||_xeUtils.default.isString(e)?e:t)},weekDatas:function(){var e=[];if(this.isDatePickerType){var t=this.firstDayOfWeek;e.push(t);for(var i=0;i<6;i++)6<=t?t=0:t++,e.push(t)}return e},dateHeaders:function(){return this.isDatePickerType?this.weekDatas.map(function(e){return{value:e,label:_conf.default.i18n("vxe.input.date.weeks.w".concat(e))}}):[]},weekHeaders:function(){return this.isDatePickerType?[{label:_conf.default.i18n("vxe.input.date.weeks.w")}].concat(this.dateHeaders):[]},yearList:function(){var e=this.selectMonth,t=this.currentDate,i=[];if(e&&t)for(var a=t.getFullYear(),e=e.getFullYear(),n=new Date(e-e%yearSize,0,1),s=-4;s<yearSize+4;s++){var r=_xeUtils.default.getWhatYear(n,s,"first"),l=r.getFullYear();i.push({date:r,isCurrent:!0,isPrev:s<0,isNow:a===l,isNext:yearSize<=s,year:l})}return i},yearDatas:function(){return _xeUtils.default.chunk(this.yearList,4)},quarterList:function(){var e=this.selectMonth,t=this.currentDate,i=[];if(e&&t)for(var a=t.getFullYear(),n=(0,_date.getDateQuarter)(t),s=_xeUtils.default.getWhatYear(e,0,"first"),r=s.getFullYear(),l=-2;l<quarterSize-2;l++){var u=_xeUtils.default.getWhatQuarter(s,l),o=u.getFullYear(),d=(0,_date.getDateQuarter)(u),c=o<r;i.push({date:u,isPrev:c,isCurrent:o===r,isNow:o===a&&d===n,isNext:!c&&r<o,quarter:d})}return i},quarterDatas:function(){return _xeUtils.default.chunk(this.quarterList,2)},monthList:function(){var e=this.selectMonth,t=this.currentDate,i=[];if(e&&t)for(var a=t.getFullYear(),n=t.getMonth(),s=_xeUtils.default.getWhatYear(e,0,"first").getFullYear(),r=-4;r<monthSize-4;r++){var l=_xeUtils.default.getWhatYear(e,0,r),u=l.getFullYear(),o=l.getMonth(),d=u<s;i.push({date:l,isPrev:d,isCurrent:u===s,isNow:u===a&&o===n,isNext:!d&&s<u,month:o})}return i},monthDatas:function(){return _xeUtils.default.chunk(this.monthList,4)},dayList:function(){var e=this.weekDatas,t=this.selectMonth,i=this.currentDate,a=this.hmsTime,n=[];if(t&&i)for(var s=i.getFullYear(),r=i.getMonth(),l=i.getDate(),u=t.getFullYear(),o=t.getMonth(),i=t.getDay(),i=-e.indexOf(i),d=new Date(_xeUtils.default.getWhatDay(t,i).getTime()+a),c=0;c<42;c++){var h=_xeUtils.default.getWhatDay(d,c),f=h.getFullYear(),p=h.getMonth(),v=h.getDate(),m=h<t;n.push({date:h,isPrev:m,isCurrent:f===u&&p===o,isNow:f===s&&p===r&&v===l,isNext:!m&&o!==p,label:v})}return n},dayDatas:function(){return _xeUtils.default.chunk(this.dayList,7)},weekDates:function(){var e=this.dayDatas,i=this.firstDayOfWeek;return e.map(function(e){var t=e[0];return[{date:t.date,isWeekNumber:!0,isPrev:!1,isCurrent:!1,isNow:!1,isNext:!1,label:_xeUtils.default.getYearWeek(t.date,i)}].concat(e)})},hourList:function(){var e=[];if(this.isDateTimeType)for(var t=0;t<24;t++)e.push({value:t,label:(""+t).padStart(2,0)});return e},minuteList:function(){var e=[];if(this.isDateTimeType)for(var t=0;t<60;t++)e.push({value:t,label:(""+t).padStart(2,0)});return e},secondList:function(){return this.minuteList},inpImmediate:function(){var e=this.type;return this.immediate||!("text"===e||"number"===e||"integer"===e||"float"===e)},inpPlaceholder:function(){var e=this.placeholder;return e?(0,_utils.getFuncText)(e):""},inputType:function(){var e=this.isDatePickerType,t=this.isNumType,i=this.isPawdType,a=this.type,n=this.showPwd;return e||t||i&&n||"number"===a?"text":a},inpMaxlength:function(){var e=this.isNumType,t=this.maxlength;return e&&!_xeUtils.default.toNumber(t)?16:t},inpReadonly:function(){var e=this.type,t=this.readonly,i=this.editable,a=this.multiple;return t||a||!i||"week"===e||"quarter"===e}},watch:{value:function(e){this.inputValue=e,this.changeValue()},type:function(){Object.assign(this,{inputValue:this.value,datetimePanelValue:null,datePanelValue:null,datePanelLabel:"",datePanelType:"day",selectMonth:null,currentDate:null}),this.initValue()},dateLabelFormat:function(){this.isDatePickerType&&(this.dateParseValue(this.datePanelValue),this.inputValue=this.multiple?this.dateMultipleLabel:this.datePanelLabel)}},created:function(){this.initValue(),_event.GlobalEvent.on(this,"mousewheel",this.handleGlobalMousewheelEvent),_event.GlobalEvent.on(this,"mousedown",this.handleGlobalMousedownEvent),_event.GlobalEvent.on(this,"keydown",this.handleGlobalKeydownEvent),_event.GlobalEvent.on(this,"blur",this.handleGlobalBlurEvent)},mounted:function(){this.dateConfig&&(0,_log.warnLog)("vxe.error.removeProp",["date-config"]),this.isDatePickerType&&this.transfer&&document.body.appendChild(this.$refs.panel)},beforeDestroy:function(){var e=this.$refs.panel;e&&e.parentNode&&e.parentNode.removeChild(e)},destroyed:function(){this.numberStopDown(),_event.GlobalEvent.off(this,"mousewheel"),_event.GlobalEvent.off(this,"mousedown"),_event.GlobalEvent.off(this,"keydown"),_event.GlobalEvent.off(this,"blur")},render:function(e){var t=this.name,i=this.form,a=this.inputType,n=this.inpPlaceholder,s=this.inpMaxlength,r=this.inpReadonly,l=this.className,u=this.controls,o=this.inputValue,d=this.isDatePickerType,c=this.visiblePanel,h=this.isActivated,f=this.vSize,p=this.type,v=this.align,m=this.readonly,y=this.disabled,x=this.autocomplete,b=[],g=rendePrefixIcon(e,this),D=renderSuffixIcon(e,this);return g&&b.push(g),b.push(e("input",{ref:"input",class:"vxe-input--inner",domProps:{value:o},attrs:{name:t,form:i,type:a,placeholder:n,maxlength:s,readonly:r,disabled:y,autocomplete:x},on:{keydown:this.keydownEvent,keyup:this.triggerEvent,wheel:this.wheelEvent,click:this.clickEvent,input:this.inputEvent,change:this.changeEvent,focus:this.focusEvent,blur:this.blurEvent}})),D&&b.push(D),b.push(renderExtraSuffixIcon(e,this)),d&&b.push(renderPanel(e,this)),e("div",{class:["vxe-input","type--".concat(p),l,(_defineProperty(l={},"size--".concat(f),f),_defineProperty(l,"is--".concat(v),v),_defineProperty(l,"is--controls",u),_defineProperty(l,"is--prefix",!!g),_defineProperty(l,"is--suffix",!!D),_defineProperty(l,"is--readonly",m),_defineProperty(l,"is--visivle",c),_defineProperty(l,"is--disabled",y),_defineProperty(l,"is--active",h),l)]},b)},methods:{focus:function(){return this.isActivated=!0,this.$refs.input.focus(),this.$nextTick()},blur:function(){return this.$refs.input.blur(),this.isActivated=!1,this.$nextTick()},triggerEvent:function(e){var t=this.$refs,i=this.inputValue;this.$emit(e.type,{$panel:t.panel,value:i,$event:e})},emitModel:function(e,t){this.inputValue=e,this.$emit("modelValue",e),this.$emit("input",{value:e,$event:t}),_xeUtils.default.toValueString(this.value)!==e&&this.$emit("change",{value:e,$event:t})},emitInputEvent:function(e,t){var i=this.inpImmediate,a=this.isDatePickerType;this.inputValue=e,a||(i?this.emitModel(e,t):this.$emit("input",{value:e,$event:t}))},inputEvent:function(e){var t=e.target.value;this.emitInputEvent(t,e)},changeEvent:function(e){this.inpImmediate||this.triggerEvent(e)},focusEvent:function(e){this.isActivated=!0,this.triggerEvent(e)},blurEvent:function(e){var t=this.inputValue;this.inpImmediate||this.emitModel(t,e),this.afterCheckValue(),this.visiblePanel||(this.isActivated=!1),this.$emit("blur",{value:t,$event:e})},keydownEvent:function(e){var t,i,a,n,s=this.exponential,r=this.controls;this.isNumType&&(t=e.ctrlKey,i=e.shiftKey,a=e.altKey,n=e.keyCode,t||i||a||!(32===n||(!s||69!==n)&&65<=n&&n<=90||186<=n&&n<=188||191<=n)||e.preventDefault(),r&&this.numberKeydownEvent(e)),this.triggerEvent(e)},wheelEvent:function(e){var t;this.isNumType&&this.controls&&this.isActivated&&(0<(t=e.deltaY)?this.numberNextEvent(e):t<0&&this.numberPrevEvent(e),e.preventDefault()),this.triggerEvent(e)},clickEvent:function(e){this.isDatePickerType&&this.datePickerOpenEvent(e),this.triggerEvent(e)},clickPrefixEvent:function(e){var t=this.$refs,i=this.disabled,a=this.inputValue;i||this.$emit("prefix-click",{$panel:t.panel,value:a,$event:e})},clickSuffixEvent:function(e){var t=this.$refs,i=this.disabled,a=this.inputValue;i||(_dom.default.hasClass(e.currentTarget,"is--clear")?(this.emitModel("",e),this.clearValueEvent(e,"")):this.$emit("suffix-click",{$panel:t.panel,value:a,$event:e}))},clearValueEvent:function(e,t){var i=this.$refs,a=this.type,n=this.isNumType;this.isDatePickerType&&this.hidePanel(),(n||-1<["text","search","password"].indexOf(a))&&this.focus(),this.$emit("clear",{$panel:i.panel,value:t,$event:e})},parseDate:function(e,t){return"time"===this.type?(0,_date.toStringTimeDate)(e):_xeUtils.default.toStringDate(e,t)},initValue:function(){var e=this.type,t=this.isDatePickerType,i=this.inputValue,a=this.digitsValue;t?this.changeValue():"float"===e&&(!i||i!==(a=(0,_number.toFloatValueFixed)(i,a))&&this.emitModel(a,{type:"init"}))},changeValue:function(){this.isDatePickerType&&(this.dateParseValue(this.inputValue),this.inputValue=this.multiple?this.dateMultipleLabel:this.datePanelLabel)},afterCheckValue:function(){var e,t=this.type,i=this.exponential,a=this.inpReadonly,n=this.inputValue,s=this.isDatePickerType,r=this.isNumType,l=this.datetimePanelValue,u=this.dateLabelFormat,o=this.min,d=this.max,c=this.firstDayOfWeek;a||(r?n&&(e="integer"===t?_xeUtils.default.toInteger((0,_number.handleNumber)(n)):_xeUtils.default.toNumber((0,_number.handleNumber)(n)),this.vaildMinNum(e)?this.vaildMaxNum(e)||(e=d):e=o,!i||(i=_xeUtils.default.toValueString(n).toLowerCase())===_xeUtils.default.toNumber(e).toExponential()&&(e=i),this.emitModel(getNumberValue(this,e),{type:"check"})):s&&(n?"week"===t||"quarter"===t||(e=this.parseDate(n,u),_xeUtils.default.isValidDate(e)?"time"===t?(n!==(e=(0,_date.toStringTimeDate)(e))&&this.emitModel(e,{type:"check"}),this.inputValue=e):(s=!1,"datetime"===t?n===_xeUtils.default.toDateString(this.dateValue,u)&&n===_xeUtils.default.toDateString(e,u)||(s=!0,l.setHours(e.getHours()),l.setMinutes(e.getMinutes()),l.setSeconds(e.getSeconds())):s=!0,this.inputValue=_xeUtils.default.toDateString(e,u,{firstDay:c}),s&&this.dateChange(e)):this.dateRevert()):this.emitModel("",{type:"check"})))},passwordToggleEvent:function(e){var t=this.disabled,i=this.readonly,a=this.showPwd;t||i||(this.showPwd=!a),this.$emit("toggle-visible",{visible:this.showPwd,$event:e})},searchEvent:function(e){this.$emit("search-click",{$event:e})},vaildMinNum:function(e){return null===this.min||e>=_xeUtils.default.toNumber(this.min)},vaildMaxNum:function(e){return null===this.max||e<=_xeUtils.default.toNumber(this.max)},numberStopDown:function(){clearTimeout(this.downbumTimeout)},numberDownPrevEvent:function(e){var t=this;this.downbumTimeout=setTimeout(function(){t.numberPrevEvent(e),t.numberDownPrevEvent(e)},60)},numberDownNextEvent:function(e){var t=this;this.downbumTimeout=setTimeout(function(){t.numberNextEvent(e),t.numberDownNextEvent(e)},60)},numberKeydownEvent:function(e){var t=e.keyCode,i=38===t;!i&&40!==t||(e.preventDefault(),i?this.numberPrevEvent(e):this.numberNextEvent(e))},numberMousedownEvent:function(e){var t,i=this;this.numberStopDown(),0===e.button&&((t=_dom.default.hasClass(e.currentTarget,"is--prev"))?this.numberPrevEvent(e):this.numberNextEvent(e),this.downbumTimeout=setTimeout(function(){t?i.numberDownPrevEvent(e):i.numberDownNextEvent(e)},500))},numberPrevEvent:function(e){var t=this.disabled,i=this.readonly;clearTimeout(this.downbumTimeout),t||i||this.numberChange(!0,e),this.$emit("prev-number",{$event:e})},numberNextEvent:function(e){var t=this.disabled,i=this.readonly;clearTimeout(this.downbumTimeout),t||i||this.numberChange(!1,e),this.$emit("next-number",{$event:e})},numberChange:function(e,t){var i=this.min,a=this.max,n=this.type,s=this.inputValue,r=this.stepValue,s="integer"===n?_xeUtils.default.toInteger((0,_number.handleNumber)(s)):_xeUtils.default.toNumber((0,_number.handleNumber)(s)),r=e?_xeUtils.default.add(s,r):_xeUtils.default.subtract(s,r),i=this.vaildMinNum(r)?this.vaildMaxNum(r)?r:a:i;this.emitInputEvent(getNumberValue(this,i),t)},datePickerOpenEvent:function(e){this.readonly||(e.preventDefault(),this.showPanel())},dateMonthHandle:function(e,t){this.selectMonth=_xeUtils.default.getWhatMonth(e,t,"first")},dateNowHandle:function(){var e=_xeUtils.default.getWhatDay(Date.now(),0,"first");this.currentDate=e,this.dateMonthHandle(e,0)},dateToggleTypeEvent:function(){var e="month"===(e=this.datePanelType)||"quarter"===e?"year":"month";this.datePanelType=e},datePrevEvent:function(e){var t=this.isDisabledPrevDateBtn,i=this.type,a=this.datePanelType;t||(this.selectMonth="year"===i?_xeUtils.default.getWhatYear(this.selectMonth,-yearSize,"first"):"month"===i||"quarter"===i?"year"===a?_xeUtils.default.getWhatYear(this.selectMonth,-yearSize,"first"):_xeUtils.default.getWhatYear(this.selectMonth,-1,"first"):"year"===a?_xeUtils.default.getWhatYear(this.selectMonth,-yearSize,"first"):"month"===a?_xeUtils.default.getWhatYear(this.selectMonth,-1,"first"):_xeUtils.default.getWhatMonth(this.selectMonth,-1,"first"),this.$emit("date-prev",{type:i,$event:e}))},dateTodayMonthEvent:function(e){this.dateNowHandle(),this.multiple||(this.dateChange(this.currentDate),this.hidePanel()),this.$emit("date-today",{type:this.type,$event:e})},dateNextEvent:function(e){var t=this.isDisabledNextDateBtn,i=this.type,a=this.datePanelType;t||(this.selectMonth="year"===i?_xeUtils.default.getWhatYear(this.selectMonth,yearSize,"first"):"month"===i||"quarter"===i?"year"===a?_xeUtils.default.getWhatYear(this.selectMonth,yearSize,"first"):_xeUtils.default.getWhatYear(this.selectMonth,1,"first"):"year"===a?_xeUtils.default.getWhatYear(this.selectMonth,yearSize,"first"):"month"===a?_xeUtils.default.getWhatYear(this.selectMonth,1,"first"):_xeUtils.default.getWhatMonth(this.selectMonth,1,"first"),this.$emit("date-next",{type:i,$event:e}))},dateSelectEvent:function(e){isDateDisabled(this,e)||this.dateSelectItem(e.date)},dateSelectItem:function(e){var t=this.type,i=this.datePanelType,a=this.multiple,n="week"===t;"month"===t?"year"===i?(this.datePanelType="month",this.dateCheckMonth(e)):(this.dateChange(e),a||this.hidePanel()):"year"===t?(this.dateChange(e),a||this.hidePanel()):"quarter"===t?"year"===i?(this.datePanelType="quarter",this.dateCheckMonth(e)):(this.dateChange(e),a||this.hidePanel()):"month"===i?(this.datePanelType="week"===t?t:"day",this.dateCheckMonth(e)):"year"===i?(this.datePanelType="month",this.dateCheckMonth(e)):(this.dateChange(e),a||this.hidePanel()),n&&this.changeValue()},dateMouseenterEvent:function(e){var t;isDateDisabled(this,e)||("month"===(t=this.datePanelType)?this.dateMoveMonth(e.date):"quarter"===t?this.dateMoveQuarter(e.date):"year"===t?this.dateMoveYear(e.date):this.dateMoveDay(e.date))},dateHourEvent:function(e,t){this.datetimePanelValue.setHours(t.value),this.dateTimeChangeEvent(e)},dateConfirmEvent:function(){this.dateChange(this.dateValue||this.currentDate),this.hidePanel()},dateMinuteEvent:function(e,t){this.datetimePanelValue.setMinutes(t.value),this.dateTimeChangeEvent(e)},dateSecondEvent:function(e,t){this.datetimePanelValue.setSeconds(t.value),this.dateTimeChangeEvent(e)},dateTimeChangeEvent:function(e){this.datetimePanelValue=new Date(this.datetimePanelValue.getTime()),this.updateTimePos(e.currentTarget)},updateTimePos:function(e){var t;e&&(t=e.offsetHeight,e.parentNode.scrollTop=e.offsetTop-4*t)},dateMoveDay:function(t){isDateDisabled(this,{date:t})||(this.dayList.some(function(e){return _xeUtils.default.isDateSame(e.date,t,"yyyyMMdd")})||this.dateCheckMonth(t),this.dateParseValue(t))},dateMoveMonth:function(t){isDateDisabled(this,{date:t})||(this.monthList.some(function(e){return _xeUtils.default.isDateSame(e.date,t,"yyyyMM")})||this.dateCheckMonth(t),this.dateParseValue(t))},dateMoveQuarter:function(t){isDateDisabled(this,{date:t})||(this.quarterList.some(function(e){return _xeUtils.default.isDateSame(e.date,t,"yyyyq")})||this.dateCheckMonth(t),this.dateParseValue(t))},dateMoveYear:function(t){isDateDisabled(this,{date:t})||(this.yearList.some(function(e){return _xeUtils.default.isDateSame(e.date,t,"yyyy")})||this.dateCheckMonth(t),this.dateParseValue(t))},dateParseValue:function(e){var t=this.type,i=this.dateLabelFormat,a=this.valueFormat,n=this.firstDayOfWeek,s=null,r="";e&&(s=this.parseDate(e,a)),_xeUtils.default.isValidDate(s)?(r=_xeUtils.default.toDateString(s,i,{firstDay:n}),i&&"week"===t&&_xeUtils.default.getWhatWeek(s,0,n,n).getFullYear()<s.getFullYear()&&(-1<(i=i.indexOf("yyyy"))&&((i=Number(r.substring(i,i+4)))&&!isNaN(i)&&(r=r.replace("".concat(i),"".concat(i-1)))))):s=null,this.datePanelValue=s,this.datePanelLabel=r},dateOffsetEvent:function(e){var t,i,a,n=this.isActivated,s=this.datePanelValue,r=this.datePanelType,l=this.firstDayOfWeek;n&&(e.preventDefault(),t=37===(i=e.keyCode),n=38===i,e=39===i,i=40===i,"year"===r?(a=_xeUtils.default.getWhatYear(s||Date.now(),0,"first"),t?a=_xeUtils.default.getWhatYear(a,-1):n?a=_xeUtils.default.getWhatYear(a,-4):e?a=_xeUtils.default.getWhatYear(a,1):i&&(a=_xeUtils.default.getWhatYear(a,4)),this.dateMoveYear(a)):"quarter"===r?(a=_xeUtils.default.getWhatQuarter(s||Date.now(),0,"first"),t?a=_xeUtils.default.getWhatQuarter(a,-1):n?a=_xeUtils.default.getWhatQuarter(a,-2):e?a=_xeUtils.default.getWhatQuarter(a,1):i&&(a=_xeUtils.default.getWhatQuarter(a,2)),this.dateMoveQuarter(a)):"month"===r?(r=_xeUtils.default.getWhatMonth(s||Date.now(),0,"first"),t?r=_xeUtils.default.getWhatMonth(r,-1):n?r=_xeUtils.default.getWhatMonth(r,-4):e?r=_xeUtils.default.getWhatMonth(r,1):i&&(r=_xeUtils.default.getWhatMonth(r,4)),this.dateMoveMonth(r)):(s=s||_xeUtils.default.getWhatDay(Date.now(),0,"first"),t?s=_xeUtils.default.getWhatDay(s,-1):n?s=_xeUtils.default.getWhatWeek(s,-1,l):e?s=_xeUtils.default.getWhatDay(s,1):i&&(s=_xeUtils.default.getWhatWeek(s,1,l)),this.dateMoveDay(s)))},datePgOffsetEvent:function(e){var t;this.isActivated&&(t=33===e.keyCode,e.preventDefault(),t?this.datePrevEvent(e):this.dateNextEvent(e))},dateChange:function(t){var e,i=this.value,a=this.datetimePanelValue,n=this.dateValueFormat,s=this.firstDayOfWeek,r=this.isDateTimeType,l=this.multiple;"week"===this.type?(e=_xeUtils.default.toNumber(this.selectDay),t=_xeUtils.default.getWhatWeek(t,0,e,s)):r&&(t.setHours(a.getHours()),t.setMinutes(a.getMinutes()),t.setSeconds(a.getSeconds()));var u,o=_xeUtils.default.toDateString(t,n,{firstDay:s});this.dateCheckMonth(t),l?(l=this.dateMultipleValue,r?(r=this.dateListValue,u=[],r.forEach(function(e){e&&!_xeUtils.default.isDateSame(t,e,"yyyyMMdd")&&(e.setHours(a.getHours()),e.setMinutes(a.getMinutes()),e.setSeconds(a.getSeconds()),u.push(e))}),u.push(t),this.emitModel(u.map(function(e){return _xeUtils.default.toDateString(e,n)}).join(","),{type:"update"})):l.some(function(e){return _xeUtils.default.isEqual(e,o)})?this.emitModel(l.filter(function(e){return!_xeUtils.default.isEqual(e,o)}).join(","),{type:"update"}):this.emitModel(l.concat([o]).join(","),{type:"update"})):_xeUtils.default.isEqual(i,o)||this.emitModel(o,{type:"update"})},dateCheckMonth:function(e){e=_xeUtils.default.getWhatMonth(e,0,"first");_xeUtils.default.isEqual(e,this.selectMonth)||(this.selectMonth=e)},dateOpenPanel:function(){var e=this,t=this.type,i=this.dateValue;-1<["year","quarter","month","week"].indexOf(t)?this.datePanelType=t:this.datePanelType="day",this.currentDate=_xeUtils.default.getWhatDay(Date.now(),0,"first"),i?(this.dateMonthHandle(i,0),this.dateParseValue(i)):this.dateNowHandle(),this.isDateTimeType&&(this.datetimePanelValue=this.datePanelValue||_xeUtils.default.getWhatDay(Date.now(),0,"first"),this.$nextTick(function(){_xeUtils.default.arrayEach(e.$refs.timeBody.querySelectorAll("li.is--selected"),e.updateTimePos)}))},dateRevert:function(){this.inputValue=this.multiple?this.dateMultipleLabel:this.datePanelLabel},updateZindex:function(){this.panelIndex<_utils.default.getLastZIndex()&&(this.panelIndex=_utils.default.nextZIndex())},showPanel:function(){var e=this,t=this.disabled,i=this.visiblePanel,a=this.isDatePickerType;return t||i?this.$nextTick():(clearTimeout(this.hidePanelTimeout),this.isActivated=!0,this.animatVisible=!0,a&&this.dateOpenPanel(),setTimeout(function(){e.visiblePanel=!0},10),this.updateZindex(),this.updatePlacement())},hidePanel:function(){var t=this;return new Promise(function(e){t.visiblePanel=!1,t.hidePanelTimeout=setTimeout(function(){t.animatVisible=!1,e()},350)})},updatePlacement:function(){var h=this;return this.$nextTick().then(function(){var e=h.$refs,t=h.transfer,i=h.placement,a=h.panelIndex,n=e.input,s=e.panel;if(n&&s){var r=n.offsetHeight,l=n.offsetWidth,u=s.offsetHeight,o=s.offsetWidth,d={zIndex:a},c=_dom.default.getAbsolutePos(n),e=c.boundingTop,s=c.boundingLeft,a=c.visibleHeight,n=c.visibleWidth,c="bottom";return t?(t=e+r,"top"===i?(c="top",t=e-u):i||(a<t+u+5&&(c="top",t=e-u),t<5&&(c="bottom",t=e+r)),n<(s=s)+o+5&&(s-=s+o+5-n),s<5&&(s=5),Object.assign(d,{left:"".concat(s,"px"),top:"".concat(t,"px"),minWidth:"".concat(l,"px")})):"top"===i?(c="top",d.bottom="".concat(r,"px")):i||a<e+r+u&&5<e-r-u&&(c="top",d.bottom="".concat(r,"px")),h.panelStyle=d,h.panelPlacement=c,h.$nextTick()}})},handleGlobalMousedownEvent:function(e){var t=this.$refs,i=this.$el,a=this.disabled,n=this.visiblePanel,s=this.isActivated;!a&&s&&(this.isActivated=_dom.default.getEventTargetNode(e,i).flag||_dom.default.getEventTargetNode(e,t.panel).flag,this.isActivated||(this.isDatePickerType?n&&(this.hidePanel(),this.afterCheckValue()):this.afterCheckValue()))},handleGlobalKeydownEvent:function(e){var t,i,a,n,s,r,l,u,o,d,c=this.isDatePickerType,h=this.visiblePanel,f=this.clearable;this.disabled||(i=46===(t=e.keyCode),a=27===t,n=13===t,s=38===t,r=40===t,l=33===t,u=34===t,o=37===t||s||39===t||r,d=this.isActivated,(t=9===t)?(d&&this.afterCheckValue(),this.isActivated=d=!1):o?c&&d&&(h?this.dateOffsetEvent(e):(s||r)&&this.datePickerOpenEvent(e)):n?c&&(h?this.datePanelValue?this.dateSelectItem(this.datePanelValue):this.hidePanel():d&&this.datePickerOpenEvent(e)):(l||u)&&c&&d&&this.datePgOffsetEvent(e),t||a?h&&this.hidePanel():i&&f&&d&&this.clearValueEvent(e,null))},handleGlobalMousewheelEvent:function(e){var t=this.$refs,i=this.disabled,a=this.visiblePanel;i||a&&(_dom.default.getEventTargetNode(e,t.panel).flag?this.updatePlacement():(this.hidePanel(),this.afterCheckValue()))},handleGlobalBlurEvent:function(){var e=this.isActivated;this.visiblePanel?(this.hidePanel(),this.afterCheckValue()):e&&this.afterCheckValue()}}};exports.default=_default2;
@@ -415,17 +415,30 @@ function renderRows(h, _vm, $xetable, fixedType, tableData, tableColumn) {
415
415
  row: row,
416
416
  rowIndex: rowIndex,
417
417
  $rowIndex: $rowIndex
418
- };
418
+ }; // 行是否被展开
419
+
420
+ var isExpandRow = expandColumn && rowExpandeds.length && rowExpandeds.indexOf(row) > -1; // 树节点是否被展开
421
+
422
+ var isExpandTree = false;
423
+ var rowChildren = []; // 是否新增行
424
+
419
425
  var isNewRow = false;
420
426
 
421
427
  if (editConfig) {
422
428
  isNewRow = editStore.insertList.indexOf(row) > -1;
423
429
  }
424
430
 
431
+ if (treeConfig && !scrollYLoad && !treeOpts.transform && treeExpandeds.length) {
432
+ rowChildren = row[treeOpts.children];
433
+ isExpandTree = rowChildren && rowChildren.length && treeExpandeds.indexOf(row) > -1;
434
+ }
435
+
425
436
  rows.push(h('tr', {
426
- class: ['vxe-body--row', {
437
+ class: ['vxe-body--row', treeConfig ? "row--level-".concat(rowLevel) : '', {
427
438
  'row--stripe': stripe && ($xetable.getVTRowIndex(row) + 1) % 2 === 0,
428
439
  'is--new': isNewRow,
440
+ 'is--expand-row': isExpandRow,
441
+ 'is--expand-tree': isExpandTree,
429
442
  'row--new': isNewRow && (editOpts.showStatus || editOpts.showInsertStatus),
430
443
  'row--radio': radioOpts.highlight && $xetable.selectRow === row,
431
444
  'row--checked': checkboxOpts.highlight && $xetable.isCheckedByCheckboxRow(row)
@@ -440,7 +453,7 @@ function renderRows(h, _vm, $xetable, fixedType, tableData, tableColumn) {
440
453
  return renderColumn(h, _vm, $xetable, seq, rowid, fixedType, rowLevel, row, rowIndex, $rowIndex, _rowIndex, column, $columnIndex, tableColumn, tableData);
441
454
  }))); // 如果行被展开了
442
455
 
443
- if (expandColumn && rowExpandeds.length && rowExpandeds.indexOf(row) > -1) {
456
+ if (isExpandRow) {
444
457
  var cellStyle;
445
458
 
446
459
  if (treeConfig) {
@@ -482,12 +495,8 @@ function renderRows(h, _vm, $xetable, fixedType, tableData, tableColumn) {
482
495
  } // 如果是树形表格
483
496
 
484
497
 
485
- if (treeConfig && !scrollYLoad && !treeOpts.transform && treeExpandeds.length) {
486
- var rowChildren = row[treeOpts.children];
487
-
488
- if (rowChildren && rowChildren.length && treeExpandeds.indexOf(row) > -1) {
489
- rows.push.apply(rows, _toConsumableArray(renderRows(h, _vm, $xetable, fixedType, rowChildren, tableColumn)));
490
- }
498
+ if (isExpandTree) {
499
+ rows.push.apply(rows, _toConsumableArray(renderRows(h, _vm, $xetable, fixedType, rowChildren, tableColumn)));
491
500
  }
492
501
  });
493
502
  return rows;
@@ -1 +1 @@
1
- "use strict";function _typeof(e){return(_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}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")),_utils=_interopRequireWildcard(require("../../tools/utils")),_util=require("./util"),_dom=_interopRequireDefault(require("../../tools/dom"));function _getRequireWildcardCache(e){if("function"!=typeof WeakMap)return null;var l=new WeakMap,t=new WeakMap;return(_getRequireWildcardCache=function(e){return e?t:l})(e)}function _interopRequireWildcard(e,l){if(!l&&e&&e.__esModule)return e;if(null===e||"object"!==_typeof(e)&&"function"!=typeof e)return{default:e};l=_getRequireWildcardCache(l);if(l&&l.has(e))return l.get(e);var t,r,o={},n=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(t in e)"default"!==t&&Object.prototype.hasOwnProperty.call(e,t)&&((r=n?Object.getOwnPropertyDescriptor(e,t):null)&&(r.get||r.set)?Object.defineProperty(o,t,r):o[t]=e[t]);return o.default=e,l&&l.set(e,o),o}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,r=new Array(l);t<l;t++)r[t]=e[t];return r}var scrollProcessTimeout,renderType="body";function isOperateMouse(e){return e._isResize||e.lastScrollTime&&Date.now()<e.lastScrollTime+e.delayHover}function renderLine(e,l,t,r){var o=r.row,n=r.column,i=t.treeOpts,a=t.treeConfig,s=t.fullAllDataRowIdData,c=n.slots,d=n.treeNode,u=s[(0,_util.getRowid)(t,o)],n=0,s=0,o=[];return u&&(n=u.level,s=u._index,o=u.items),c&&c.line?t.callSlot(c.line,r,e):a&&d&&i.line?[e("div",{class:"vxe-tree--line-wrapper"},[e("div",{class:"vxe-tree--line",style:{height:"".concat((0,_util.calcTreeLine)(r,o,s),"px"),left:"".concat(n*i.indent+(n?2-(0,_util.getOffsetSize)(t):0)+16,"px")}})])]:[]}function renderColumn(e,l,t,r,o,n,i,a,s,c,d,u,p,f,y){var h,g=t.$listeners,v=t.afterFullData,m=t.tableData,w=t.height,b=t.columnKey,x=t.overflowX,_=t.sYOpts,T=t.scrollXLoad,S=t.scrollYLoad,O=t.highlightCurrentRow,C=t.showOverflow,L=t.isAllOverflow,$=t.align,R=t.currentColumn,k=t.cellClassName,I=t.cellStyle,H=t.mergeList,E=t.spanMethod,A=t.radioOpts,Y=t.checkboxOpts,P=t.expandOpts,W=t.treeOpts,D=t.tooltipOpts,M=t.mouseConfig,q=t.editConfig,B=t.editOpts,j=t.editRules,U=t.validOpts,X=t.editStore,N=t.validStore,z=t.tooltipConfig,F=t.rowOpts,K=t.columnOpts,V=u.type,G=u.cellRender,J=u.editRender,Q=u.align,Z=u.showOverflow,ee=u.className,le=u.treeNode,te=X.actived,re=_.rHeight,oe=F.height,ne=D.showAll||D.enabled,ie=t.getColumnIndex(u),ae=t.getVTColumnIndex(u),X=(0,_utils.isEnableConf)(J),_=n?u.fixed!==n:u.fixed&&x,D=_xeUtils.default.isUndefined(Z)||_xeUtils.default.isNull(Z)?C:Z,x="ellipsis"===D,se="title"===D,ce=!0===D||"tooltip"===D,Z=se||ce||x,D={},Q=Q||$,$=N.row===a&&N.column===u,j=j&&U.showMessage&&("default"===U.message?w||1<m.length:"inline"===U.message),w={colid:u.id},de=g["cell-mouseenter"],ue=g["cell-mouseleave"],U=J&&q&&"dblclick"===B.trigger,pe={$table:t,seq:r,rowid:o,row:a,rowIndex:s,$rowIndex:c,_rowIndex:d,column:u,columnIndex:ie,$columnIndex:p,_columnIndex:ae,fixed:n,type:renderType,isHidden:_,level:i,visibleData:v,data:m,items:y};if(!T&&!S||Z||(x=Z=!0),(se||ce||ne||de||z)&&(D.mouseenter=function(e){isOperateMouse(t)||(se?_dom.default.updateCellTitle(e.currentTarget,u):(ce||ne)&&t.triggerBodyTooltipEvent(e,pe),de&&t.emitEvent("cell-mouseenter",Object.assign({cell:e.currentTarget},pe),e))}),(ce||ne||ue||z)&&(D.mouseleave=function(e){isOperateMouse(t)||((ce||ne)&&t.handleTargetLeaveEvent(e),ue&&t.emitEvent("cell-mouseleave",Object.assign({cell:e.currentTarget},pe),e))}),(Y.range||M)&&(D.mousedown=function(e){t.triggerCellMousedownEvent(e,pe)}),(F.isCurrent||O||g["cell-click"]||J&&q||"row"===P.trigger||"cell"===P.trigger||"row"===A.trigger||"radio"===u.type&&"cell"===A.trigger||"row"===Y.trigger||"checkbox"===u.type&&"cell"===Y.trigger||"row"===W.trigger||u.treeNode&&"cell"===W.trigger)&&(D.click=function(e){t.triggerCellClickEvent(e,pe)}),(U||g["cell-dblclick"])&&(D.dblclick=function(e){t.triggerCellDblclickEvent(e,pe)}),H.length){d=(0,_util.mergeBodyMethod)(H,d,ae);if(d){var ae=d.rowspan,fe=d.colspan;if(!ae||!fe)return null;1<ae&&(w.rowspan=ae),1<fe&&(w.colspan=fe)}}else if(E){fe=E(pe)||{},E=fe.rowspan,E=void 0===E?1:E,fe=fe.colspan,fe=void 0===fe?1:fe;if(!E||!fe)return null;1<E&&(w.rowspan=E),1<fe&&(w.colspan=fe)}!(_=_&&H&&(1<w.colspan||1<w.rowspan)?!1:_)&&q&&(J||G)&&(B.showStatus||B.showUpdateStatus)&&(h=t.isUpdateByRow(a,u.property));G=[];return _&&C&&L?G.push(e("div",{class:["vxe-cell",{"c--title":se,"c--tooltip":ce,"c--ellipsis":x}],style:{maxHeight:Z&&(re||oe)?"".concat(re||oe,"px"):""}})):(G.push.apply(G,_toConsumableArray(renderLine(e,l,t,pe)).concat([e("div",{class:["vxe-cell",{"c--title":se,"c--tooltip":ce,"c--ellipsis":x}],style:{maxHeight:Z&&(re||oe)?"".concat(re||oe,"px"):""},attrs:{title:se?t.getCellLabel(a,u):null}},u.renderCell(e,pe))])),j&&$&&G.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(Q),Q),_defineProperty(e,"col--".concat(V),V),_defineProperty(e,"col--last",p===f.length-1),_defineProperty(e,"col--tree-node",le),_defineProperty(e,"col--edit",X),_defineProperty(e,"col--ellipsis",Z),_defineProperty(e,"fixed--hidden",_),_defineProperty(e,"col--dirty",h),_defineProperty(e,"col--actived",q&&X&&te.row===a&&(te.column===u||"row"===B.mode)),_defineProperty(e,"col--valid-error",$),_defineProperty(e,"col--current",R===u),e),_utils.default.getClass(ee,pe),_utils.default.getClass(k,pe)],key:b||K.useKey?u.id:p,attrs:w,style:Object.assign({height:Z&&(re||oe)?"".concat(re||oe,"px"):""},I?_xeUtils.default.isFunction(I)?I(pe):I:null),on:D},G)}function renderRows(p,f,y,h,g,v){var m=y.stripe,w=y.rowKey,b=y.highlightHoverRow,x=y.rowClassName,_=y.rowStyle,T=y.editConfig,S=y.showOverflow,O=y.treeConfig,C=y.treeOpts,L=y.editOpts,$=y.treeExpandeds,R=y.scrollYLoad,k=y.editStore,I=y.rowExpandeds,H=y.radioOpts,E=y.checkboxOpts,A=y.expandColumn,Y=y.hasFixedColumn,P=y.fullAllDataRowIdData,W=y.rowOpts,D=[];return g.forEach(function(t,r){var e={},o=y.getVTRowIndex(t),n=y.getRowIndex(t);(W.isHover||b)&&(e.mouseenter=function(e){isOperateMouse(y)||y.triggerHoverEvent(e,{row:t,rowIndex:n})},e.mouseleave=function(){isOperateMouse(y)||y.clearHoverRow()});var l,i,a=(0,_util.getRowid)(y,t),s=P[a],c=s?s.level:0,d=s?s.seq:-1,u={$table:y,seq:d,rowid:a,fixed:h,type:renderType,level:c,row:t,rowIndex:n,$rowIndex:r},s=!1;T&&(s=-1<k.insertList.indexOf(t)),D.push(p("tr",{class:["vxe-body--row",{"row--stripe":m&&(y.getVTRowIndex(t)+1)%2==0,"is--new":s,"row--new":s&&(L.showStatus||L.showInsertStatus),"row--radio":H.highlight&&y.selectRow===t,"row--checked":E.highlight&&y.isCheckedByCheckboxRow(t)},x?_xeUtils.default.isFunction(x)?x(u):x:""],attrs:{rowid:a},style:_?_xeUtils.default.isFunction(_)?_(u):_:null,key:w||W.useKey||O?a:r,on:e},v.map(function(e,l){return renderColumn(p,f,y,d,a,h,c,t,n,r,o,e,l,v,g)}))),A&&I.length&&-1<I.indexOf(t)&&(O&&(l={paddingLeft:"".concat(c*C.indent+30,"px")}),i=A.showOverflow,u=_xeUtils.default.isUndefined(i)||_xeUtils.default.isNull(i)?S:i,i={$table:y,seq:d,column:A,fixed:h,type:renderType,level:c,row:t,rowIndex:n,$rowIndex:r},D.push(p("tr",{class:"vxe-body--expanded-row",key:"expand_".concat(a),style:_?_xeUtils.default.isFunction(_)?_(i):_:null,on:e},[p("td",{class:["vxe-body--expanded-column",{"fixed--hidden":h&&!Y,"col--ellipsis":u}],attrs:{colspan:v.length}},[p("div",{class:"vxe-body--expanded-cell",style:l},[A.renderData(p,i)])])]))),!O||R||C.transform||!$.length||(i=t[C.children])&&i.length&&-1<$.indexOf(t)&&D.push.apply(D,_toConsumableArray(renderRows(p,f,y,h,i,v)))}),D}function syncBodyScroll(e,l,t,r,o){(r||o)&&(r&&((0,_util.removeScrollListener)(r),r.scrollTop=t),o&&((0,_util.removeScrollListener)(o),o.scrollTop=t),clearTimeout(scrollProcessTimeout),scrollProcessTimeout=setTimeout(function(){(0,_util.restoreScrollListener)(r),(0,_util.restoreScrollListener)(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,r=this.fixedType,e=e.elemStore,r="".concat(r||"main","-body-");e["".concat(r,"wrapper")]=l,e["".concat(r,"table")]=t.table,e["".concat(r,"colgroup")]=t.colgroup,e["".concat(r,"list")]=t.tbody,e["".concat(r,"xSpace")]=t.xSpace,e["".concat(r,"ySpace")]=t.ySpace,e["".concat(r,"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,r=this.fixedColumn,o=this.fixedType,n=l.$scopedSlots,i=l.tId,a=l.tableData,s=l.tableColumn,c=l.visibleColumn,d=l.showOverflow,u=l.keyboardConfig,p=l.keyboardOpts,f=l.mergeList,y=l.spanMethod,h=l.scrollXLoad,g=l.scrollYLoad,v=l.isAllOverflow,m=l.emptyOpts,w=l.mouseConfig,b=l.mouseOpts,x=l.sYOpts;return o&&(s=!(h||g||d&&v)||f.length||y||u&&p.isMerge?c:r),m=n.empty?n.empty.call(this,{$table:l},t):(n=(n=m.name?_vXETable.default.renderer.get(m.name):null)?n.renderEmpty:null)?n.call(this,t,m,{$table:l}):l.emptyText||_conf.default.i18n("vxe.table.emptyText"),t("div",{class:["vxe-table--body-wrapper",o?"fixed-".concat(o,"--wrapper"):"body--wrapper"],attrs:{xid:i},on:g&&"wheel"===x.mode?{wheel:this.wheelEvent}:{}},[o?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:i,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,o,a,s))]),t("div",{class:"vxe-table--checkbox-range"}),w&&b.area?t("div",{class:"vxe-table--cell-area"},[t("span",{class:"vxe-table--cell-main-area"},b.extension?[t("span",{class:"vxe-table--cell-main-area-btn",on:{mousedown:function(e){l.triggerCellExtendMousedownEvent(e,{$table:l,fixed:o,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,o?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,r=this.fixedType,o=t.$refs,n=t.elemStore,i=t.highlightHoverRow,a=t.scrollXLoad,s=t.scrollYLoad,c=t.lastScrollTop,d=t.lastScrollLeft,u=t.rowOpts,p=o.tableHeader,f=o.tableBody,y=o.leftBody,h=o.rightBody,g=o.tableFooter,v=o.validTip,m=p?p.$el:null,o=g?g.$el:null,p=f.$el,g=y?y.$el:null,f=h?h.$el:null,y=n["main-body-ySpace"],h=n["main-body-xSpace"],n=(s&&y?y:p).clientHeight,y=(a&&h?h:p).clientWidth,h=l.scrollTop,l=p.scrollLeft,d=l!==d,c=h!==c;t.lastScrollTop=h,t.lastScrollLeft=l,t.lastScrollTime=Date.now(),(u.isHover||i)&&t.clearHoverRow(),g&&"left"===r?syncBodyScroll(t,r,h=g.scrollTop,p,f):f&&"right"===r?syncBodyScroll(t,r,h=f.scrollTop,p,g):(d&&(m&&(m.scrollLeft=p.scrollLeft),o&&(o.scrollLeft=p.scrollLeft)),(g||f)&&(t.checkScrolling(),c&&syncBodyScroll(t,r,h,g,f))),a&&d&&t.triggerScrollXEvent(e),s&&c&&t.triggerScrollYEvent(e),d&&v&&v.visible&&v.updatePlacement(),t.emitEvent("scroll",{type:renderType,fixed:r,scrollTop:h,scrollLeft:l,scrollHeight:p.scrollHeight,scrollWidth:p.scrollWidth,bodyHeight:n,bodyWidth:y,isX:d,isY:c},e)},handleWheel:function(a,s,e,c,d){var u=this,p=this.$parent,l=p.$refs,t=p.elemStore,r=p.scrollYLoad,o=p.scrollXLoad,n=l.tableBody,i=l.leftBody,l=l.rightBody,f=n.$el,y=i?i.$el:null,h=l?l.$el:null,i=this.isPrevWheelTop===s?Math.max(0,this.wheelYSize-this.wheelYTotal):0,l=t["main-body-ySpace"],t=t["main-body-xSpace"],g=(r&&l?l:f).clientHeight,v=(o&&t?t:f).clientWidth;this.isPrevWheelTop=s,this.wheelYSize=Math.abs(s?e-i:e+i),this.wheelYInterval=0,this.wheelYTotal=0,clearTimeout(this.wheelTime),function e(){var l,t,r=u.fixedType,o=u.wheelYTotal,n=u.wheelYSize,i=u.wheelYInterval;o<n&&(n<(o+=i=Math.max(5,Math.floor(1.5*i)))&&(i-=o-n),t=f.scrollTop,l=f.clientHeight,n=f.scrollHeight,f.scrollTop=t=t+i*(s?-1:1),y&&(y.scrollTop=t),h&&(h.scrollTop=t),(s?t<n-l:0<=t)&&(u.wheelTime=setTimeout(e,10)),u.wheelYTotal=o,u.wheelYInterval=i,p.emitEvent("scroll",{type:renderType,fixed:r,scrollTop:f.scrollTop,scrollLeft:f.scrollLeft,scrollHeight:f.scrollHeight,scrollWidth:f.scrollWidth,bodyHeight:g,bodyWidth:v,isX:c,isY:d},a))}()},wheelEvent:function(e){var l=e.deltaY,t=e.deltaX,r=this.$el,o=this.$parent,n=o.$refs,i=o.highlightHoverRow,a=o.scrollYLoad,s=o.lastScrollTop,c=o.lastScrollLeft,d=o.rowOpts,u=n.tableBody.$el,n=l,l=n<0;(l?r.scrollTop<=0:r.scrollTop>=r.scrollHeight-r.clientHeight)||(r=r.scrollTop+n,c=(t=u.scrollLeft+t)!==c,(s=r!==s)&&(e.preventDefault(),o.lastScrollTop=r,o.lastScrollLeft=t,o.lastScrollTime=Date.now(),(d.isHover||i)&&o.clearHoverRow(),this.handleWheel(e,l,n,c,s),a&&o.triggerScrollYEvent(e)))}}};exports.default=_default;
1
+ "use strict";function _typeof(e){return(_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}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")),_utils=_interopRequireWildcard(require("../../tools/utils")),_util=require("./util"),_dom=_interopRequireDefault(require("../../tools/dom"));function _getRequireWildcardCache(e){if("function"!=typeof WeakMap)return null;var l=new WeakMap,t=new WeakMap;return(_getRequireWildcardCache=function(e){return e?t:l})(e)}function _interopRequireWildcard(e,l){if(!l&&e&&e.__esModule)return e;if(null===e||"object"!==_typeof(e)&&"function"!=typeof e)return{default:e};l=_getRequireWildcardCache(l);if(l&&l.has(e))return l.get(e);var t,r,o={},n=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(t in e)"default"!==t&&Object.prototype.hasOwnProperty.call(e,t)&&((r=n?Object.getOwnPropertyDescriptor(e,t):null)&&(r.get||r.set)?Object.defineProperty(o,t,r):o[t]=e[t]);return o.default=e,l&&l.set(e,o),o}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,r=new Array(l);t<l;t++)r[t]=e[t];return r}var scrollProcessTimeout,renderType="body";function isOperateMouse(e){return e._isResize||e.lastScrollTime&&Date.now()<e.lastScrollTime+e.delayHover}function renderLine(e,l,t,r){var o=r.row,n=r.column,i=t.treeOpts,a=t.treeConfig,s=t.fullAllDataRowIdData,c=n.slots,d=n.treeNode,u=s[(0,_util.getRowid)(t,o)],n=0,s=0,o=[];return u&&(n=u.level,s=u._index,o=u.items),c&&c.line?t.callSlot(c.line,r,e):a&&d&&i.line?[e("div",{class:"vxe-tree--line-wrapper"},[e("div",{class:"vxe-tree--line",style:{height:"".concat((0,_util.calcTreeLine)(r,o,s),"px"),left:"".concat(n*i.indent+(n?2-(0,_util.getOffsetSize)(t):0)+16,"px")}})])]:[]}function renderColumn(e,l,t,r,o,n,i,a,s,c,d,u,p,f,y){var h,g=t.$listeners,v=t.afterFullData,m=t.tableData,w=t.height,b=t.columnKey,x=t.overflowX,_=t.sYOpts,T=t.scrollXLoad,S=t.scrollYLoad,O=t.highlightCurrentRow,C=t.showOverflow,L=t.isAllOverflow,$=t.align,R=t.currentColumn,k=t.cellClassName,I=t.cellStyle,H=t.mergeList,E=t.spanMethod,A=t.radioOpts,Y=t.checkboxOpts,P=t.expandOpts,W=t.treeOpts,D=t.tooltipOpts,M=t.mouseConfig,q=t.editConfig,B=t.editOpts,j=t.editRules,U=t.validOpts,X=t.editStore,N=t.validStore,z=t.tooltipConfig,F=t.rowOpts,K=t.columnOpts,V=u.type,G=u.cellRender,J=u.editRender,Q=u.align,Z=u.showOverflow,ee=u.className,le=u.treeNode,te=X.actived,re=_.rHeight,oe=F.height,ne=D.showAll||D.enabled,ie=t.getColumnIndex(u),ae=t.getVTColumnIndex(u),X=(0,_utils.isEnableConf)(J),_=n?u.fixed!==n:u.fixed&&x,D=_xeUtils.default.isUndefined(Z)||_xeUtils.default.isNull(Z)?C:Z,x="ellipsis"===D,se="title"===D,ce=!0===D||"tooltip"===D,Z=se||ce||x,D={},Q=Q||$,$=N.row===a&&N.column===u,j=j&&U.showMessage&&("default"===U.message?w||1<m.length:"inline"===U.message),w={colid:u.id},de=g["cell-mouseenter"],ue=g["cell-mouseleave"],U=J&&q&&"dblclick"===B.trigger,pe={$table:t,seq:r,rowid:o,row:a,rowIndex:s,$rowIndex:c,_rowIndex:d,column:u,columnIndex:ie,$columnIndex:p,_columnIndex:ae,fixed:n,type:renderType,isHidden:_,level:i,visibleData:v,data:m,items:y};if(!T&&!S||Z||(x=Z=!0),(se||ce||ne||de||z)&&(D.mouseenter=function(e){isOperateMouse(t)||(se?_dom.default.updateCellTitle(e.currentTarget,u):(ce||ne)&&t.triggerBodyTooltipEvent(e,pe),de&&t.emitEvent("cell-mouseenter",Object.assign({cell:e.currentTarget},pe),e))}),(ce||ne||ue||z)&&(D.mouseleave=function(e){isOperateMouse(t)||((ce||ne)&&t.handleTargetLeaveEvent(e),ue&&t.emitEvent("cell-mouseleave",Object.assign({cell:e.currentTarget},pe),e))}),(Y.range||M)&&(D.mousedown=function(e){t.triggerCellMousedownEvent(e,pe)}),(F.isCurrent||O||g["cell-click"]||J&&q||"row"===P.trigger||"cell"===P.trigger||"row"===A.trigger||"radio"===u.type&&"cell"===A.trigger||"row"===Y.trigger||"checkbox"===u.type&&"cell"===Y.trigger||"row"===W.trigger||u.treeNode&&"cell"===W.trigger)&&(D.click=function(e){t.triggerCellClickEvent(e,pe)}),(U||g["cell-dblclick"])&&(D.dblclick=function(e){t.triggerCellDblclickEvent(e,pe)}),H.length){d=(0,_util.mergeBodyMethod)(H,d,ae);if(d){var ae=d.rowspan,fe=d.colspan;if(!ae||!fe)return null;1<ae&&(w.rowspan=ae),1<fe&&(w.colspan=fe)}}else if(E){fe=E(pe)||{},E=fe.rowspan,E=void 0===E?1:E,fe=fe.colspan,fe=void 0===fe?1:fe;if(!E||!fe)return null;1<E&&(w.rowspan=E),1<fe&&(w.colspan=fe)}!(_=_&&H&&(1<w.colspan||1<w.rowspan)?!1:_)&&q&&(J||G)&&(B.showStatus||B.showUpdateStatus)&&(h=t.isUpdateByRow(a,u.property));G=[];return _&&C&&L?G.push(e("div",{class:["vxe-cell",{"c--title":se,"c--tooltip":ce,"c--ellipsis":x}],style:{maxHeight:Z&&(re||oe)?"".concat(re||oe,"px"):""}})):(G.push.apply(G,_toConsumableArray(renderLine(e,l,t,pe)).concat([e("div",{class:["vxe-cell",{"c--title":se,"c--tooltip":ce,"c--ellipsis":x}],style:{maxHeight:Z&&(re||oe)?"".concat(re||oe,"px"):""},attrs:{title:se?t.getCellLabel(a,u):null}},u.renderCell(e,pe))])),j&&$&&G.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(Q),Q),_defineProperty(e,"col--".concat(V),V),_defineProperty(e,"col--last",p===f.length-1),_defineProperty(e,"col--tree-node",le),_defineProperty(e,"col--edit",X),_defineProperty(e,"col--ellipsis",Z),_defineProperty(e,"fixed--hidden",_),_defineProperty(e,"col--dirty",h),_defineProperty(e,"col--actived",q&&X&&te.row===a&&(te.column===u||"row"===B.mode)),_defineProperty(e,"col--valid-error",$),_defineProperty(e,"col--current",R===u),e),_utils.default.getClass(ee,pe),_utils.default.getClass(k,pe)],key:b||K.useKey?u.id:p,attrs:w,style:Object.assign({height:Z&&(re||oe)?"".concat(re||oe,"px"):""},I?_xeUtils.default.isFunction(I)?I(pe):I:null),on:D},G)}function renderRows(y,h,g,v,m,w){var b=g.stripe,x=g.rowKey,_=g.highlightHoverRow,T=g.rowClassName,S=g.rowStyle,O=g.editConfig,C=g.showOverflow,L=g.treeConfig,$=g.treeOpts,R=g.editOpts,k=g.treeExpandeds,I=g.scrollYLoad,H=g.editStore,E=g.rowExpandeds,A=g.radioOpts,Y=g.checkboxOpts,P=g.expandColumn,W=g.hasFixedColumn,D=g.fullAllDataRowIdData,M=g.rowOpts,q=[];return m.forEach(function(t,r){var e={},o=g.getVTRowIndex(t),n=g.getRowIndex(t);(M.isHover||_)&&(e.mouseenter=function(e){isOperateMouse(g)||g.triggerHoverEvent(e,{row:t,rowIndex:n})},e.mouseleave=function(){isOperateMouse(g)||g.clearHoverRow()});var l,i=(0,_util.getRowid)(g,t),a=D[i],s=a?a.level:0,c=a?a.seq:-1,d={$table:g,seq:c,rowid:i,fixed:v,type:renderType,level:s,row:t,rowIndex:n,$rowIndex:r},u=P&&E.length&&-1<E.indexOf(t),p=!1,f=[],a=!1;O&&(a=-1<H.insertList.indexOf(t)),L&&!I&&!$.transform&&k.length&&(p=(f=t[$.children])&&f.length&&-1<k.indexOf(t)),q.push(y("tr",{class:["vxe-body--row",L?"row--level-".concat(s):"",{"row--stripe":b&&(g.getVTRowIndex(t)+1)%2==0,"is--new":a,"is--expand-row":u,"is--expand-tree":p,"row--new":a&&(R.showStatus||R.showInsertStatus),"row--radio":A.highlight&&g.selectRow===t,"row--checked":Y.highlight&&g.isCheckedByCheckboxRow(t)},T?_xeUtils.default.isFunction(T)?T(d):T:""],attrs:{rowid:i},style:S?_xeUtils.default.isFunction(S)?S(d):S:null,key:x||M.useKey||L?i:r,on:e},w.map(function(e,l){return renderColumn(y,h,g,c,i,v,s,t,n,r,o,e,l,w,m)}))),u&&(L&&(l={paddingLeft:"".concat(s*$.indent+30,"px")}),d=P.showOverflow,u=_xeUtils.default.isUndefined(d)||_xeUtils.default.isNull(d)?C:d,d={$table:g,seq:c,column:P,fixed:v,type:renderType,level:s,row:t,rowIndex:n,$rowIndex:r},q.push(y("tr",{class:"vxe-body--expanded-row",key:"expand_".concat(i),style:S?_xeUtils.default.isFunction(S)?S(d):S:null,on:e},[y("td",{class:["vxe-body--expanded-column",{"fixed--hidden":v&&!W,"col--ellipsis":u}],attrs:{colspan:w.length}},[y("div",{class:"vxe-body--expanded-cell",style:l},[P.renderData(y,d)])])]))),p&&q.push.apply(q,_toConsumableArray(renderRows(y,h,g,v,f,w)))}),q}function syncBodyScroll(e,l,t,r,o){(r||o)&&(r&&((0,_util.removeScrollListener)(r),r.scrollTop=t),o&&((0,_util.removeScrollListener)(o),o.scrollTop=t),clearTimeout(scrollProcessTimeout),scrollProcessTimeout=setTimeout(function(){(0,_util.restoreScrollListener)(r),(0,_util.restoreScrollListener)(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,r=this.fixedType,e=e.elemStore,r="".concat(r||"main","-body-");e["".concat(r,"wrapper")]=l,e["".concat(r,"table")]=t.table,e["".concat(r,"colgroup")]=t.colgroup,e["".concat(r,"list")]=t.tbody,e["".concat(r,"xSpace")]=t.xSpace,e["".concat(r,"ySpace")]=t.ySpace,e["".concat(r,"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,r=this.fixedColumn,o=this.fixedType,n=l.$scopedSlots,i=l.tId,a=l.tableData,s=l.tableColumn,c=l.visibleColumn,d=l.showOverflow,u=l.keyboardConfig,p=l.keyboardOpts,f=l.mergeList,y=l.spanMethod,h=l.scrollXLoad,g=l.scrollYLoad,v=l.isAllOverflow,m=l.emptyOpts,w=l.mouseConfig,b=l.mouseOpts,x=l.sYOpts;return o&&(s=!(h||g||d&&v)||f.length||y||u&&p.isMerge?c:r),m=n.empty?n.empty.call(this,{$table:l},t):(n=(n=m.name?_vXETable.default.renderer.get(m.name):null)?n.renderEmpty:null)?n.call(this,t,m,{$table:l}):l.emptyText||_conf.default.i18n("vxe.table.emptyText"),t("div",{class:["vxe-table--body-wrapper",o?"fixed-".concat(o,"--wrapper"):"body--wrapper"],attrs:{xid:i},on:g&&"wheel"===x.mode?{wheel:this.wheelEvent}:{}},[o?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:i,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,o,a,s))]),t("div",{class:"vxe-table--checkbox-range"}),w&&b.area?t("div",{class:"vxe-table--cell-area"},[t("span",{class:"vxe-table--cell-main-area"},b.extension?[t("span",{class:"vxe-table--cell-main-area-btn",on:{mousedown:function(e){l.triggerCellExtendMousedownEvent(e,{$table:l,fixed:o,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,o?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,r=this.fixedType,o=t.$refs,n=t.elemStore,i=t.highlightHoverRow,a=t.scrollXLoad,s=t.scrollYLoad,c=t.lastScrollTop,d=t.lastScrollLeft,u=t.rowOpts,p=o.tableHeader,f=o.tableBody,y=o.leftBody,h=o.rightBody,g=o.tableFooter,v=o.validTip,m=p?p.$el:null,o=g?g.$el:null,p=f.$el,g=y?y.$el:null,f=h?h.$el:null,y=n["main-body-ySpace"],h=n["main-body-xSpace"],n=(s&&y?y:p).clientHeight,y=(a&&h?h:p).clientWidth,h=l.scrollTop,l=p.scrollLeft,d=l!==d,c=h!==c;t.lastScrollTop=h,t.lastScrollLeft=l,t.lastScrollTime=Date.now(),(u.isHover||i)&&t.clearHoverRow(),g&&"left"===r?syncBodyScroll(t,r,h=g.scrollTop,p,f):f&&"right"===r?syncBodyScroll(t,r,h=f.scrollTop,p,g):(d&&(m&&(m.scrollLeft=p.scrollLeft),o&&(o.scrollLeft=p.scrollLeft)),(g||f)&&(t.checkScrolling(),c&&syncBodyScroll(t,r,h,g,f))),a&&d&&t.triggerScrollXEvent(e),s&&c&&t.triggerScrollYEvent(e),d&&v&&v.visible&&v.updatePlacement(),t.emitEvent("scroll",{type:renderType,fixed:r,scrollTop:h,scrollLeft:l,scrollHeight:p.scrollHeight,scrollWidth:p.scrollWidth,bodyHeight:n,bodyWidth:y,isX:d,isY:c},e)},handleWheel:function(a,s,e,c,d){var u=this,p=this.$parent,l=p.$refs,t=p.elemStore,r=p.scrollYLoad,o=p.scrollXLoad,n=l.tableBody,i=l.leftBody,l=l.rightBody,f=n.$el,y=i?i.$el:null,h=l?l.$el:null,i=this.isPrevWheelTop===s?Math.max(0,this.wheelYSize-this.wheelYTotal):0,l=t["main-body-ySpace"],t=t["main-body-xSpace"],g=(r&&l?l:f).clientHeight,v=(o&&t?t:f).clientWidth;this.isPrevWheelTop=s,this.wheelYSize=Math.abs(s?e-i:e+i),this.wheelYInterval=0,this.wheelYTotal=0,clearTimeout(this.wheelTime),function e(){var l,t,r=u.fixedType,o=u.wheelYTotal,n=u.wheelYSize,i=u.wheelYInterval;o<n&&(n<(o+=i=Math.max(5,Math.floor(1.5*i)))&&(i-=o-n),t=f.scrollTop,l=f.clientHeight,n=f.scrollHeight,f.scrollTop=t=t+i*(s?-1:1),y&&(y.scrollTop=t),h&&(h.scrollTop=t),(s?t<n-l:0<=t)&&(u.wheelTime=setTimeout(e,10)),u.wheelYTotal=o,u.wheelYInterval=i,p.emitEvent("scroll",{type:renderType,fixed:r,scrollTop:f.scrollTop,scrollLeft:f.scrollLeft,scrollHeight:f.scrollHeight,scrollWidth:f.scrollWidth,bodyHeight:g,bodyWidth:v,isX:c,isY:d},a))}()},wheelEvent:function(e){var l=e.deltaY,t=e.deltaX,r=this.$el,o=this.$parent,n=o.$refs,i=o.highlightHoverRow,a=o.scrollYLoad,s=o.lastScrollTop,c=o.lastScrollLeft,d=o.rowOpts,u=n.tableBody.$el,n=l,l=n<0;(l?r.scrollTop<=0:r.scrollTop>=r.scrollHeight-r.clientHeight)||(r=r.scrollTop+n,c=(t=u.scrollLeft+t)!==c,(s=r!==s)&&(e.preventDefault(),o.lastScrollTop=r,o.lastScrollLeft=t,o.lastScrollTime=Date.now(),(d.isHover||i)&&o.clearHoverRow(),this.handleWheel(e,l,n,c,s),a&&o.triggerScrollYEvent(e)))}}};exports.default=_default;
@@ -6523,7 +6523,7 @@ var Methods = {
6523
6523
  }
6524
6524
  }; // Module methods
6525
6525
 
6526
- var funcs = 'setFilter,openFilter,clearFilter,getCheckedFilters,closeMenu,setActiveCellArea,getActiveCellArea,getCellAreas,clearCellAreas,copyCellArea,cutCellArea,pasteCellArea,getCopyCellArea,getCopyCellAreas,clearCopyCellArea,setCellAreas,openFind,openReplace,closeFNR,getSelectedCell,clearSelected,insert,insertAt,remove,removeCheckboxRow,removeRadioRow,removeCurrentRow,getRecordset,getInsertRecords,getRemoveRecords,getUpdateRecords,clearActived,getActiveRecord,isActiveByRow,setActiveRow,setActiveCell,setSelectCell,clearValidate,fullValidate,validate,openExport,openPrint,exportData,openImport,importData,saveFile,readFile,importByFile,print'.split(',');
6526
+ var funcs = 'setFilter,openFilter,clearFilter,getCheckedFilters,closeMenu,setActiveCellArea,getActiveCellArea,getCellAreas,clearCellAreas,copyCellArea,cutCellArea,pasteCellArea,getCopyCellArea,getCopyCellAreas,clearCopyCellArea,setCellAreas,openFind,openReplace,closeFNR,getSelectedCell,clearSelected,insert,insertAt,remove,removeCheckboxRow,removeRadioRow,removeCurrentRow,getRecordset,getInsertRecords,getRemoveRecords,getUpdateRecords,clearEdit,clearActived,getEditRecord,getActiveRecord,isEditByRow,isActiveByRow,setEditRow,setActiveRow,setEditCell,setActiveCell,setSelectCell,clearValidate,fullValidate,validate,openExport,openPrint,exportData,openImport,importData,saveFile,readFile,importByFile,print'.split(',');
6527
6527
  funcs.forEach(function (name) {
6528
6528
  Methods[name] = function () {
6529
6529
  if (process.env.NODE_ENV === 'development') {