vxe-pc-ui 3.16.4 → 3.16.6
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.
- package/es/icon/style.css +1 -1
- package/es/icon-picker/src/icon-picker.js +11 -13
- package/es/icon-picker/style.css +3 -8
- package/es/icon-picker/style.min.css +1 -1
- package/es/list/src/list.js +24 -8
- package/es/style.css +1 -1
- package/es/style.min.css +1 -1
- package/es/tree/src/tree.js +13 -1
- package/es/ui/index.js +1 -1
- package/es/ui/src/log.js +1 -1
- package/es/vxe-icon-picker/style.css +3 -8
- package/es/vxe-icon-picker/style.min.css +1 -1
- package/lib/icon/style/style.css +1 -1
- package/lib/icon/style/style.min.css +1 -1
- package/lib/icon-picker/src/icon-picker.js +34 -37
- package/lib/icon-picker/src/icon-picker.min.js +1 -1
- package/lib/icon-picker/style/style.css +3 -8
- package/lib/icon-picker/style/style.min.css +1 -1
- package/lib/index.umd.js +73 -48
- package/lib/index.umd.min.js +1 -1
- package/lib/list/src/list.js +24 -8
- package/lib/list/src/list.min.js +1 -1
- package/lib/style.css +1 -1
- package/lib/style.min.css +1 -1
- package/lib/tree/src/tree.js +13 -1
- package/lib/tree/src/tree.min.js +1 -1
- package/lib/ui/index.js +1 -1
- package/lib/ui/index.min.js +1 -1
- package/lib/ui/src/log.js +1 -1
- package/lib/ui/src/log.min.js +1 -1
- package/lib/vxe-icon-picker/style/style.css +3 -8
- package/lib/vxe-icon-picker/style/style.min.css +1 -1
- package/package.json +1 -1
- package/packages/icon-picker/src/icon-picker.ts +10 -12
- package/packages/list/src/list.ts +30 -12
- package/packages/tree/src/tree.ts +15 -1
- package/styles/components/icon-picker.scss +3 -8
- package/types/components/icon-picker.d.ts +7 -3
- package/types/components/list.d.ts +12 -0
- package/types/components/tree.d.ts +12 -0
- /package/es/icon/{iconfont.1783654852960.ttf → iconfont.1783838609874.ttf} +0 -0
- /package/es/icon/{iconfont.1783654852960.woff → iconfont.1783838609874.woff} +0 -0
- /package/es/icon/{iconfont.1783654852960.woff2 → iconfont.1783838609874.woff2} +0 -0
- /package/es/{iconfont.1783654852960.ttf → iconfont.1783838609874.ttf} +0 -0
- /package/es/{iconfont.1783654852960.woff → iconfont.1783838609874.woff} +0 -0
- /package/es/{iconfont.1783654852960.woff2 → iconfont.1783838609874.woff2} +0 -0
- /package/lib/icon/style/{iconfont.1783654852960.ttf → iconfont.1783838609874.ttf} +0 -0
- /package/lib/icon/style/{iconfont.1783654852960.woff → iconfont.1783838609874.woff} +0 -0
- /package/lib/icon/style/{iconfont.1783654852960.woff2 → iconfont.1783838609874.woff2} +0 -0
- /package/lib/{iconfont.1783654852960.ttf → iconfont.1783838609874.ttf} +0 -0
- /package/lib/{iconfont.1783654852960.woff → iconfont.1783838609874.woff} +0 -0
- /package/lib/{iconfont.1783654852960.woff2 → iconfont.1783838609874.woff2} +0 -0
package/lib/list/src/list.js
CHANGED
|
@@ -579,7 +579,12 @@ var _default2 = exports.default = /* define-vxe-component start */(0, _comp.defi
|
|
|
579
579
|
var el = $xeList.$refs.refElem;
|
|
580
580
|
if (el) {
|
|
581
581
|
var parentEl = el.parentElement;
|
|
582
|
-
|
|
582
|
+
var parentHeight = 0;
|
|
583
|
+
if (parentEl) {
|
|
584
|
+
var parentStyle = getComputedStyle(parentEl);
|
|
585
|
+
parentHeight = parentEl.clientHeight - Math.ceil(_xeUtils.default.toNumber(parentStyle.paddingLeft) + _xeUtils.default.toNumber(parentStyle.paddingRight));
|
|
586
|
+
}
|
|
587
|
+
reactData.parentHeight = parentHeight;
|
|
583
588
|
$xeList.updateHeight();
|
|
584
589
|
if (el.clientWidth && el.clientHeight) {
|
|
585
590
|
return $xeList.computeScrollLoad();
|
|
@@ -822,7 +827,7 @@ var _default2 = exports.default = /* define-vxe-component start */(0, _comp.defi
|
|
|
822
827
|
$xeList.emitCheckboxMode(value);
|
|
823
828
|
return $xeList.updateCheckboxStatus();
|
|
824
829
|
},
|
|
825
|
-
|
|
830
|
+
getCheckboxRecords: function getCheckboxRecords() {
|
|
826
831
|
var $xeList = this;
|
|
827
832
|
var reactData = $xeList.reactData;
|
|
828
833
|
var internalData = $xeList.internalData;
|
|
@@ -838,6 +843,10 @@ var _default2 = exports.default = /* define-vxe-component start */(0, _comp.defi
|
|
|
838
843
|
}
|
|
839
844
|
return rowList;
|
|
840
845
|
},
|
|
846
|
+
getCheckboxRows: function getCheckboxRows() {
|
|
847
|
+
var $xeList = this;
|
|
848
|
+
return $xeList.getCheckboxRecords();
|
|
849
|
+
},
|
|
841
850
|
getCheckboxRowKeys: function getCheckboxRowKeys() {
|
|
842
851
|
var $xeList = this;
|
|
843
852
|
var reactData = $xeList.reactData;
|
|
@@ -1719,6 +1728,13 @@ var _default2 = exports.default = /* define-vxe-component start */(0, _comp.defi
|
|
|
1719
1728
|
var rowid = $xeList.getRowId(row);
|
|
1720
1729
|
return !!reactData.removeRowFlag && !!internalData.removeRowMaps[rowid];
|
|
1721
1730
|
},
|
|
1731
|
+
getRecordset: function getRecordset() {
|
|
1732
|
+
var $xeList = this;
|
|
1733
|
+
return {
|
|
1734
|
+
insertRecords: $xeList.getInsertRecords(),
|
|
1735
|
+
removeRecords: $xeList.getRemoveRecords()
|
|
1736
|
+
};
|
|
1737
|
+
},
|
|
1722
1738
|
handleCrossListRowDragCancelEvent: function handleCrossListRowDragCancelEvent() {
|
|
1723
1739
|
var $xeList = this;
|
|
1724
1740
|
$xeList.clearRowDragData();
|
|
@@ -2118,6 +2134,12 @@ var _default2 = exports.default = /* define-vxe-component start */(0, _comp.defi
|
|
|
2118
2134
|
isCheckboxChecked = !!(updateCheckboxFlag && selectCheckboxMaps[rowid]);
|
|
2119
2135
|
}
|
|
2120
2136
|
var ctVNs = [];
|
|
2137
|
+
if (showRadio) {
|
|
2138
|
+
ctVNs.push($xeList.renderRadio(h, row, rowid, isRadioChecked));
|
|
2139
|
+
}
|
|
2140
|
+
if (showCheckbox) {
|
|
2141
|
+
ctVNs.push($xeList.renderCheckbox(h, row, rowid, isCheckboxChecked));
|
|
2142
|
+
}
|
|
2121
2143
|
var isDragDisabled = false;
|
|
2122
2144
|
if (isDrag && keyField && (!visibleMethod || visibleMethod(rowParams))) {
|
|
2123
2145
|
var handleOns = {};
|
|
@@ -2140,12 +2162,6 @@ var _default2 = exports.default = /* define-vxe-component start */(0, _comp.defi
|
|
|
2140
2162
|
class: icon || (0, _ui.getIcon)().LIST_DRAG
|
|
2141
2163
|
})])]));
|
|
2142
2164
|
}
|
|
2143
|
-
if (showRadio) {
|
|
2144
|
-
ctVNs.push($xeList.renderRadio(h, row, rowid, isRadioChecked));
|
|
2145
|
-
}
|
|
2146
|
-
if (showCheckbox) {
|
|
2147
|
-
ctVNs.push($xeList.renderCheckbox(h, row, rowid, isCheckboxChecked));
|
|
2148
|
-
}
|
|
2149
2165
|
ctVNs.push(h('div', {
|
|
2150
2166
|
key: 'ct5',
|
|
2151
2167
|
class: 'vxe-list--row-content'
|
package/lib/list/src/list.min.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
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 _comp=require("../../ui/src/comp"),_xeUtils=_interopRequireDefault(require("xe-utils")),_ui=require("../../ui"),_store=require("./store"),_dom=require("../../ui/src/dom"),_utils=require("../../ui/src/utils"),_vn=require("../../ui/src/vn"),_log=require("../../ui/src/log"),_anime=require("../../ui/src/anime"),_util=require("./util"),_loading=_interopRequireDefault(require("../../loading/src/loading"));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function _defineProperty(e,t,r){return(t=_toPropertyKey(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function _toPropertyKey(e){e=_toPrimitive(e,"string");return"symbol"==_typeof(e)?e:e+""}function _toPrimitive(e,t){if("object"!=_typeof(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0===r)return("string"===t?String:Number)(e);r=r.call(e,t||"default");if("object"!=_typeof(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}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 _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 _createForOfIteratorHelper(e,t){var r,o,a,i,n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(n)return a=!(o=!0),{s:function(){n=n.call(e)},n:function(){var e=n.next();return o=e.done,e},e:function(e){a=!0,r=e},f:function(){try{o||null==n.return||n.return()}finally{if(a)throw r}}};if(Array.isArray(e)||(n=_unsupportedIterableToArray(e))||t&&e&&"number"==typeof e.length)return n&&(e=n),i=0,{s:t=function(){},n:function(){return i>=e.length?{done:!0}:{done:!1,value:e[i++]}},e:function(e){throw e},f:t};throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _unsupportedIterableToArray(e,t){var r;if(e)return"string"==typeof e?_arrayLikeToArray(e,t):"Map"===(r="Object"===(r={}.toString.call(e).slice(8,-1))&&e.constructor?e.constructor.name:r)||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?_arrayLikeToArray(e,t):void 0}function _arrayLikeToArray(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,o=Array(t);r<t;r++)o[r]=e[r];return o}var _createComponentLog=(0,_log.createComponentLog)("tree"),warnLog=_createComponentLog.warnLog,errLog=_createComponentLog.errLog,crossListDragRowObj=null;function eqRowKey(e,t){return""+e==""+t}function getRowKeyByField(e,t){return e?""+(e[t]||""):""}function getRowIdByField(e,t){return e?(e=getRowKeyByField(e,t),(0,_utils.enModelValue)(e)):""}function createReactData(){return{scrollYLoad:!1,bodyHeight:0,headHeight:0,footHeight:0,customHeight:0,customMaxHeight:0,parentHeight:0,topSpaceHeight:0,rowList:[],selectRadioRow:null,currRowFlag:1,updateCheckboxFlag:1,isAllChecked:!1,isAllIndeterminate:!1,insertRowFlag:1,removeRowFlag:1,dragRow:null,dragTipText:"",isCrossDragRow:!1}}function createInternalData(){return{resizeObserver:void 0,fullData:[],afterList:[],fullKeyMaps:{},rowMaps:{},lastScrollLeft:0,lastScrollTop:0,scrollYStore:{startIndex:0,endIndex:0,visibleSize:0,offsetSize:0,rowHeight:0},currentRow:null,selectCheckboxMaps:{},insertRowMaps:{},removeRowMaps:{}}}var _default2=exports.default=(0,_comp.defineVxeComponent)({name:"VxeList",mixins:[_ui.globalMixins.sizeMixin],props:{data:Array,height:[Number,String],maxHeight:[Number,String],loading:Boolean,className:[String,Function],size:{type:String,default:function(){return(0,_ui.getConfig)().list.size||(0,_ui.getConfig)().size}},autoResize:{type:Boolean,default:function(){return(0,_ui.getConfig)().list.autoResize}},syncResize:[Boolean,String,Number],showSeq:{type:Boolean,default:function(){return(0,_ui.getConfig)().list.showSeq}},showRadio:{type:Boolean,default:function(){return(0,_ui.getConfig)().list.showRadio}},checkRowKey:[String,Number],radioConfig:Object,showCheckbox:{type:Boolean,default:function(){return(0,_ui.getConfig)().list.showCheckbox}},checkRowKeys:Array,checkboxConfig:Object,rowConfig:Object,dragConfig:Object,menuConfig:Object,virtualYConfig:Object,scrollY:Object},data:function(){var e=_xeUtils.default.uniqueId(),t=createReactData();return Object.assign(Object.assign({},{}),{xID:e,reactData:t,crossListDragRowInfo:_store.crossListDragRowGlobal,reFlag:0})},computed:Object.assign(Object.assign({},{}),{computeRowOpts:function(){return Object.assign({},(0,_ui.getConfig)().list.rowConfig,this.rowConfig)},computeDragOpts:function(){return Object.assign({},(0,_ui.getConfig)().list.dragConfig,this.dragConfig)},computeSYOpts:function(){return Object.assign({},(0,_ui.getConfig)().list.virtualYConfig||(0,_ui.getConfig)().list.scrollY,this.virtualYConfig||this.scrollY)},computeKeyField:function(){return this.computeRowOpts.keyField||""},computeIsDrag:function(){var e=this.dragConfig,t=this.computeDragOpts;return e&&(0,_utils.isEnableConf)(t)},computeRowHeight:function(){return this.computeRowOpts.height},computeRadioOpts:function(){return Object.assign({showIcon:!0},(0,_ui.getConfig)().list.radioConfig,this.radioConfig)},computeCheckboxOpts:function(){return Object.assign({showIcon:!0},(0,_ui.getConfig)().list.checkboxConfig,this.checkboxConfig)},computeMenuOpts:function(){return Object.assign({},(0,_ui.getConfig)().list.menuConfig,this.menuConfig)},computeWrapperStyles:function(){var e=this.computeRowHeight,t={};return e&&(t["--vxe-ui-list-row-height"]=(0,_dom.toCssUnit)(e)),t},computeVirtualStyles:function(){var e=this.reactData,t=this.height,r=this.maxHeight,o=e.customHeight,a=e.customMaxHeight,i=e.headHeight,e=e.footHeight,n={};return t?n.height=(0,_dom.toCssUnit)(Math.max(20,o-i-e)):r&&(n.height="auto",n.maxHeight=(0,_dom.toCssUnit)(Math.max(20,a-i-e))),n}}),methods:{dispatchEvent:function(e,t,r){this.$emit(e,(0,_ui.createEvent)(r,{$list:this},t))},emitCheckboxMode:function(e){this.$emit("update:checkRowKeys",e)},emitRadioMode:function(e){this.$emit("update:checkRowKey",e)},callSlot:function(e,t,r){var o=this.$scopedSlots;return e&&(_xeUtils.default.isString(e)&&(e=o[e]||null),_xeUtils.default.isFunction(e))?(0,_vn.getSlotVNs)(e.call(this,t,r)):[]},getRowId:function(e){return getRowIdByField(e,this.computeKeyField)},updateRadioModeValue:function(){var e=this.reactData,t=this.internalData,r=this.checkRowKey,t=t.fullKeyMaps;r?(t=t[r],e.selectRadioRow=t||null):e.selectRadioRow=null},updateCheckboxModeValue:function(){var e=this.internalData,t=this.checkRowKeys,r=e.fullKeyMaps,o=this.computeKeyField,a={};if(t&&t.length){var i,n=_createForOfIteratorHelper(t);try{for(n.s();!(i=n.n()).done;){var s=r[i.value];s&&(a[getRowIdByField(s,o)]=s)}}catch(e){n.e(e)}finally{n.f()}}e.selectCheckboxMaps=a,this.updateCheckboxStatus()},updateAfterDataIndex:function(){var e=this.internalData,t=e.afterList,a=e.rowMaps,i=this.computeKeyField,n=0;t.forEach(function(e,t){var r=getRowIdByField(e,i),o=a[r];o?o._index=n:(o={item:e,index:t,$index:-1,_index:n},a[r]=o),n++})},cacheRowMap:function(){var e=this.internalData,t=e.fullData,r=this.computeKeyField,o={};t.forEach(function(e){var t=getRowKeyByField(e,r);o[t]=e}),e.fullKeyMaps=o},loadData:function(e){var t=this,r=t.reactData,o=t.internalData,a=o.scrollYStore,i=t.computeSYOpts,e=e?e.slice(0):[];return Object.assign(a,{startIndex:0,endIndex:1,visibleSize:0}),o.fullData=e,o.insertRowMaps={},r.insertRowFlag++,o.removeRowMaps={},r.removeRowFlag++,r.scrollYLoad=!!i.enabled&&-1<i.gt&&(0===i.gt||i.gt<=e.length),t.cacheRowMap(),t.handleData(!0),t.updateRadioModeValue(),t.updateCheckboxModeValue(),t.computeScrollLoad().then(function(){t.refreshScroll()})},reloadData:function(e){return this.clearScroll(),this.loadData(e)},getFullData:function(){return this.internalData.fullData},calcTableHeight:function(e){var t=this.reactData.parentHeight,e=this[e],r=0;return r=e?"100%"===e||"auto"===e?t:(r=(0,_dom.isScale)(e)?Math.floor((_xeUtils.default.toInteger(e)||1)/100*t):_xeUtils.default.toNumber(e),Math.max(40,r)):r},updateHeight:function(){var e=this,t=e.reactData,r=e.$refs.refHeaderElem,o=e.$refs.refFooterElem;t.headHeight=r?Math.floor(r.offsetHeight):0,t.footHeight=o?Math.floor(o.offsetHeight):0,t.customHeight=e.calcTableHeight("height"),t.customMaxHeight=e.calcTableHeight("maxHeight")},updateYSpace:function(){var e=this.reactData,t=this.internalData,r=e.scrollYLoad,o=t.scrollYStore;e.bodyHeight=r?t.fullData.length*o.rowHeight:0,e.topSpaceHeight=r?Math.max(o.startIndex*o.rowHeight,0):0},updateAfterFullData:function(){var e=this.internalData,t=e.fullData;e.afterList=t.slice(0),this.updateAfterDataIndex()},handleData:function(e){var t=this,r=t.reactData,o=t.internalData,a=r.scrollYLoad,i=o.fullData,n=o.scrollYStore,s=o.rowMaps,l=t.computeKeyField,o=(e&&t.updateAfterFullData(),a?i.slice(n.startIndex,n.endIndex):i.slice(0));return l&&o.forEach(function(e,t){e=getRowIdByField(e,l),e=s[e];e&&(e.$index=t)}),r.rowList=o,t.$nextTick()},updateYData:function(){this.handleData(),this.updateYSpace()},computeScrollLoad:function(){var n=this,s=n.reactData,l=n.internalData,c=n.browseObj;return n.$nextTick().then(function(){var e,t=s.scrollYLoad,r=l.scrollYStore,o=n.$refs.refVirtualBody,a=n.computeSYOpts,i=0;(e=o?(e=a.sItem?o.querySelector(a.sItem):e)||o.children[0]:e)&&(i=e.offsetHeight),i=Math.max(12,i),r.rowHeight=i,t?(o=n.$refs.refVirtualWrapper,e=Math.max(8,Math.ceil(o.clientHeight/i)),t=a.oSize?_xeUtils.default.toNumber(a.oSize):c.edge?10:0,r.offsetSize=t,r.visibleSize=e,r.endIndex=Math.max(r.startIndex+e+t,r.endIndex),n.updateYData()):n.updateYSpace()})},clearScroll:function(){var e=this.$refs.refVirtualWrapper;return e&&(e.scrollTop=0),this.$nextTick()},scrollTo:function(e,t){var r=this,o=r.reactData,a=r.$refs.refVirtualWrapper;return e&&!_xeUtils.default.isNumber(e)&&(t=e.top,e=e.left),_xeUtils.default.isNumber(e)&&(a.scrollLeft=e),_xeUtils.default.isNumber(t)&&(a.scrollTop=t),o.scrollYLoad?new Promise(function(e){setTimeout(function(){r.$nextTick(function(){e()})},50)}):r.$nextTick()},refreshScroll:function(){var e=this.internalData,t=e.lastScrollLeft,r=e.lastScrollTop;return this.clearScroll().then(function(){if(t||r)return e.lastScrollLeft=0,e.lastScrollTop=0,scrollTo(t,r)})},recalculate:function(){var e=this,t=e.reactData,r=e.$refs.refElem;if(r){var o=r.parentElement;if(t.parentHeight=o?o.clientHeight:0,e.updateHeight(),r.clientWidth&&r.clientHeight)return e.computeScrollLoad()}return e.$nextTick()},loadYData:function(e){var t=this.internalData.scrollYStore,r=t.startIndex,o=t.endIndex,a=t.visibleSize,i=t.offsetSize,e=e.target.scrollTop,e=Math.floor(e/t.rowHeight),n=Math.max(0,e-1-i),i=e+a+i;!(e<=r||o-a-1<=e)||r===n&&o===i||(t.startIndex=n,t.endIndex=i,this.updateYData())},scrollEvent:function(e){var t=this.reactData,r=this.internalData,o=e.target,a=o.scrollTop,o=o.scrollLeft,i=o!==r.lastScrollLeft,n=a!==r.lastScrollTop;r.lastScrollTop=a,r.lastScrollLeft=o,t.scrollYLoad&&this.loadYData(e),this.dispatchEvent("scroll",{scrollLeft:o,scrollTop:a,isX:i,isY:n},e)},getRowKey:function(e){return getRowKeyByField(e,this.computeKeyField)},eqRowKey:eqRowKey,eqRow:function(e,t){return!(!e||!t)&&(e===t||eqRowKey(this.getRowId(e),this.getRowId(t)))},eqRowByKey:function(e,t){return e&&eqRowKey(this.getRowKey(e),t)},findRow:function(e,t){var r=this;return t?_xeUtils.default.find(e,function(e){return r.eqRow(e,t)}):null},findRowByKey:function(e,t){var r=this.computeKeyField;return _xeUtils.default.find(e,function(e){return eqRowKey(getRowIdByField(e,r),t)})},findRowIndexOf:function(e,t){var r=this;return t?_xeUtils.default.findIndexOf(e,function(e){return r.eqRow(e,t)}):-1},findRowIndexOfByKey:function(e,t){var r=this.computeKeyField;return _xeUtils.default.findIndexOf(e,function(e){return eqRowKey(getRowIdByField(e,r),t)})},isCheckedByRadioRowKey:function(e){var t=this.reactData.selectRadioRow;return this.getRowKey(t)===e},isCheckedByRadioRow:function(e){return this.isCheckedByRadioRowKey(this.getRowKey(e))},isCheckedByCheckboxRowKey:function(e){var t=this.reactData,r=this.internalData,t=t.updateCheckboxFlag,r=r.selectCheckboxMaps;return!(!t||!r[e])},isCheckedByCheckboxRow:function(e){return this.isCheckedByCheckboxRowKey(this.getRowKey(e))},setCurrentRow:function(e){var t=this.reactData;return this.internalData.currentRow=e,t.currRowFlag++,this.$nextTick()},setCurrentRowByKey:function(e){var t=this.reactData,r=this.internalData,o=r.fullData;return r.currentRow=this.findRowByKey(o,e),t.currRowFlag++,this.$nextTick()},getCurrentRow:function(){return this.internalData.currentRow},getCurrentRowKey:function(){var e=this.internalData.currentRow;return e?this.getRowKey(e):null},clearCurrentRow:function(){var e=this.reactData;return this.internalData.currentRow=null,e.currRowFlag++,this.$nextTick()},setRadioRow:function(e){this.reactData.selectRadioRow=e;e=this.getRowKey(e);return this.emitRadioMode(e),this.$nextTick()},setRadioRowByKey:function(e){var t=this,r=t.reactData,o=t.internalData.fullData,r=(r.selectRadioRow=t.findRowByKey(o,e),e);return t.emitRadioMode(r),t.$nextTick()},getRadioRow:function(){return this.reactData.selectRadioRow},getRadioRowKey:function(){var e=this.reactData.selectRadioRow;return e?this.getRowKey(e):null},clearRadioRow:function(){return this.reactData.selectRadioRow=null,this.emitRadioMode(null),this.$nextTick()},setCheckboxRow:function(e,t){var r=this,o=r.internalData.selectCheckboxMaps,a=r.computeKeyField,e=((e?_xeUtils.default.isArray(e)?e:[e]:[]).forEach(t?function(e){var t=getRowIdByField(e,a);o[t]||(o[t]=e)}:function(e){e=getRowIdByField(e,a);o[e]&&delete o[e]}),r.getCheckboxRowKeys());return r.emitCheckboxMode(e),r.updateCheckboxStatus()},setCheckboxRowByKey:function(e,t){var r=this,o=r.internalData,a=o.selectCheckboxMaps,i=o.fullKeyMaps,n=r.computeKeyField,o=((e?_xeUtils.default.isArray(e)?e:[e]:[]).forEach(t?function(e){var t,e=i[e||""];e&&(t=getRowIdByField(e,n),e)&&!a[t]&&(a[t]=e)}:function(e){var e=i[e||""];e&&(e=getRowIdByField(e,n),a[e])&&delete a[e]}),r.getCheckboxRowKeys());return r.emitCheckboxMode(o),r.updateCheckboxStatus()},getCheckboxRows:function(){var e=this.reactData,t=this.internalData,e=e.updateCheckboxFlag,t=t.selectCheckboxMaps,r=[];return e&&_xeUtils.default.each(t,function(e){e&&r.push(e)}),r},getCheckboxRowKeys:function(){var e=this.reactData,t=this.internalData,e=e.updateCheckboxFlag,t=t.selectCheckboxMaps,r=this.computeKeyField,o=[];return e&&_xeUtils.default.each(t,function(e){e&&(e=getRowKeyByField(e,r),o.push(e))}),o},clearCheckboxRow:function(){var e=this.reactData;this.internalData.selectCheckboxMaps={},e.updateCheckboxFlag++,e.isAllChecked=!1,e.isAllIndeterminate=!1;return this.emitCheckboxMode([]),this.$nextTick()},setAllCheckboxRow:function(e){var t=this,r=t.internalData,o=r.fullData,a=r.selectCheckboxMaps,i=t.computeKeyField;if(e){var n,s=[],l=_createForOfIteratorHelper(o);try{for(l.s();!(n=l.n()).done;){var c=n.value,u=getRowKeyByField(c,i);a[getRowIdByField(c,i)]=c,s.push(u)}}catch(e){l.e(e)}finally{l.f()}return t.emitCheckboxMode(s),t.updateCheckboxStatus()}return t.clearCheckboxRow()},updateCheckboxStatus:function(){var e=this,t=e.reactData,r=e.internalData,o=r.selectCheckboxMaps,r=r.fullData,a=e.computeKeyField,i=e.computeCheckboxOpts.checkMethod,n=!1,s=!1;if(i){var l,c=_createForOfIteratorHelper(r);try{for(c.s();!(l=c.n()).done;){var u=l.value;if(i({row:u,$list:e}))if(o[getRowIdByField(u,a)])n=!0;else if(s=!0,n)break}}catch(e){c.e(e)}finally{c.f()}}else{var d,h=_createForOfIteratorHelper(r);try{for(h.s();!(d=h.n()).done;)if(o[getRowIdByField(d.value,a)])n=!0;else if(s=!0,n)break}catch(e){h.e(e)}finally{h.f()}}return t.isAllChecked=n&&!s,t.isAllIndeterminate=n&&s,t.updateCheckboxFlag++,e.$nextTick()},changeCheckboxAllEvent:function(e){var t=!this.reactData.isAllChecked;t?this.setAllCheckboxRow(!0):this.clearCheckboxRow(),this.dispatchEvent("checkbox-all",{checked:t},e)},changeCheckboxEvent:function(e,t){var r=this,o=r.reactData,a=r.internalData,a=(e.preventDefault(),e.stopPropagation(),a.selectCheckboxMaps),i=r.computeCheckboxOpts.checkMethod,n=r.getRowKey(t);(!i||i({$list:r,row:t}))&&(i=!1,a[n]?delete a[n]:(i=!0,a[n]=t),o.updateCheckboxFlag++,r.updateCheckboxStatus(),n=_xeUtils.default.keys(a).map(_utils.deModelValue),r.emitCheckboxMode(n),r.dispatchEvent("checkbox-change",{row:t,value:n,checked:i},e))},changeCurrentEvent:function(e,t){var r=this.reactData,o=this.internalData;e.preventDefault();var a=this.computeRowOpts.currentMethod,i=!1;(i=a?!a({row:t}):i)||(o.currentRow=t,r.currRowFlag++,this.dispatchEvent("current-change",{row:t,checked:!0},e))},changeRadioEvent:function(e,t){var r,o=this,a=o.reactData,i=(e.preventDefault(),e.stopPropagation(),a.selectRadioRow),n=o.computeRadioOpts,s=n.strict,n=n.checkMethod,l=o.getRowKey(t);(!n||n({$list:o,row:t}))&&(n=l,r=!0,s&&i&&l===o.getRowKey(i)?(r=!1,a.selectRadioRow=null):a.selectRadioRow=t,o.emitRadioMode(n),o.dispatchEvent("radio-change",{row:t,value:n,checked:r},e))},handleRowDragEndClearStatus:function(){this.clearRowDragData(),this.clearCrossListDragStatus(),this.recalculate()},clearRowDropOrigin:function(){var t,e=this.$refs.refElem;e&&_xeUtils.default.arrayEach(e.querySelectorAll(".".concat(t="row--drag-origin")),function(e){(e.draggable=!1,_dom.removeClass)(e,t)})},updateRowDropOrigin:function(e){var t=this.computeSYOpts.sItem,r=this.$refs.refElem;r&&(e=this.getRowId(e),_xeUtils.default.arrayEach(r.querySelectorAll('.vxe-list--row[rowid="'.concat(e,'"]')+(t?"".concat(t,'[rowid="').concat(e,'"]'):"")),function(e){(0,_dom.addClass)(e,"row--drag-origin")}))},updateRowDropTipContent:function(e){var t=this.reactData,r=t.dragRow,o=this.computeDragOpts.tooltipMethod,a="";a=o?"".concat(o({$list:this,row:r})||""):(0,_ui.getI18n)("vxe.list.dragTip",[e.textContent||""]),t.dragTipText=a},hideDropTip:function(){var e=this.$refs.refDragTipElem,t=this.$refs.refDragRowLineElem;e&&(e.style.display=""),t&&(t.style.display="")},clearCrossListDragStatus:function(){var e=(0,_store.getCrossListDragRowInfo)(this);crossListDragRowObj=null,e.row=null},clearDragStatus:function(){var e=this.reactData;e.dragRow&&(this.hideDropTip(),this.clearRowDropOrigin(),this.clearCrossListDragStatus(),e.dragRow=null)},handleRowDragMousedownEvent:function(e,t){var r=this,o=r.reactData,a=(0,_store.getCrossListDragRowInfo)(r),i=(e.stopPropagation(),t.row),n=r.computeDragOpts,s=n.isCrossListDrag,l=n.dragStartMethod,c=e.currentTarget,n="row"===n.trigger?c:c.parentElement.parentElement;r.clearRowDropOrigin(),l&&!l(t)?(n.draggable=!1,o.dragRow=null,r.hideDropTip()):(s&&(a.row=i,crossListDragRowObj={$oldList:r,$newList:null}),c={row:i},o.dragRow=i,n.draggable=!0,r.updateRowDropOrigin(i),r.updateRowDropTipContent(n),r.dispatchEvent("row-dragstart",c,e))},handleRowDragMouseupEvent:function(){this.clearDragStatus()},showDropTip:function(e,t,r,o){var a,i,n,s,l=this.$refs.refElem;l&&(a=l.getBoundingClientRect(),s=l.clientHeight,t&&(i=this.$refs.refDragRowLineElem)&&(r?(n=t.getBoundingClientRect(),t=t.clientHeight,s<(n=Math.max(1,n.y-a.y))+t&&(t=s-n),i.style.display="block",i.style.top="".concat(n,"px"),i.style.height="".concat(t,"px"),i.setAttribute("drag-pos",o)):i.style.display=""),s=this.$refs.refDragTipElem)&&(s.style.display="block",s.style.top="".concat(Math.min(l.clientHeight-l.scrollTop-s.clientHeight,e.clientY-a.y),"px"),s.style.left="".concat(Math.min(l.clientWidth-l.scrollLeft-s.clientWidth-1,e.clientX-a.x),"px"),s.setAttribute("drag-status",r?"normal":"disabled"))},clearRowDragData:function(){var e=this.reactData,t=this.$refs.refElem;this.hideDropTip(),this.clearRowDropOrigin(),(0,_anime.clearRowAnimate)(t,[".vxe-list--row"]),e.dragRow=null},handleRowDragSwapEvent:function(t,r,o,a){var e,u,d,h,f,i,n,s,l,g=this,p=g.reactData,w=g.internalData,c=w.fullData,R=g.computeDragOpts,v=R.animation,R=R.dragEndMethod||(R?R.dragEndMethod:null),m="bottom"===a?1:0,D=g.$refs.refElem,y={status:!1};if(D&&o&&r){if(o!==r)return e={oldRow:r,newRow:o,dragRow:r,dragPos:a,offsetIndex:m},u=g.getRowId(r),d=g.findRowIndexOfByKey(c,u),n=g.getRowKey(o),h=0,f=-1,v&&(n=D.querySelector('.vxe-list--row[rowid="'.concat(n,'"]')),i=D.querySelector('.vxe-list--row[rowid="'.concat(u,'"]')),(n=n||i)&&(h=n.offsetHeight),i)&&(f=i.offsetTop),l=s=-1,Promise.resolve(!R||R(e)).then(function(e){if(!e)return y;s=g.findRowIndexOf(c,r),c.splice(s,1);e=g.findRowIndexOf(c,o);return l=e+m,c.splice(l,0,r),g.handleData(),p.scrollYLoad&&g.updateYSpace(),t&&g.dispatchEvent("row-dragend",{oldRow:r,newRow:o,dragRow:r,dragPos:a,offsetIndex:m,_index:{newIndex:l,oldIndex:s}},t),g.$nextTick().then(function(){var e,t,r,o,a,i,n,s,l,c;v&&(n=p.rowList,c=w.fullData,l=g.findRowIndexOfByKey(c,u),s=c[0],s=g.findRowIndexOf(c,s),e=D,-1<s&&(a=s+c.length,r=t=-1,o=1,d<s?(t=0,r=l-s):a<d?(t=g.findRowIndexOfByKey(n,u)+1,r=c.length,o=-1):d<l?r=(t=d-s)+l-d:(r=(t=l-s)+d-l+1,o=-1),(a=c.slice(t,r)).length)&&(i=[],a.forEach(function(e){e=g.getRowId(e);i.push('.vxe-list--row[rowid="'.concat(e,'"]'))}),n=e.querySelectorAll(i.join(",")),(0,_anime.moveRowAnimateToTb)(n,o*h)),s=['.vxe-list--row[rowid="'.concat(u,'"]')],c=(l=e.querySelectorAll(s.join(",")))[0],-1<f)&&c&&(0,_anime.moveRowAnimateToTb)(l,f-c.offsetTop),g.recalculate()}).then(function(){return{status:!0}})}).catch(function(){return y}).then(function(e){return g.clearRowDragData(),g.clearCrossListDragStatus(),e});g.clearRowDragData(),g.clearCrossListDragStatus()}return Promise.resolve(y)},handleRowDragDragstartEvent:function(e){e.dataTransfer&&e.dataTransfer.setDragImage((0,_dom.getTpImg)(),0,0)},handleRowDragDragendEvent:function(e){var t=this,r=t.reactData,o=t.internalData,r=r.dragRow,a=o.prevDragRow,o=o.prevDragPos;if(t.computeDragOpts.isCrossListDrag&&crossListDragRowObj){var i=crossListDragRowObj.$newList;if(i&&i.xID!==t.xID)return void i.handleCrossListRowDragInsertEvent(e)}t.handleRowDragSwapEvent(e,r,a,o)},handleRowDragDragoverEvent:function(e){var t,r=this,o=r.reactData,a=r.internalData,o=o.dragRow,i=a.fullData,n=(o||e.preventDefault(),e.currentTarget),s=n.getAttribute("rowid")||"",i=r.findRowByKey(i,s);i&&(e.preventDefault(),t=e.clientY-n.getBoundingClientRect().y<n.clientHeight/2?"top":"bottom",a.prevDragRow=i,a.prevDragPos=t,o&&r.getRowId(o)===s?r.showDropTip(e,n,!1,t):(a={oldRow:o,targetRow:i,dragPos:t,dragRow:o,offsetIndex:"bottom"==t?1:0},r.showDropTip(e,n,!0,t),r.dispatchEvent("row-dragover",a,e)))},handleRowMousedownEvent:function(e,t){var r=this.computeDragOpts,o=this.computeIsDrag,a=r.trigger,r=r.disabledMethod,i=!1,t={row:t,$list:this};!(i=o?"row"===a:i)||r&&r(t)||this.handleRowDragMousedownEvent(e,t)},handleRowClickEvent:function(e,t){var r=this,o=r.reactData,a=r.internalData,i=r.showRadio,n=r.showCheckbox,s=a.currentRow,l=r.computeRadioOpts,c=r.computeCheckboxOpts,u=!1,d=!1,h=!1;r.computeRowOpts.isCurrent?(u=!0,r.changeCurrentEvent(e,t)):s&&(a.currentRow=null,o.currRowFlag++),i&&"row"===l.trigger&&(d=!0,r.changeRadioEvent(e,t)),n&&"row"===c.trigger&&(h=!0,r.changeCheckboxEvent(e,t)),r.dispatchEvent("row-click",{row:t,triggerCurrent:u,triggerRadio:d,triggerCheckbox:h},e)},handleRowDblclickEvent:function(e,t){this.dispatchEvent("row-dblclick",{row:t},e)},insertListRow:function(e,t){var r=this.internalData,o=r.fullData,a=r.rowMaps,i=this.computeKeyField,n=t?"push":"unshift";e.forEach(function(e){var t=getRowIdByField(e,i),r=(0,_util.getItemCacheObj)(e);o[n](e),a[t]=r})},handleInsertRowAt:function(e,t,r){var o=this,a=o.reactData,i=o.internalData,n=i.fullData,s=i.rowMaps,l=i.removeRowMaps,c=i.insertRowMaps,u=o.computeKeyField;if(!u)return errLog("vxe.error.reqSupportProp",["insert() | insertAt() | insertNextAt()","row-config.keyField"]),Promise.resolve({row:null,rows:[]});_xeUtils.default.isArray(e)||(e=[e]);var d,h=t;return(_xeUtils.default.isString(t)||_xeUtils.default.isNumber(t))&&(i=s[t])&&(h=i.item),e.length?(d=e.map(function(e){return _xeUtils.default.assign({},e)}),_xeUtils.default.eqNull(h)?o.insertListRow(d,!1):-1===h?o.insertListRow(d,!0):-1<(t=n.findIndex(function(e){return h[u]===e[u]}))?(d.forEach(function(e){var t=getRowIdByField(e,u),e=(0,_util.getItemCacheObj)(e);s[t]=e}),i=t,r&&(i+=1),n.splice.apply(n,[i,0].concat(_toConsumableArray(d)))):(warnLog("vxe.error.unableInsert"),o.insertListRow(d,!0)),d.forEach(function(e){var t=getRowIdByField(e,u);l[t]?(delete l[t],c[t]&&delete c[t]):c[t]=e}),a.removeRowFlag++,a.insertRowFlag++,o.cacheRowMap(),o.handleData(!0),o.updateAfterDataIndex(),o.updateCheckboxStatus(),a.scrollYLoad&&o.updateYSpace(),o.$nextTick().then(function(){return{row:d.length?d[d.length-1]:null,rows:d}})):Promise.resolve({row:null,rows:[]})},insert:function(e){return this.handleInsertRowAt(e,null)},insertAt:function(e,t){return this.handleInsertRowAt(e,t)},insertNextAt:function(e,t){return this.handleInsertRowAt(e,t,!0)},getInsertRecords:function(){var e=this.internalData.insertRowMaps,t=[];return _xeUtils.default.each(e,function(e){t.push(e)}),t},isInsertByRow:function(e){var t=this.reactData,r=this.internalData,e=this.getRowId(e);return!!t.insertRowFlag&&!!r.insertRowMaps[e]},remove:function(e){var r,o=this,t=o.reactData,a=o.internalData,i=a.fullData,n=a.insertRowMaps,s=a.removeRowMaps;return o.computeKeyField?(r=[],e?_xeUtils.default.isArray(e)||(e=[e]):e=i,e.length?(e.forEach(function(e){var t;o.isInsertByRow(e)||(t=o.getRowId(e),s[t]=e)}),i===e?(e=r=i.slice(0),a.fullData=[]):e.forEach(function(e){var t=o.getRowId(e),e=_xeUtils.default.findIndexOf(i,function(e){return t===o.getRowId(e)});-1<e&&(e=i.splice(e,1),r.push(e[0]))}),e.forEach(function(e){e=o.getRowId(e);n[e]&&delete n[e]}),t.removeRowFlag++,t.insertRowFlag++,o.cacheRowMap(),o.handleData(!0),o.updateAfterDataIndex(),o.updateCheckboxStatus(),t.scrollYLoad&&o.updateYSpace(),o.$nextTick().then(function(){return o.recalculate()}).then(function(){return{row:r.length?r[r.length-1]:null,rows:r}})):Promise.resolve({row:null,rows:[]})):(errLog("vxe.error.reqSupportProp",["insert() | insertAt() | insertNextAt()","row-config.keyField"]),Promise.resolve({row:null,rows:[]}))},getRemoveRecords:function(){var e=this.internalData.removeRowMaps,t=[];return _xeUtils.default.each(e,function(e){t.push(e)}),t},isRemoveByRow:function(e){var t=this.reactData,r=this.internalData,e=this.getRowId(e);return!!t.removeRowFlag&&!!r.removeRowMaps[e]},handleCrossListRowDragCancelEvent:function(){this.clearRowDragData(),this.clearCrossListDragStatus()},handleCrossListRowDragFinishEvent:function(e){var r,t,o,a=this,i=a.reactData,n=a.internalData,s=(0,_store.getCrossListDragRowInfo)(a),i=i.rowList,n=n.rowMaps,l=a.computeDragOpts,c=l.animation,u=a.$refs.refElem;u&&l.isCrossListDrag&&crossListDragRowObj&&s&&(l=s.row)&&(n=n[s=a.getRowId(l)],r=0,t=-1,n&&(c&&(s=u.querySelector('.vxe-list--row[rowid="'.concat(s,'"]')))&&(r=s.offsetHeight),t=n.$index),o=-1<t&&t<i.length-1?i.slice(t+1):[],a.remove([l]).then(function(){var t,e;c&&r&&o.length&&(e=u,t=[],o.forEach(function(e){e=a.getRowId(e);t.push('.vxe-list--row[rowid="'.concat(e,'"]'))}),e=e.querySelectorAll(t.join(",")),(0,_anime.moveRowAnimateToTb)(e,r))}),a.dispatchEvent("row-remove-dragend",{row:l},e),a.handleRowDragEndClearStatus())},handleCrossListRowDragoverEmptyEvent:function(e){var t,r,o=this,a=o.reactData,i=o.internalData,n=a.rowList;o.computeDragOpts.isCrossListDrag&&crossListDragRowObj&&!n.length&&(t=(n=crossListDragRowObj).$oldList,n=n.$newList,t)&&(r=t).xID!==o.xID&&(n&&n.xID!==o.xID&&n.hideCrossListRowDropClearStatus(),e.preventDefault(),t.hideCrossListRowDropClearStatus(),crossListDragRowObj.$newList=o,i.prevDragRow=null,a.dragTipText=r.dragTipText,o.showDropTip(e,e.currentTarget,!0,""))},handleCrossListRowDragInsertEvent:function(r){var o,a,n,s,i,l,c=this,u=c.reactData,d=c.internalData,e=(0,_store.getCrossListDragRowInfo)(c),h=d.prevDragRow,f=d.prevDragPos,t=c.computeDragOpts,g=t.animation,p=t.dragEndMethod;t.isCrossListDrag&&crossListDragRowObj&&e&&(o=e.row,a=crossListDragRowObj.$oldList,n=c.$refs.refElem)&&a&&o&&(i=-1,t={oldRow:s=o,newRow:h,dragRow:s,dragPos:f,offsetIndex:i=h?"bottom"===f?1:0:i},l={status:!1},Promise.resolve(!p||p(t)).then(function(e){if(!e)return a&&a.xID!==c.xID&&a.handleCrossListRowDragCancelEvent(r),c.handleRowDragEndClearStatus(),l;var e=Promise.resolve(),t=[s];a.handleCrossListRowDragFinishEvent(r),e=h?"bottom"===f?c.insertNextAt(t,h):c.insertAt(t,h):c.insert(t),c.dispatchEvent("row-insert-dragend",{oldRow:o,newRow:h,dragRow:s,dragPos:f,offsetIndex:i},r),c.clearRowDragData(),e.then(function(){var t,e=u.rowList,r=d.rowMaps,o=c.getRowId(s),r=r[o],a=0,i=-1,o=(r&&(g&&(o=n.querySelector('.vxe-list--row[rowid="'.concat(o,'"]')))&&(a=o.offsetHeight),i=r.$index),-1<i?e.slice(i):[]);g&&a&&o.length&&(r=n,t=[],o.forEach(function(e){e=c.getRowId(e);t.push('.vxe-list--row[rowid="'.concat(e,'"]'))}),e=r.querySelectorAll(t.join(",")),(0,_anime.moveRowAnimateToTb)(e,-a))})}))},hideCrossListRowDropClearStatus:function(){this.hideDropTip()},handleContextmenuEvent:function(o,a){var i=this,e=i.reactData,t=i.internalData,r=i.menuConfig,n=i.computeMenuOpts,s=i.computeRowOpts.isCurrent;(r?(0,_utils.isEnableConf)(n):n.enabled)&&(r=n.options,(n=n.visibleMethod)&&!n({$list:i,options:r,row:a})||(s?i.changeCurrentEvent(o,a):t.currentRow&&(t.currentRow=null,e.currRowFlag++),_ui.VxeUI.contextMenu&&_ui.VxeUI.contextMenu.openByEvent(o,{options:r,events:{optionClick:function(e){var t=e.option,r=_ui.menus.get(t.code),r=r?r.listMenuMethod:null,t={menu:t,row:a,$event:o,$list:i};r&&r(t,o),i.dispatchEvent("menu-click",t,e.$event)}}}))),i.dispatchEvent("row-menu",{row:a},o)},renderDragTip:function(e){var t=this,r=t.reactData,o=r.dragRow,r=r.dragTipText,a=t.computeDragOpts;return t.computeIsDrag?e("div",{class:"vxe-list--drag-wrapper"},[e("div",{ref:"refDragRowLineElem",class:["vxe-list--drag-row-line",{"is--guides":a.showGuidesStatus}]}),o&&a.showDragTip?e("div",{ref:"refDragTipElem",class:"vxe-list--drag-sort-tip"},[e("div",{class:"vxe-list--drag-sort-tip-wrapper"},[e("div",{class:"vxe-list--drag-sort-tip-status"},[e("span",{class:["vxe-list--drag-sort-tip-normal-status",(0,_ui.getIcon)().LIST_DRAG_STATUS_NODE]}),e("span",{class:["vxe-list--drag-sort-tip-disabled-status",(0,_ui.getIcon)().LIST_DRAG_DISABLED]})]),e("div",{class:"vxe-list--drag-sort-tip-content"},r)])]):(0,_ui.renderEmptyElement)(t)]):(0,_ui.renderEmptyElement)(t)},renderRadio:function(e,t,r,o){var a,i=this,n=i.showRadio,s=i.computeRadioOpts,l=s.showIcon,c=s.checkMethod,s=s.visibleMethod,s=!s||s({$list:i,row:t});return n&&l&&s?e("div",{key:"ct2",class:["vxe-list--radio-option",{"is--checked":o,"is--disabled":a=!!c&&!c({$list:i,row:t})}],on:{click:function(e){a||i.changeRadioEvent(e,t)}}},[e("span",{class:["vxe-radio--icon",o?(0,_ui.getIcon)().RADIO_CHECKED:(0,_ui.getIcon)().RADIO_UNCHECKED]})]):(0,_ui.renderEmptyElement)(i)},renderCheckbox:function(e,t,r,o){var a,i=this,n=i.showCheckbox,s=i.computeCheckboxOpts,l=s.showIcon,c=s.checkMethod,s=s.visibleMethod,s=!s||s({$list:i,row:t});return n&&l&&s?e("div",{key:"ct3",class:["vxe-list--checkbox-option",{"is--checked":o,"is--disabled":a=!!c&&!c({$list:i,row:t})}],on:{click:function(e){a||i.changeCheckboxEvent(e,t)}}},[e("span",{class:["vxe-checkbox--icon",o?(0,_ui.getIcon)().CHECKBOX_CHECKED:(0,_ui.getIcon)().CHECKBOX_UNCHECKED]})]):(0,_ui.renderEmptyElement)(i)},renderRow:function(e,t,r){var o=this,a=o.reactData,i=o.internalData,n=o.$scopedSlots,s=o.showRadio,l=o.showCheckbox,c=a.selectRadioRow,u=a.currRowFlag,a=a.updateCheckboxFlag,d=i.selectCheckboxMaps,i=i.currentRow,h=n.content,n=n.extra,f=o.computeDragOpts,g=f.trigger,p=f.icon,w=f.disabledMethod,f=f.visibleMethod,R=o.computeRowOpts,v=R.useKey,m=R.contentField,D=R.className,R=R.isCurrent,y=o.computeIsDrag,x=o.computeKeyField,b=D&&_xeUtils.default.isFunction(D),v=x||v||y||R||s||l,R=v&&x?getRowIdByField(t,x):"",C=(0,_utils.enModelValue)(R),_={row:t,$list:o},k=!1,c=(s&&(k=c&&(t===c||o.eqRowByKey(c,R))),!1),a=(l&&(c=!(!a||!d[C])),[]),I=!1,f=(y&&x&&(!f||f(_))&&(d={},"row"!==g&&(I=!(!w||!w(_)),d.mousedown=function(e){I||o.handleRowDragMousedownEvent(e,_)},d.mouseup=o.handleRowDragMouseupEvent),a.push(e("div",{key:"ct1",class:"vxe-list--row-drag"},[e("span",{class:"vxe-list--drag-handle",on:d},[e("i",{class:p||(0,_ui.getIcon)().LIST_DRAG})])]))),s&&a.push(o.renderRadio(e,t,C,k)),l&&a.push(o.renderCheckbox(e,t,C,c)),a.push(e("div",{key:"ct5",class:"vxe-list--row-content"},h?h(_):m?(0,_utils.getText)(t[m]):"")),n&&a.push(e("div",{key:"ct7",class:"vxe-list--row-extra"},n(_))),{mousedown:function(e){o.handleRowMousedownEvent(e,t)},mouseup:o.handleRowDragMouseupEvent,click:function(e){o.handleRowClickEvent(e,t)},dblclick:function(e){o.handleRowDblclickEvent(e,t)},contextmenu:function(e){o.handleContextmenuEvent(e,t)}});return y&&(f.dragstart=o.handleRowDragDragstartEvent,f.dragend=o.handleRowDragDragendEvent,f.dragover=o.handleRowDragDragoverEvent),e("div",{key:v&&x?C:r,class:["vxe-list--row",b?D(_):D||"",{"is--drag-disabled":I,"is--current":u&&i&&o.eqRowByKey(i,R),"is-radio--checked":k,"is-checkbox--checked":c}],attrs:v&&x?{rowid:C}:void 0,on:f},a)},renderVN:function(r){var o=this,e=o.reactData,t=o.$scopedSlots,a=o.showCheckbox,i=o.className,n=o.loading,s=e.bodyHeight,l=e.topSpaceHeight,c=e.rowList,u=e.isAllChecked,e=e.isAllIndeterminate,d=t.default,h=t.header,t=t.footer,f=o.computeSize,g=o.computeWrapperStyles,p=o.computeVirtualStyles,w=o.computeRadioOpts,R=o.computeCheckboxOpts,v=o.computeDragOpts,m=v.trigger,D=o.computeRowOpts,y=D.isHover,D=D.padding,a=a&&!1!==R.showHeader,x={};return v.isCrossListDrag&&!c.length&&(x.dragover=o.handleCrossListRowDragoverEmptyEvent),r("div",{ref:"refElem",class:["vxe-list",i?_xeUtils.default.isFunction(i)?i({$list:o}):i:"",_defineProperty(_defineProperty({},"size--".concat(f),f),"is--loading",n)],on:x,style:g},[h||a?r("div",{ref:"refHeaderElem",class:"vxe-list--header-wrapper"},[a?r("div",{class:"vxe-list--header-left"},[r("div",{class:["vxe-list--checkbox-header",{"is--checked":u,"is--indeterminate":e}],on:{click:o.changeCheckboxAllEvent}},[r("span",{class:["vxe-checkbox--icon",u?(0,_ui.getIcon)().CHECKBOX_CHECKED:e?(0,_ui.getIcon)().CHECKBOX_INDETERMINATE:(0,_ui.getIcon)().CHECKBOX_UNCHECKED]})])]):(0,_ui.renderEmptyElement)(o),h?r("div",{class:"vxe-list--header-content"},h({items:c,$list:o})):(0,_ui.renderEmptyElement)(o)]):(0,_ui.renderEmptyElement)(o),r("div",{ref:"refVirtualWrapper",class:"vxe-list--virtual-wrapper",style:p,on:{scroll:o.scrollEvent}},[r("div",{class:"vxe-list--y-space",style:{height:s?"".concat(s,"px"):""}}),r("div",{ref:"refVirtualBody",class:["vxe-list--body",{"trigger--row":"row"===m,"checkbox--highlight":R.highlight,"radio--highlight":w.highlight,"row--hover":y,"is--padding":D}],style:{marginTop:l?"".concat(l,"px"):""}},d?d({items:c,$list:o}):c.map(function(e,t){return o.renderRow(r,e,t)}))]),t?r("div",{ref:"refFooterElem",class:"vxe-list--footer-wrapper"},t({items:c,$list:o})):(0,_ui.renderEmptyElement)(o),o.renderDragTip(r),r(_loading.default,{class:"vxe-list--loading",props:{value:n}})])}},watch:{data:function(){this.loadData(this.data||[])},height:function(){this.reFlag++},maxHeight:function(){this.reFlag++},syncResize:function(){this.reFlag++},computeRowHeight:function(){this.reFlag++},reFlag:function(){var e=this;e.$nextTick(function(){e.recalculate()})},checkRowKey:function(){this.updateRadioModeValue()},checkRowKeys:function(){this.updateCheckboxModeValue()}},created:function(){this.internalData=createInternalData(),this.browseObj=_xeUtils.default.browse(),this.loadData(this.data||[])},mounted:function(){var e=this,t=e,r=e.internalData,o=t.showSeq,a=t.showRadio,i=t.showCheckbox,n=e.computeRowOpts,s=n.useKey,n=n.keyField,l=e.computeIsDrag;n||(o&&errLog("vxe.error.reqSupportProp",["show-seq","row-config.keyField"]),a&&errLog("vxe.error.reqSupportProp",["show-radio","row-config.keyField"]),i&&errLog("vxe.error.reqSupportProp",["show-checkbox","row-config.keyField"]),l&&errLog("vxe.error.reqSupportProp",["drag-config","row-config.keyField"])),s&&!n&&errLog("vxe.error.reqSupportProp",["row-config.useKey","row-config.keyField"]),t.autoResize&&(o=e.$refs.refElem,(a=_ui.globalResize.create(function(){return e.recalculate()})).observe(o),o&&a.observe(o.parentElement),r.resizeObserver=a),e.recalculate(),_ui.globalEvents.on(e,"resize",e.recalculate)},activated:function(){var e=this;e.recalculate().then(function(){return e.refreshScroll()})},beforeDestroy:function(){var e=this.reactData,t=this.internalData,r=t.resizeObserver;r&&r.disconnect(),_ui.globalEvents.off(this,"resize"),_xeUtils.default.assign(e,createReactData()),_xeUtils.default.assign(t,createInternalData())},render:function(e){return this.renderVN(e)}});
|
|
1
|
+
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 _comp=require("../../ui/src/comp"),_xeUtils=_interopRequireDefault(require("xe-utils")),_ui=require("../../ui"),_store=require("./store"),_dom=require("../../ui/src/dom"),_utils=require("../../ui/src/utils"),_vn=require("../../ui/src/vn"),_log=require("../../ui/src/log"),_anime=require("../../ui/src/anime"),_util=require("./util"),_loading=_interopRequireDefault(require("../../loading/src/loading"));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function _defineProperty(e,t,r){return(t=_toPropertyKey(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function _toPropertyKey(e){e=_toPrimitive(e,"string");return"symbol"==_typeof(e)?e:e+""}function _toPrimitive(e,t){if("object"!=_typeof(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0===r)return("string"===t?String:Number)(e);r=r.call(e,t||"default");if("object"!=_typeof(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}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 _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 _createForOfIteratorHelper(e,t){var r,o,a,i,n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(n)return a=!(o=!0),{s:function(){n=n.call(e)},n:function(){var e=n.next();return o=e.done,e},e:function(e){a=!0,r=e},f:function(){try{o||null==n.return||n.return()}finally{if(a)throw r}}};if(Array.isArray(e)||(n=_unsupportedIterableToArray(e))||t&&e&&"number"==typeof e.length)return n&&(e=n),i=0,{s:t=function(){},n:function(){return i>=e.length?{done:!0}:{done:!1,value:e[i++]}},e:function(e){throw e},f:t};throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _unsupportedIterableToArray(e,t){var r;if(e)return"string"==typeof e?_arrayLikeToArray(e,t):"Map"===(r="Object"===(r={}.toString.call(e).slice(8,-1))&&e.constructor?e.constructor.name:r)||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?_arrayLikeToArray(e,t):void 0}function _arrayLikeToArray(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,o=Array(t);r<t;r++)o[r]=e[r];return o}var _createComponentLog=(0,_log.createComponentLog)("tree"),warnLog=_createComponentLog.warnLog,errLog=_createComponentLog.errLog,crossListDragRowObj=null;function eqRowKey(e,t){return""+e==""+t}function getRowKeyByField(e,t){return e?""+(e[t]||""):""}function getRowIdByField(e,t){return e?(e=getRowKeyByField(e,t),(0,_utils.enModelValue)(e)):""}function createReactData(){return{scrollYLoad:!1,bodyHeight:0,headHeight:0,footHeight:0,customHeight:0,customMaxHeight:0,parentHeight:0,topSpaceHeight:0,rowList:[],selectRadioRow:null,currRowFlag:1,updateCheckboxFlag:1,isAllChecked:!1,isAllIndeterminate:!1,insertRowFlag:1,removeRowFlag:1,dragRow:null,dragTipText:"",isCrossDragRow:!1}}function createInternalData(){return{resizeObserver:void 0,fullData:[],afterList:[],fullKeyMaps:{},rowMaps:{},lastScrollLeft:0,lastScrollTop:0,scrollYStore:{startIndex:0,endIndex:0,visibleSize:0,offsetSize:0,rowHeight:0},currentRow:null,selectCheckboxMaps:{},insertRowMaps:{},removeRowMaps:{}}}var _default2=exports.default=(0,_comp.defineVxeComponent)({name:"VxeList",mixins:[_ui.globalMixins.sizeMixin],props:{data:Array,height:[Number,String],maxHeight:[Number,String],loading:Boolean,className:[String,Function],size:{type:String,default:function(){return(0,_ui.getConfig)().list.size||(0,_ui.getConfig)().size}},autoResize:{type:Boolean,default:function(){return(0,_ui.getConfig)().list.autoResize}},syncResize:[Boolean,String,Number],showSeq:{type:Boolean,default:function(){return(0,_ui.getConfig)().list.showSeq}},showRadio:{type:Boolean,default:function(){return(0,_ui.getConfig)().list.showRadio}},checkRowKey:[String,Number],radioConfig:Object,showCheckbox:{type:Boolean,default:function(){return(0,_ui.getConfig)().list.showCheckbox}},checkRowKeys:Array,checkboxConfig:Object,rowConfig:Object,dragConfig:Object,menuConfig:Object,virtualYConfig:Object,scrollY:Object},data:function(){var e=_xeUtils.default.uniqueId(),t=createReactData();return Object.assign(Object.assign({},{}),{xID:e,reactData:t,crossListDragRowInfo:_store.crossListDragRowGlobal,reFlag:0})},computed:Object.assign(Object.assign({},{}),{computeRowOpts:function(){return Object.assign({},(0,_ui.getConfig)().list.rowConfig,this.rowConfig)},computeDragOpts:function(){return Object.assign({},(0,_ui.getConfig)().list.dragConfig,this.dragConfig)},computeSYOpts:function(){return Object.assign({},(0,_ui.getConfig)().list.virtualYConfig||(0,_ui.getConfig)().list.scrollY,this.virtualYConfig||this.scrollY)},computeKeyField:function(){return this.computeRowOpts.keyField||""},computeIsDrag:function(){var e=this.dragConfig,t=this.computeDragOpts;return e&&(0,_utils.isEnableConf)(t)},computeRowHeight:function(){return this.computeRowOpts.height},computeRadioOpts:function(){return Object.assign({showIcon:!0},(0,_ui.getConfig)().list.radioConfig,this.radioConfig)},computeCheckboxOpts:function(){return Object.assign({showIcon:!0},(0,_ui.getConfig)().list.checkboxConfig,this.checkboxConfig)},computeMenuOpts:function(){return Object.assign({},(0,_ui.getConfig)().list.menuConfig,this.menuConfig)},computeWrapperStyles:function(){var e=this.computeRowHeight,t={};return e&&(t["--vxe-ui-list-row-height"]=(0,_dom.toCssUnit)(e)),t},computeVirtualStyles:function(){var e=this.reactData,t=this.height,r=this.maxHeight,o=e.customHeight,a=e.customMaxHeight,i=e.headHeight,e=e.footHeight,n={};return t?n.height=(0,_dom.toCssUnit)(Math.max(20,o-i-e)):r&&(n.height="auto",n.maxHeight=(0,_dom.toCssUnit)(Math.max(20,a-i-e))),n}}),methods:{dispatchEvent:function(e,t,r){this.$emit(e,(0,_ui.createEvent)(r,{$list:this},t))},emitCheckboxMode:function(e){this.$emit("update:checkRowKeys",e)},emitRadioMode:function(e){this.$emit("update:checkRowKey",e)},callSlot:function(e,t,r){var o=this.$scopedSlots;return e&&(_xeUtils.default.isString(e)&&(e=o[e]||null),_xeUtils.default.isFunction(e))?(0,_vn.getSlotVNs)(e.call(this,t,r)):[]},getRowId:function(e){return getRowIdByField(e,this.computeKeyField)},updateRadioModeValue:function(){var e=this.reactData,t=this.internalData,r=this.checkRowKey,t=t.fullKeyMaps;r?(t=t[r],e.selectRadioRow=t||null):e.selectRadioRow=null},updateCheckboxModeValue:function(){var e=this.internalData,t=this.checkRowKeys,r=e.fullKeyMaps,o=this.computeKeyField,a={};if(t&&t.length){var i,n=_createForOfIteratorHelper(t);try{for(n.s();!(i=n.n()).done;){var s=r[i.value];s&&(a[getRowIdByField(s,o)]=s)}}catch(e){n.e(e)}finally{n.f()}}e.selectCheckboxMaps=a,this.updateCheckboxStatus()},updateAfterDataIndex:function(){var e=this.internalData,t=e.afterList,a=e.rowMaps,i=this.computeKeyField,n=0;t.forEach(function(e,t){var r=getRowIdByField(e,i),o=a[r];o?o._index=n:(o={item:e,index:t,$index:-1,_index:n},a[r]=o),n++})},cacheRowMap:function(){var e=this.internalData,t=e.fullData,r=this.computeKeyField,o={};t.forEach(function(e){var t=getRowKeyByField(e,r);o[t]=e}),e.fullKeyMaps=o},loadData:function(e){var t=this,r=t.reactData,o=t.internalData,a=o.scrollYStore,i=t.computeSYOpts,e=e?e.slice(0):[];return Object.assign(a,{startIndex:0,endIndex:1,visibleSize:0}),o.fullData=e,o.insertRowMaps={},r.insertRowFlag++,o.removeRowMaps={},r.removeRowFlag++,r.scrollYLoad=!!i.enabled&&-1<i.gt&&(0===i.gt||i.gt<=e.length),t.cacheRowMap(),t.handleData(!0),t.updateRadioModeValue(),t.updateCheckboxModeValue(),t.computeScrollLoad().then(function(){t.refreshScroll()})},reloadData:function(e){return this.clearScroll(),this.loadData(e)},getFullData:function(){return this.internalData.fullData},calcTableHeight:function(e){var t=this.reactData.parentHeight,e=this[e],r=0;return r=e?"100%"===e||"auto"===e?t:(r=(0,_dom.isScale)(e)?Math.floor((_xeUtils.default.toInteger(e)||1)/100*t):_xeUtils.default.toNumber(e),Math.max(40,r)):r},updateHeight:function(){var e=this,t=e.reactData,r=e.$refs.refHeaderElem,o=e.$refs.refFooterElem;t.headHeight=r?Math.floor(r.offsetHeight):0,t.footHeight=o?Math.floor(o.offsetHeight):0,t.customHeight=e.calcTableHeight("height"),t.customMaxHeight=e.calcTableHeight("maxHeight")},updateYSpace:function(){var e=this.reactData,t=this.internalData,r=e.scrollYLoad,o=t.scrollYStore;e.bodyHeight=r?t.fullData.length*o.rowHeight:0,e.topSpaceHeight=r?Math.max(o.startIndex*o.rowHeight,0):0},updateAfterFullData:function(){var e=this.internalData,t=e.fullData;e.afterList=t.slice(0),this.updateAfterDataIndex()},handleData:function(e){var t=this,r=t.reactData,o=t.internalData,a=r.scrollYLoad,i=o.fullData,n=o.scrollYStore,s=o.rowMaps,l=t.computeKeyField,o=(e&&t.updateAfterFullData(),a?i.slice(n.startIndex,n.endIndex):i.slice(0));return l&&o.forEach(function(e,t){e=getRowIdByField(e,l),e=s[e];e&&(e.$index=t)}),r.rowList=o,t.$nextTick()},updateYData:function(){this.handleData(),this.updateYSpace()},computeScrollLoad:function(){var n=this,s=n.reactData,l=n.internalData,c=n.browseObj;return n.$nextTick().then(function(){var e,t=s.scrollYLoad,r=l.scrollYStore,o=n.$refs.refVirtualBody,a=n.computeSYOpts,i=0;(e=o?(e=a.sItem?o.querySelector(a.sItem):e)||o.children[0]:e)&&(i=e.offsetHeight),i=Math.max(12,i),r.rowHeight=i,t?(o=n.$refs.refVirtualWrapper,e=Math.max(8,Math.ceil(o.clientHeight/i)),t=a.oSize?_xeUtils.default.toNumber(a.oSize):c.edge?10:0,r.offsetSize=t,r.visibleSize=e,r.endIndex=Math.max(r.startIndex+e+t,r.endIndex),n.updateYData()):n.updateYSpace()})},clearScroll:function(){var e=this.$refs.refVirtualWrapper;return e&&(e.scrollTop=0),this.$nextTick()},scrollTo:function(e,t){var r=this,o=r.reactData,a=r.$refs.refVirtualWrapper;return e&&!_xeUtils.default.isNumber(e)&&(t=e.top,e=e.left),_xeUtils.default.isNumber(e)&&(a.scrollLeft=e),_xeUtils.default.isNumber(t)&&(a.scrollTop=t),o.scrollYLoad?new Promise(function(e){setTimeout(function(){r.$nextTick(function(){e()})},50)}):r.$nextTick()},refreshScroll:function(){var e=this.internalData,t=e.lastScrollLeft,r=e.lastScrollTop;return this.clearScroll().then(function(){if(t||r)return e.lastScrollLeft=0,e.lastScrollTop=0,scrollTo(t,r)})},recalculate:function(){var e=this,t=e.reactData,r=e.$refs.refElem;if(r){var o,a=r.parentElement,i=0;if(a&&(o=getComputedStyle(a),i=a.clientHeight-Math.ceil(_xeUtils.default.toNumber(o.paddingLeft)+_xeUtils.default.toNumber(o.paddingRight))),t.parentHeight=i,e.updateHeight(),r.clientWidth&&r.clientHeight)return e.computeScrollLoad()}return e.$nextTick()},loadYData:function(e){var t=this.internalData.scrollYStore,r=t.startIndex,o=t.endIndex,a=t.visibleSize,i=t.offsetSize,e=e.target.scrollTop,e=Math.floor(e/t.rowHeight),n=Math.max(0,e-1-i),i=e+a+i;!(e<=r||o-a-1<=e)||r===n&&o===i||(t.startIndex=n,t.endIndex=i,this.updateYData())},scrollEvent:function(e){var t=this.reactData,r=this.internalData,o=e.target,a=o.scrollTop,o=o.scrollLeft,i=o!==r.lastScrollLeft,n=a!==r.lastScrollTop;r.lastScrollTop=a,r.lastScrollLeft=o,t.scrollYLoad&&this.loadYData(e),this.dispatchEvent("scroll",{scrollLeft:o,scrollTop:a,isX:i,isY:n},e)},getRowKey:function(e){return getRowKeyByField(e,this.computeKeyField)},eqRowKey:eqRowKey,eqRow:function(e,t){return!(!e||!t)&&(e===t||eqRowKey(this.getRowId(e),this.getRowId(t)))},eqRowByKey:function(e,t){return e&&eqRowKey(this.getRowKey(e),t)},findRow:function(e,t){var r=this;return t?_xeUtils.default.find(e,function(e){return r.eqRow(e,t)}):null},findRowByKey:function(e,t){var r=this.computeKeyField;return _xeUtils.default.find(e,function(e){return eqRowKey(getRowIdByField(e,r),t)})},findRowIndexOf:function(e,t){var r=this;return t?_xeUtils.default.findIndexOf(e,function(e){return r.eqRow(e,t)}):-1},findRowIndexOfByKey:function(e,t){var r=this.computeKeyField;return _xeUtils.default.findIndexOf(e,function(e){return eqRowKey(getRowIdByField(e,r),t)})},isCheckedByRadioRowKey:function(e){var t=this.reactData.selectRadioRow;return this.getRowKey(t)===e},isCheckedByRadioRow:function(e){return this.isCheckedByRadioRowKey(this.getRowKey(e))},isCheckedByCheckboxRowKey:function(e){var t=this.reactData,r=this.internalData,t=t.updateCheckboxFlag,r=r.selectCheckboxMaps;return!(!t||!r[e])},isCheckedByCheckboxRow:function(e){return this.isCheckedByCheckboxRowKey(this.getRowKey(e))},setCurrentRow:function(e){var t=this.reactData;return this.internalData.currentRow=e,t.currRowFlag++,this.$nextTick()},setCurrentRowByKey:function(e){var t=this.reactData,r=this.internalData,o=r.fullData;return r.currentRow=this.findRowByKey(o,e),t.currRowFlag++,this.$nextTick()},getCurrentRow:function(){return this.internalData.currentRow},getCurrentRowKey:function(){var e=this.internalData.currentRow;return e?this.getRowKey(e):null},clearCurrentRow:function(){var e=this.reactData;return this.internalData.currentRow=null,e.currRowFlag++,this.$nextTick()},setRadioRow:function(e){this.reactData.selectRadioRow=e;e=this.getRowKey(e);return this.emitRadioMode(e),this.$nextTick()},setRadioRowByKey:function(e){var t=this,r=t.reactData,o=t.internalData.fullData,r=(r.selectRadioRow=t.findRowByKey(o,e),e);return t.emitRadioMode(r),t.$nextTick()},getRadioRow:function(){return this.reactData.selectRadioRow},getRadioRowKey:function(){var e=this.reactData.selectRadioRow;return e?this.getRowKey(e):null},clearRadioRow:function(){return this.reactData.selectRadioRow=null,this.emitRadioMode(null),this.$nextTick()},setCheckboxRow:function(e,t){var r=this,o=r.internalData.selectCheckboxMaps,a=r.computeKeyField,e=((e?_xeUtils.default.isArray(e)?e:[e]:[]).forEach(t?function(e){var t=getRowIdByField(e,a);o[t]||(o[t]=e)}:function(e){e=getRowIdByField(e,a);o[e]&&delete o[e]}),r.getCheckboxRowKeys());return r.emitCheckboxMode(e),r.updateCheckboxStatus()},setCheckboxRowByKey:function(e,t){var r=this,o=r.internalData,a=o.selectCheckboxMaps,i=o.fullKeyMaps,n=r.computeKeyField,o=((e?_xeUtils.default.isArray(e)?e:[e]:[]).forEach(t?function(e){var t,e=i[e||""];e&&(t=getRowIdByField(e,n),e)&&!a[t]&&(a[t]=e)}:function(e){var e=i[e||""];e&&(e=getRowIdByField(e,n),a[e])&&delete a[e]}),r.getCheckboxRowKeys());return r.emitCheckboxMode(o),r.updateCheckboxStatus()},getCheckboxRecords:function(){var e=this.reactData,t=this.internalData,e=e.updateCheckboxFlag,t=t.selectCheckboxMaps,r=[];return e&&_xeUtils.default.each(t,function(e){e&&r.push(e)}),r},getCheckboxRows:function(){return this.getCheckboxRecords()},getCheckboxRowKeys:function(){var e=this.reactData,t=this.internalData,e=e.updateCheckboxFlag,t=t.selectCheckboxMaps,r=this.computeKeyField,o=[];return e&&_xeUtils.default.each(t,function(e){e&&(e=getRowKeyByField(e,r),o.push(e))}),o},clearCheckboxRow:function(){var e=this.reactData;this.internalData.selectCheckboxMaps={},e.updateCheckboxFlag++,e.isAllChecked=!1,e.isAllIndeterminate=!1;return this.emitCheckboxMode([]),this.$nextTick()},setAllCheckboxRow:function(e){var t=this,r=t.internalData,o=r.fullData,a=r.selectCheckboxMaps,i=t.computeKeyField;if(e){var n,s=[],l=_createForOfIteratorHelper(o);try{for(l.s();!(n=l.n()).done;){var c=n.value,u=getRowKeyByField(c,i);a[getRowIdByField(c,i)]=c,s.push(u)}}catch(e){l.e(e)}finally{l.f()}return t.emitCheckboxMode(s),t.updateCheckboxStatus()}return t.clearCheckboxRow()},updateCheckboxStatus:function(){var e=this,t=e.reactData,r=e.internalData,o=r.selectCheckboxMaps,r=r.fullData,a=e.computeKeyField,i=e.computeCheckboxOpts.checkMethod,n=!1,s=!1;if(i){var l,c=_createForOfIteratorHelper(r);try{for(c.s();!(l=c.n()).done;){var u=l.value;if(i({row:u,$list:e}))if(o[getRowIdByField(u,a)])n=!0;else if(s=!0,n)break}}catch(e){c.e(e)}finally{c.f()}}else{var d,h=_createForOfIteratorHelper(r);try{for(h.s();!(d=h.n()).done;)if(o[getRowIdByField(d.value,a)])n=!0;else if(s=!0,n)break}catch(e){h.e(e)}finally{h.f()}}return t.isAllChecked=n&&!s,t.isAllIndeterminate=n&&s,t.updateCheckboxFlag++,e.$nextTick()},changeCheckboxAllEvent:function(e){var t=!this.reactData.isAllChecked;t?this.setAllCheckboxRow(!0):this.clearCheckboxRow(),this.dispatchEvent("checkbox-all",{checked:t},e)},changeCheckboxEvent:function(e,t){var r=this,o=r.reactData,a=r.internalData,a=(e.preventDefault(),e.stopPropagation(),a.selectCheckboxMaps),i=r.computeCheckboxOpts.checkMethod,n=r.getRowKey(t);(!i||i({$list:r,row:t}))&&(i=!1,a[n]?delete a[n]:(i=!0,a[n]=t),o.updateCheckboxFlag++,r.updateCheckboxStatus(),n=_xeUtils.default.keys(a).map(_utils.deModelValue),r.emitCheckboxMode(n),r.dispatchEvent("checkbox-change",{row:t,value:n,checked:i},e))},changeCurrentEvent:function(e,t){var r=this.reactData,o=this.internalData;e.preventDefault();var a=this.computeRowOpts.currentMethod,i=!1;(i=a?!a({row:t}):i)||(o.currentRow=t,r.currRowFlag++,this.dispatchEvent("current-change",{row:t,checked:!0},e))},changeRadioEvent:function(e,t){var r,o=this,a=o.reactData,i=(e.preventDefault(),e.stopPropagation(),a.selectRadioRow),n=o.computeRadioOpts,s=n.strict,n=n.checkMethod,l=o.getRowKey(t);(!n||n({$list:o,row:t}))&&(n=l,r=!0,s&&i&&l===o.getRowKey(i)?(r=!1,a.selectRadioRow=null):a.selectRadioRow=t,o.emitRadioMode(n),o.dispatchEvent("radio-change",{row:t,value:n,checked:r},e))},handleRowDragEndClearStatus:function(){this.clearRowDragData(),this.clearCrossListDragStatus(),this.recalculate()},clearRowDropOrigin:function(){var t,e=this.$refs.refElem;e&&_xeUtils.default.arrayEach(e.querySelectorAll(".".concat(t="row--drag-origin")),function(e){(e.draggable=!1,_dom.removeClass)(e,t)})},updateRowDropOrigin:function(e){var t=this.computeSYOpts.sItem,r=this.$refs.refElem;r&&(e=this.getRowId(e),_xeUtils.default.arrayEach(r.querySelectorAll('.vxe-list--row[rowid="'.concat(e,'"]')+(t?"".concat(t,'[rowid="').concat(e,'"]'):"")),function(e){(0,_dom.addClass)(e,"row--drag-origin")}))},updateRowDropTipContent:function(e){var t=this.reactData,r=t.dragRow,o=this.computeDragOpts.tooltipMethod,a="";a=o?"".concat(o({$list:this,row:r})||""):(0,_ui.getI18n)("vxe.list.dragTip",[e.textContent||""]),t.dragTipText=a},hideDropTip:function(){var e=this.$refs.refDragTipElem,t=this.$refs.refDragRowLineElem;e&&(e.style.display=""),t&&(t.style.display="")},clearCrossListDragStatus:function(){var e=(0,_store.getCrossListDragRowInfo)(this);crossListDragRowObj=null,e.row=null},clearDragStatus:function(){var e=this.reactData;e.dragRow&&(this.hideDropTip(),this.clearRowDropOrigin(),this.clearCrossListDragStatus(),e.dragRow=null)},handleRowDragMousedownEvent:function(e,t){var r=this,o=r.reactData,a=(0,_store.getCrossListDragRowInfo)(r),i=(e.stopPropagation(),t.row),n=r.computeDragOpts,s=n.isCrossListDrag,l=n.dragStartMethod,c=e.currentTarget,n="row"===n.trigger?c:c.parentElement.parentElement;r.clearRowDropOrigin(),l&&!l(t)?(n.draggable=!1,o.dragRow=null,r.hideDropTip()):(s&&(a.row=i,crossListDragRowObj={$oldList:r,$newList:null}),c={row:i},o.dragRow=i,n.draggable=!0,r.updateRowDropOrigin(i),r.updateRowDropTipContent(n),r.dispatchEvent("row-dragstart",c,e))},handleRowDragMouseupEvent:function(){this.clearDragStatus()},showDropTip:function(e,t,r,o){var a,i,n,s,l=this.$refs.refElem;l&&(a=l.getBoundingClientRect(),s=l.clientHeight,t&&(i=this.$refs.refDragRowLineElem)&&(r?(n=t.getBoundingClientRect(),t=t.clientHeight,s<(n=Math.max(1,n.y-a.y))+t&&(t=s-n),i.style.display="block",i.style.top="".concat(n,"px"),i.style.height="".concat(t,"px"),i.setAttribute("drag-pos",o)):i.style.display=""),s=this.$refs.refDragTipElem)&&(s.style.display="block",s.style.top="".concat(Math.min(l.clientHeight-l.scrollTop-s.clientHeight,e.clientY-a.y),"px"),s.style.left="".concat(Math.min(l.clientWidth-l.scrollLeft-s.clientWidth-1,e.clientX-a.x),"px"),s.setAttribute("drag-status",r?"normal":"disabled"))},clearRowDragData:function(){var e=this.reactData,t=this.$refs.refElem;this.hideDropTip(),this.clearRowDropOrigin(),(0,_anime.clearRowAnimate)(t,[".vxe-list--row"]),e.dragRow=null},handleRowDragSwapEvent:function(t,r,o,a){var e,u,d,h,f,i,n,s,l,g=this,p=g.reactData,w=g.internalData,c=w.fullData,R=g.computeDragOpts,v=R.animation,R=R.dragEndMethod||(R?R.dragEndMethod:null),m="bottom"===a?1:0,D=g.$refs.refElem,x={status:!1};if(D&&o&&r){if(o!==r)return e={oldRow:r,newRow:o,dragRow:r,dragPos:a,offsetIndex:m},u=g.getRowId(r),d=g.findRowIndexOfByKey(c,u),n=g.getRowKey(o),h=0,f=-1,v&&(n=D.querySelector('.vxe-list--row[rowid="'.concat(n,'"]')),i=D.querySelector('.vxe-list--row[rowid="'.concat(u,'"]')),(n=n||i)&&(h=n.offsetHeight),i)&&(f=i.offsetTop),l=s=-1,Promise.resolve(!R||R(e)).then(function(e){if(!e)return x;s=g.findRowIndexOf(c,r),c.splice(s,1);e=g.findRowIndexOf(c,o);return l=e+m,c.splice(l,0,r),g.handleData(),p.scrollYLoad&&g.updateYSpace(),t&&g.dispatchEvent("row-dragend",{oldRow:r,newRow:o,dragRow:r,dragPos:a,offsetIndex:m,_index:{newIndex:l,oldIndex:s}},t),g.$nextTick().then(function(){var e,t,r,o,a,i,n,s,l,c;v&&(n=p.rowList,c=w.fullData,l=g.findRowIndexOfByKey(c,u),s=c[0],s=g.findRowIndexOf(c,s),e=D,-1<s&&(a=s+c.length,r=t=-1,o=1,d<s?(t=0,r=l-s):a<d?(t=g.findRowIndexOfByKey(n,u)+1,r=c.length,o=-1):d<l?r=(t=d-s)+l-d:(r=(t=l-s)+d-l+1,o=-1),(a=c.slice(t,r)).length)&&(i=[],a.forEach(function(e){e=g.getRowId(e);i.push('.vxe-list--row[rowid="'.concat(e,'"]'))}),n=e.querySelectorAll(i.join(",")),(0,_anime.moveRowAnimateToTb)(n,o*h)),s=['.vxe-list--row[rowid="'.concat(u,'"]')],c=(l=e.querySelectorAll(s.join(",")))[0],-1<f)&&c&&(0,_anime.moveRowAnimateToTb)(l,f-c.offsetTop),g.recalculate()}).then(function(){return{status:!0}})}).catch(function(){return x}).then(function(e){return g.clearRowDragData(),g.clearCrossListDragStatus(),e});g.clearRowDragData(),g.clearCrossListDragStatus()}return Promise.resolve(x)},handleRowDragDragstartEvent:function(e){e.dataTransfer&&e.dataTransfer.setDragImage((0,_dom.getTpImg)(),0,0)},handleRowDragDragendEvent:function(e){var t=this,r=t.reactData,o=t.internalData,r=r.dragRow,a=o.prevDragRow,o=o.prevDragPos;if(t.computeDragOpts.isCrossListDrag&&crossListDragRowObj){var i=crossListDragRowObj.$newList;if(i&&i.xID!==t.xID)return void i.handleCrossListRowDragInsertEvent(e)}t.handleRowDragSwapEvent(e,r,a,o)},handleRowDragDragoverEvent:function(e){var t,r=this,o=r.reactData,a=r.internalData,o=o.dragRow,i=a.fullData,n=(o||e.preventDefault(),e.currentTarget),s=n.getAttribute("rowid")||"",i=r.findRowByKey(i,s);i&&(e.preventDefault(),t=e.clientY-n.getBoundingClientRect().y<n.clientHeight/2?"top":"bottom",a.prevDragRow=i,a.prevDragPos=t,o&&r.getRowId(o)===s?r.showDropTip(e,n,!1,t):(a={oldRow:o,targetRow:i,dragPos:t,dragRow:o,offsetIndex:"bottom"==t?1:0},r.showDropTip(e,n,!0,t),r.dispatchEvent("row-dragover",a,e)))},handleRowMousedownEvent:function(e,t){var r=this.computeDragOpts,o=this.computeIsDrag,a=r.trigger,r=r.disabledMethod,i=!1,t={row:t,$list:this};!(i=o?"row"===a:i)||r&&r(t)||this.handleRowDragMousedownEvent(e,t)},handleRowClickEvent:function(e,t){var r=this,o=r.reactData,a=r.internalData,i=r.showRadio,n=r.showCheckbox,s=a.currentRow,l=r.computeRadioOpts,c=r.computeCheckboxOpts,u=!1,d=!1,h=!1;r.computeRowOpts.isCurrent?(u=!0,r.changeCurrentEvent(e,t)):s&&(a.currentRow=null,o.currRowFlag++),i&&"row"===l.trigger&&(d=!0,r.changeRadioEvent(e,t)),n&&"row"===c.trigger&&(h=!0,r.changeCheckboxEvent(e,t)),r.dispatchEvent("row-click",{row:t,triggerCurrent:u,triggerRadio:d,triggerCheckbox:h},e)},handleRowDblclickEvent:function(e,t){this.dispatchEvent("row-dblclick",{row:t},e)},insertListRow:function(e,t){var r=this.internalData,o=r.fullData,a=r.rowMaps,i=this.computeKeyField,n=t?"push":"unshift";e.forEach(function(e){var t=getRowIdByField(e,i),r=(0,_util.getItemCacheObj)(e);o[n](e),a[t]=r})},handleInsertRowAt:function(e,t,r){var o=this,a=o.reactData,i=o.internalData,n=i.fullData,s=i.rowMaps,l=i.removeRowMaps,c=i.insertRowMaps,u=o.computeKeyField;if(!u)return errLog("vxe.error.reqSupportProp",["insert() | insertAt() | insertNextAt()","row-config.keyField"]),Promise.resolve({row:null,rows:[]});_xeUtils.default.isArray(e)||(e=[e]);var d,h=t;return(_xeUtils.default.isString(t)||_xeUtils.default.isNumber(t))&&(i=s[t])&&(h=i.item),e.length?(d=e.map(function(e){return _xeUtils.default.assign({},e)}),_xeUtils.default.eqNull(h)?o.insertListRow(d,!1):-1===h?o.insertListRow(d,!0):-1<(t=n.findIndex(function(e){return h[u]===e[u]}))?(d.forEach(function(e){var t=getRowIdByField(e,u),e=(0,_util.getItemCacheObj)(e);s[t]=e}),i=t,r&&(i+=1),n.splice.apply(n,[i,0].concat(_toConsumableArray(d)))):(warnLog("vxe.error.unableInsert"),o.insertListRow(d,!0)),d.forEach(function(e){var t=getRowIdByField(e,u);l[t]?(delete l[t],c[t]&&delete c[t]):c[t]=e}),a.removeRowFlag++,a.insertRowFlag++,o.cacheRowMap(),o.handleData(!0),o.updateAfterDataIndex(),o.updateCheckboxStatus(),a.scrollYLoad&&o.updateYSpace(),o.$nextTick().then(function(){return{row:d.length?d[d.length-1]:null,rows:d}})):Promise.resolve({row:null,rows:[]})},insert:function(e){return this.handleInsertRowAt(e,null)},insertAt:function(e,t){return this.handleInsertRowAt(e,t)},insertNextAt:function(e,t){return this.handleInsertRowAt(e,t,!0)},getInsertRecords:function(){var e=this.internalData.insertRowMaps,t=[];return _xeUtils.default.each(e,function(e){t.push(e)}),t},isInsertByRow:function(e){var t=this.reactData,r=this.internalData,e=this.getRowId(e);return!!t.insertRowFlag&&!!r.insertRowMaps[e]},remove:function(e){var r,o=this,t=o.reactData,a=o.internalData,i=a.fullData,n=a.insertRowMaps,s=a.removeRowMaps;return o.computeKeyField?(r=[],e?_xeUtils.default.isArray(e)||(e=[e]):e=i,e.length?(e.forEach(function(e){var t;o.isInsertByRow(e)||(t=o.getRowId(e),s[t]=e)}),i===e?(e=r=i.slice(0),a.fullData=[]):e.forEach(function(e){var t=o.getRowId(e),e=_xeUtils.default.findIndexOf(i,function(e){return t===o.getRowId(e)});-1<e&&(e=i.splice(e,1),r.push(e[0]))}),e.forEach(function(e){e=o.getRowId(e);n[e]&&delete n[e]}),t.removeRowFlag++,t.insertRowFlag++,o.cacheRowMap(),o.handleData(!0),o.updateAfterDataIndex(),o.updateCheckboxStatus(),t.scrollYLoad&&o.updateYSpace(),o.$nextTick().then(function(){return o.recalculate()}).then(function(){return{row:r.length?r[r.length-1]:null,rows:r}})):Promise.resolve({row:null,rows:[]})):(errLog("vxe.error.reqSupportProp",["insert() | insertAt() | insertNextAt()","row-config.keyField"]),Promise.resolve({row:null,rows:[]}))},getRemoveRecords:function(){var e=this.internalData.removeRowMaps,t=[];return _xeUtils.default.each(e,function(e){t.push(e)}),t},isRemoveByRow:function(e){var t=this.reactData,r=this.internalData,e=this.getRowId(e);return!!t.removeRowFlag&&!!r.removeRowMaps[e]},getRecordset:function(){return{insertRecords:this.getInsertRecords(),removeRecords:this.getRemoveRecords()}},handleCrossListRowDragCancelEvent:function(){this.clearRowDragData(),this.clearCrossListDragStatus()},handleCrossListRowDragFinishEvent:function(e){var r,t,o,a=this,i=a.reactData,n=a.internalData,s=(0,_store.getCrossListDragRowInfo)(a),i=i.rowList,n=n.rowMaps,l=a.computeDragOpts,c=l.animation,u=a.$refs.refElem;u&&l.isCrossListDrag&&crossListDragRowObj&&s&&(l=s.row)&&(n=n[s=a.getRowId(l)],r=0,t=-1,n&&(c&&(s=u.querySelector('.vxe-list--row[rowid="'.concat(s,'"]')))&&(r=s.offsetHeight),t=n.$index),o=-1<t&&t<i.length-1?i.slice(t+1):[],a.remove([l]).then(function(){var t,e;c&&r&&o.length&&(e=u,t=[],o.forEach(function(e){e=a.getRowId(e);t.push('.vxe-list--row[rowid="'.concat(e,'"]'))}),e=e.querySelectorAll(t.join(",")),(0,_anime.moveRowAnimateToTb)(e,r))}),a.dispatchEvent("row-remove-dragend",{row:l},e),a.handleRowDragEndClearStatus())},handleCrossListRowDragoverEmptyEvent:function(e){var t,r,o=this,a=o.reactData,i=o.internalData,n=a.rowList;o.computeDragOpts.isCrossListDrag&&crossListDragRowObj&&!n.length&&(t=(n=crossListDragRowObj).$oldList,n=n.$newList,t)&&(r=t).xID!==o.xID&&(n&&n.xID!==o.xID&&n.hideCrossListRowDropClearStatus(),e.preventDefault(),t.hideCrossListRowDropClearStatus(),crossListDragRowObj.$newList=o,i.prevDragRow=null,a.dragTipText=r.dragTipText,o.showDropTip(e,e.currentTarget,!0,""))},handleCrossListRowDragInsertEvent:function(r){var o,a,n,s,i,l,c=this,u=c.reactData,d=c.internalData,e=(0,_store.getCrossListDragRowInfo)(c),h=d.prevDragRow,f=d.prevDragPos,t=c.computeDragOpts,g=t.animation,p=t.dragEndMethod;t.isCrossListDrag&&crossListDragRowObj&&e&&(o=e.row,a=crossListDragRowObj.$oldList,n=c.$refs.refElem)&&a&&o&&(i=-1,t={oldRow:s=o,newRow:h,dragRow:s,dragPos:f,offsetIndex:i=h?"bottom"===f?1:0:i},l={status:!1},Promise.resolve(!p||p(t)).then(function(e){if(!e)return a&&a.xID!==c.xID&&a.handleCrossListRowDragCancelEvent(r),c.handleRowDragEndClearStatus(),l;var e=Promise.resolve(),t=[s];a.handleCrossListRowDragFinishEvent(r),e=h?"bottom"===f?c.insertNextAt(t,h):c.insertAt(t,h):c.insert(t),c.dispatchEvent("row-insert-dragend",{oldRow:o,newRow:h,dragRow:s,dragPos:f,offsetIndex:i},r),c.clearRowDragData(),e.then(function(){var t,e=u.rowList,r=d.rowMaps,o=c.getRowId(s),r=r[o],a=0,i=-1,o=(r&&(g&&(o=n.querySelector('.vxe-list--row[rowid="'.concat(o,'"]')))&&(a=o.offsetHeight),i=r.$index),-1<i?e.slice(i):[]);g&&a&&o.length&&(r=n,t=[],o.forEach(function(e){e=c.getRowId(e);t.push('.vxe-list--row[rowid="'.concat(e,'"]'))}),e=r.querySelectorAll(t.join(",")),(0,_anime.moveRowAnimateToTb)(e,-a))})}))},hideCrossListRowDropClearStatus:function(){this.hideDropTip()},handleContextmenuEvent:function(o,a){var i=this,e=i.reactData,t=i.internalData,r=i.menuConfig,n=i.computeMenuOpts,s=i.computeRowOpts.isCurrent;(r?(0,_utils.isEnableConf)(n):n.enabled)&&(r=n.options,(n=n.visibleMethod)&&!n({$list:i,options:r,row:a})||(s?i.changeCurrentEvent(o,a):t.currentRow&&(t.currentRow=null,e.currRowFlag++),_ui.VxeUI.contextMenu&&_ui.VxeUI.contextMenu.openByEvent(o,{options:r,events:{optionClick:function(e){var t=e.option,r=_ui.menus.get(t.code),r=r?r.listMenuMethod:null,t={menu:t,row:a,$event:o,$list:i};r&&r(t,o),i.dispatchEvent("menu-click",t,e.$event)}}}))),i.dispatchEvent("row-menu",{row:a},o)},renderDragTip:function(e){var t=this,r=t.reactData,o=r.dragRow,r=r.dragTipText,a=t.computeDragOpts;return t.computeIsDrag?e("div",{class:"vxe-list--drag-wrapper"},[e("div",{ref:"refDragRowLineElem",class:["vxe-list--drag-row-line",{"is--guides":a.showGuidesStatus}]}),o&&a.showDragTip?e("div",{ref:"refDragTipElem",class:"vxe-list--drag-sort-tip"},[e("div",{class:"vxe-list--drag-sort-tip-wrapper"},[e("div",{class:"vxe-list--drag-sort-tip-status"},[e("span",{class:["vxe-list--drag-sort-tip-normal-status",(0,_ui.getIcon)().LIST_DRAG_STATUS_NODE]}),e("span",{class:["vxe-list--drag-sort-tip-disabled-status",(0,_ui.getIcon)().LIST_DRAG_DISABLED]})]),e("div",{class:"vxe-list--drag-sort-tip-content"},r)])]):(0,_ui.renderEmptyElement)(t)]):(0,_ui.renderEmptyElement)(t)},renderRadio:function(e,t,r,o){var a,i=this,n=i.showRadio,s=i.computeRadioOpts,l=s.showIcon,c=s.checkMethod,s=s.visibleMethod,s=!s||s({$list:i,row:t});return n&&l&&s?e("div",{key:"ct2",class:["vxe-list--radio-option",{"is--checked":o,"is--disabled":a=!!c&&!c({$list:i,row:t})}],on:{click:function(e){a||i.changeRadioEvent(e,t)}}},[e("span",{class:["vxe-radio--icon",o?(0,_ui.getIcon)().RADIO_CHECKED:(0,_ui.getIcon)().RADIO_UNCHECKED]})]):(0,_ui.renderEmptyElement)(i)},renderCheckbox:function(e,t,r,o){var a,i=this,n=i.showCheckbox,s=i.computeCheckboxOpts,l=s.showIcon,c=s.checkMethod,s=s.visibleMethod,s=!s||s({$list:i,row:t});return n&&l&&s?e("div",{key:"ct3",class:["vxe-list--checkbox-option",{"is--checked":o,"is--disabled":a=!!c&&!c({$list:i,row:t})}],on:{click:function(e){a||i.changeCheckboxEvent(e,t)}}},[e("span",{class:["vxe-checkbox--icon",o?(0,_ui.getIcon)().CHECKBOX_CHECKED:(0,_ui.getIcon)().CHECKBOX_UNCHECKED]})]):(0,_ui.renderEmptyElement)(i)},renderRow:function(e,t,r){var o=this,a=o.reactData,i=o.internalData,n=o.$scopedSlots,s=o.showRadio,l=o.showCheckbox,c=a.selectRadioRow,u=a.currRowFlag,a=a.updateCheckboxFlag,d=i.selectCheckboxMaps,i=i.currentRow,h=n.content,n=n.extra,f=o.computeDragOpts,g=f.trigger,p=f.icon,w=f.disabledMethod,f=f.visibleMethod,R=o.computeRowOpts,v=R.useKey,m=R.contentField,D=R.className,R=R.isCurrent,x=o.computeIsDrag,y=o.computeKeyField,b=D&&_xeUtils.default.isFunction(D),v=y||v||x||R||s||l,R=v&&y?getRowIdByField(t,y):"",C=(0,_utils.enModelValue)(R),_={row:t,$list:o},k=!1,c=(s&&(k=c&&(t===c||o.eqRowByKey(c,R))),!1),a=(l&&(c=!(!a||!d[C])),[]),I=(s&&a.push(o.renderRadio(e,t,C,k)),l&&a.push(o.renderCheckbox(e,t,C,c)),!1),s=(x&&y&&(!f||f(_))&&(d={},"row"!==g&&(I=!(!w||!w(_)),d.mousedown=function(e){I||o.handleRowDragMousedownEvent(e,_)},d.mouseup=o.handleRowDragMouseupEvent),a.push(e("div",{key:"ct1",class:"vxe-list--row-drag"},[e("span",{class:"vxe-list--drag-handle",on:d},[e("i",{class:p||(0,_ui.getIcon)().LIST_DRAG})])]))),a.push(e("div",{key:"ct5",class:"vxe-list--row-content"},h?h(_):m?(0,_utils.getText)(t[m]):"")),n&&a.push(e("div",{key:"ct7",class:"vxe-list--row-extra"},n(_))),{mousedown:function(e){o.handleRowMousedownEvent(e,t)},mouseup:o.handleRowDragMouseupEvent,click:function(e){o.handleRowClickEvent(e,t)},dblclick:function(e){o.handleRowDblclickEvent(e,t)},contextmenu:function(e){o.handleContextmenuEvent(e,t)}});return x&&(s.dragstart=o.handleRowDragDragstartEvent,s.dragend=o.handleRowDragDragendEvent,s.dragover=o.handleRowDragDragoverEvent),e("div",{key:v&&y?C:r,class:["vxe-list--row",b?D(_):D||"",{"is--drag-disabled":I,"is--current":u&&i&&o.eqRowByKey(i,R),"is-radio--checked":k,"is-checkbox--checked":c}],attrs:v&&y?{rowid:C}:void 0,on:s},a)},renderVN:function(r){var o=this,e=o.reactData,t=o.$scopedSlots,a=o.showCheckbox,i=o.className,n=o.loading,s=e.bodyHeight,l=e.topSpaceHeight,c=e.rowList,u=e.isAllChecked,e=e.isAllIndeterminate,d=t.default,h=t.header,t=t.footer,f=o.computeSize,g=o.computeWrapperStyles,p=o.computeVirtualStyles,w=o.computeRadioOpts,R=o.computeCheckboxOpts,v=o.computeDragOpts,m=v.trigger,D=o.computeRowOpts,x=D.isHover,D=D.padding,a=a&&!1!==R.showHeader,y={};return v.isCrossListDrag&&!c.length&&(y.dragover=o.handleCrossListRowDragoverEmptyEvent),r("div",{ref:"refElem",class:["vxe-list",i?_xeUtils.default.isFunction(i)?i({$list:o}):i:"",_defineProperty(_defineProperty({},"size--".concat(f),f),"is--loading",n)],on:y,style:g},[h||a?r("div",{ref:"refHeaderElem",class:"vxe-list--header-wrapper"},[a?r("div",{class:"vxe-list--header-left"},[r("div",{class:["vxe-list--checkbox-header",{"is--checked":u,"is--indeterminate":e}],on:{click:o.changeCheckboxAllEvent}},[r("span",{class:["vxe-checkbox--icon",u?(0,_ui.getIcon)().CHECKBOX_CHECKED:e?(0,_ui.getIcon)().CHECKBOX_INDETERMINATE:(0,_ui.getIcon)().CHECKBOX_UNCHECKED]})])]):(0,_ui.renderEmptyElement)(o),h?r("div",{class:"vxe-list--header-content"},h({items:c,$list:o})):(0,_ui.renderEmptyElement)(o)]):(0,_ui.renderEmptyElement)(o),r("div",{ref:"refVirtualWrapper",class:"vxe-list--virtual-wrapper",style:p,on:{scroll:o.scrollEvent}},[r("div",{class:"vxe-list--y-space",style:{height:s?"".concat(s,"px"):""}}),r("div",{ref:"refVirtualBody",class:["vxe-list--body",{"trigger--row":"row"===m,"checkbox--highlight":R.highlight,"radio--highlight":w.highlight,"row--hover":x,"is--padding":D}],style:{marginTop:l?"".concat(l,"px"):""}},d?d({items:c,$list:o}):c.map(function(e,t){return o.renderRow(r,e,t)}))]),t?r("div",{ref:"refFooterElem",class:"vxe-list--footer-wrapper"},t({items:c,$list:o})):(0,_ui.renderEmptyElement)(o),o.renderDragTip(r),r(_loading.default,{class:"vxe-list--loading",props:{value:n}})])}},watch:{data:function(){this.loadData(this.data||[])},height:function(){this.reFlag++},maxHeight:function(){this.reFlag++},syncResize:function(){this.reFlag++},computeRowHeight:function(){this.reFlag++},reFlag:function(){var e=this;e.$nextTick(function(){e.recalculate()})},checkRowKey:function(){this.updateRadioModeValue()},checkRowKeys:function(){this.updateCheckboxModeValue()}},created:function(){this.internalData=createInternalData(),this.browseObj=_xeUtils.default.browse(),this.loadData(this.data||[])},mounted:function(){var e=this,t=e,r=e.internalData,o=t.showSeq,a=t.showRadio,i=t.showCheckbox,n=e.computeRowOpts,s=n.useKey,n=n.keyField,l=e.computeIsDrag;n||(o&&errLog("vxe.error.reqSupportProp",["show-seq","row-config.keyField"]),a&&errLog("vxe.error.reqSupportProp",["show-radio","row-config.keyField"]),i&&errLog("vxe.error.reqSupportProp",["show-checkbox","row-config.keyField"]),l&&errLog("vxe.error.reqSupportProp",["drag-config","row-config.keyField"])),s&&!n&&errLog("vxe.error.reqSupportProp",["row-config.useKey","row-config.keyField"]),t.autoResize&&(o=e.$refs.refElem,(a=_ui.globalResize.create(function(){return e.recalculate()})).observe(o),o&&a.observe(o.parentElement),r.resizeObserver=a),e.recalculate(),_ui.globalEvents.on(e,"resize",e.recalculate)},activated:function(){var e=this;e.recalculate().then(function(){return e.refreshScroll()})},beforeDestroy:function(){var e=this.reactData,t=this.internalData,r=t.resizeObserver;r&&r.disconnect(),_ui.globalEvents.off(this,"resize"),_xeUtils.default.assign(e,createReactData()),_xeUtils.default.assign(t,createInternalData())},render:function(e){return this.renderVN(e)}});
|