vxe-table 3.8.13 → 3.8.15

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (38) hide show
  1. package/README.md +5 -0
  2. package/lib/custom/src/panel.js +1 -2
  3. package/lib/custom/src/panel.min.js +1 -1
  4. package/lib/icon/style/style.css +1 -1
  5. package/lib/icon/style/style.min.css +1 -1
  6. package/lib/index.css +1 -1
  7. package/lib/index.umd.js +17 -20
  8. package/lib/index.umd.min.js +1 -1
  9. package/lib/modal/src/modal.js +10 -14
  10. package/lib/modal/src/modal.min.js +1 -1
  11. package/lib/radio/style/style.css +1 -1
  12. package/lib/radio/style/style.min.css +1 -1
  13. package/lib/style.css +1 -1
  14. package/lib/style.min.css +1 -1
  15. package/lib/table/src/methods.js +2 -1
  16. package/lib/table/src/methods.min.js +1 -1
  17. package/lib/table/src/table.js +2 -1
  18. package/lib/table/src/table.min.js +1 -1
  19. package/lib/tools/log.js +1 -1
  20. package/lib/tools/log.min.js +1 -1
  21. package/lib/v-x-e-table/index.js +1 -1
  22. package/lib/v-x-e-table/index.min.js +1 -1
  23. package/lib/vxe-radio/style/style.css +1 -1
  24. package/lib/vxe-radio/style/style.min.css +1 -1
  25. package/package.json +3 -3
  26. package/packages/custom/src/panel.js +1 -2
  27. package/packages/modal/src/modal.js +4 -6
  28. package/packages/table/src/methods.js +2 -1
  29. package/packages/table/src/table.js +2 -1
  30. package/styles/checkbox.scss +1 -1
  31. package/styles/export.scss +1 -1
  32. package/styles/radio.scss +1 -1
  33. /package/lib/icon/style/{iconfont.1721119959483.ttf → iconfont.1721269958416.ttf} +0 -0
  34. /package/lib/icon/style/{iconfont.1721119959483.woff → iconfont.1721269958416.woff} +0 -0
  35. /package/lib/icon/style/{iconfont.1721119959483.woff2 → iconfont.1721269958416.woff2} +0 -0
  36. /package/lib/{iconfont.1721119959483.ttf → iconfont.1721269958416.ttf} +0 -0
  37. /package/lib/{iconfont.1721119959483.woff → iconfont.1721269958416.woff} +0 -0
  38. /package/lib/{iconfont.1721119959483.woff2 → iconfont.1721269958416.woff2} +0 -0
@@ -725,11 +725,7 @@ var _default2 = exports.default = {
725
725
  var _this7 = this;
726
726
  return this.$nextTick().then(function () {
727
727
  if (!_this7.revertLocat) {
728
- var marginSize = Math.max(0, _this7.marginSize);
729
728
  var modalBoxElem = _this7.getBox();
730
- var _DomTools$getDomNode = _dom.default.getDomNode(),
731
- visibleHeight = _DomTools$getDomNode.visibleHeight,
732
- visibleWidth = _DomTools$getDomNode.visibleWidth;
733
729
  _this7.revertLocat = {
734
730
  top: modalBoxElem.offsetTop,
735
731
  left: modalBoxElem.offsetLeft,
@@ -737,10 +733,10 @@ var _default2 = exports.default = {
737
733
  height: modalBoxElem.offsetHeight + (modalBoxElem.style.height ? 0 : 1)
738
734
  };
739
735
  Object.assign(modalBoxElem.style, {
740
- top: "".concat(marginSize, "px"),
741
- left: "".concat(marginSize, "px"),
742
- width: "".concat(visibleWidth - marginSize * 2, "px"),
743
- height: "".concat(visibleHeight - marginSize * 2, "px")
736
+ top: '0',
737
+ left: '0',
738
+ width: '100%',
739
+ height: '100%'
744
740
  });
745
741
  _this7.savePosStorage();
746
742
  }
@@ -833,9 +829,9 @@ var _default2 = exports.default = {
833
829
  var domMouseup = document.onmouseup;
834
830
  var disX = evnt.clientX - modalBoxElem.offsetLeft;
835
831
  var disY = evnt.clientY - modalBoxElem.offsetTop;
836
- var _DomTools$getDomNode2 = _dom.default.getDomNode(),
837
- visibleHeight = _DomTools$getDomNode2.visibleHeight,
838
- visibleWidth = _DomTools$getDomNode2.visibleWidth;
832
+ var _DomTools$getDomNode = _dom.default.getDomNode(),
833
+ visibleHeight = _DomTools$getDomNode.visibleHeight,
834
+ visibleWidth = _DomTools$getDomNode.visibleWidth;
839
835
  document.onmousemove = function (evnt) {
840
836
  evnt.preventDefault();
841
837
  var offsetWidth = modalBoxElem.offsetWidth;
@@ -889,9 +885,9 @@ var _default2 = exports.default = {
889
885
  events = _this$events8 === void 0 ? {} : _this$events8,
890
886
  remember = this.remember,
891
887
  storage = this.storage;
892
- var _DomTools$getDomNode3 = _dom.default.getDomNode(),
893
- visibleHeight = _DomTools$getDomNode3.visibleHeight,
894
- visibleWidth = _DomTools$getDomNode3.visibleWidth;
888
+ var _DomTools$getDomNode2 = _dom.default.getDomNode(),
889
+ visibleHeight = _DomTools$getDomNode2.visibleHeight,
890
+ visibleWidth = _DomTools$getDomNode2.visibleWidth;
895
891
  var type = evnt.target.getAttribute('type');
896
892
  var minWidth = _xeUtils.default.toNumber(this.minWidth);
897
893
  var minHeight = _xeUtils.default.toNumber(this.minHeight);
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.msgQueue=exports.default=exports.allActivedModals=void 0;var _conf=_interopRequireDefault(require("../../v-x-e-table/src/conf")),_size=_interopRequireDefault(require("../../mixins/size")),_xeUtils=_interopRequireDefault(require("xe-utils")),_utils=_interopRequireWildcard(require("../../tools/utils")),_dom=_interopRequireDefault(require("../../tools/dom")),_event=require("../../tools/event"),_log=require("../../tools/log"),_vn=require("../../tools/vn"),_index=_interopRequireDefault(require("../../loading/index"));function _getRequireWildcardCache(t){var e,o;return"function"!=typeof WeakMap?null:(e=new WeakMap,o=new WeakMap,(_getRequireWildcardCache=function(t){return t?o:e})(t))}function _interopRequireWildcard(t,e){if(!e&&t&&t.__esModule)return t;if(null===t||"object"!=_typeof(t)&&"function"!=typeof t)return{default:t};e=_getRequireWildcardCache(e);if(e&&e.has(t))return e.get(t);var o,i,n={__proto__:null},s=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(o in t)"default"!==o&&{}.hasOwnProperty.call(t,o)&&((i=s?Object.getOwnPropertyDescriptor(t,o):null)&&(i.get||i.set)?Object.defineProperty(n,o,i):n[o]=t[o]);return n.default=t,e&&e.set(t,n),n}function _interopRequireDefault(t){return t&&t.__esModule?t:{default:t}}function _typeof(t){return(_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function _slicedToArray(t,e){return _arrayWithHoles(t)||_iterableToArrayLimit(t,e)||_unsupportedIterableToArray(t,e)||_nonIterableRest()}function _nonIterableRest(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _unsupportedIterableToArray(t,e){var o;if(t)return"string"==typeof t?_arrayLikeToArray(t,e):"Map"===(o="Object"===(o=Object.prototype.toString.call(t).slice(8,-1))&&t.constructor?t.constructor.name:o)||"Set"===o?Array.from(t):"Arguments"===o||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(o)?_arrayLikeToArray(t,e):void 0}function _arrayLikeToArray(t,e){(null==e||e>t.length)&&(e=t.length);for(var o=0,i=new Array(e);o<e;o++)i[o]=t[o];return i}function _iterableToArrayLimit(t,e){var o=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=o){var i,n,s,l,r=[],a=!0,c=!1;try{if(s=(o=o.call(t)).next,0===e){if(Object(o)!==o)return;a=!1}else for(;!(a=(i=s.call(o)).done)&&(r.push(i.value),r.length!==e);a=!0);}catch(t){c=!0,n=t}finally{try{if(!a&&null!=o.return&&(l=o.return(),Object(l)!==l))return}finally{if(c)throw n}}return r}}function _arrayWithHoles(t){if(Array.isArray(t))return t}function _defineProperty(t,e,o){return(e=_toPropertyKey(e))in t?Object.defineProperty(t,e,{value:o,enumerable:!0,configurable:!0,writable:!0}):t[e]=o,t}function _toPropertyKey(t){t=_toPrimitive(t,"string");return"symbol"==_typeof(t)?t:t+""}function _toPrimitive(t,e){if("object"!=_typeof(t)||!t)return t;var o=t[Symbol.toPrimitive];if(void 0===o)return("string"===e?String:Number)(t);o=o.call(t,e||"default");if("object"!=_typeof(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}var allActivedModals=exports.allActivedModals=[],msgQueue=exports.msgQueue=[],_default2=exports.default={name:"VxeModal",mixins:[_size.default],props:{value:Boolean,id:String,type:{type:String,default:"modal"},loading:{type:Boolean,default:null},status:String,iconStatus:String,className:String,top:{type:[Number,String],default:function(){return _conf.default.modal.top}},position:[String,Object],title:String,duration:{type:[Number,String],default:function(){return _conf.default.modal.duration}},message:[String,Function],content:[String,Function],showCancelButton:{type:Boolean,default:null},cancelButtonText:{type:String,default:function(){return _conf.default.modal.cancelButtonText}},showConfirmButton:{type:Boolean,default:function(){return _conf.default.modal.showConfirmButton}},confirmButtonText:{type:String,default:function(){return _conf.default.modal.confirmButtonText}},lockView:{type:Boolean,default:function(){return _conf.default.modal.lockView}},lockScroll:Boolean,mask:{type:Boolean,default:function(){return _conf.default.modal.mask}},maskClosable:{type:Boolean,default:function(){return _conf.default.modal.maskClosable}},escClosable:{type:Boolean,default:function(){return _conf.default.modal.escClosable}},resize:{type:Boolean,default:function(){return _conf.default.modal.resize}},showHeader:{type:Boolean,default:function(){return _conf.default.modal.showHeader}},showFooter:{type:Boolean,default:function(){return _conf.default.modal.showFooter}},showZoom:{type:Boolean,default:null},showClose:{type:Boolean,default:function(){return _conf.default.modal.showClose}},dblclickZoom:{type:Boolean,default:function(){return _conf.default.modal.dblclickZoom}},width:[Number,String],height:[Number,String],minWidth:{type:[Number,String],default:function(){return _conf.default.modal.minWidth}},minHeight:{type:[Number,String],default:function(){return _conf.default.modal.minHeight}},zIndex:Number,marginSize:{type:[Number,String],default:function(){return _conf.default.modal.marginSize}},fullscreen:Boolean,draggable:{type:Boolean,default:function(){return _conf.default.modal.draggable}},remember:{type:Boolean,default:function(){return _conf.default.modal.remember}},destroyOnClose:{type:Boolean,default:function(){return _conf.default.modal.destroyOnClose}},showTitleOverflow:{type:Boolean,default:function(){return _conf.default.modal.showTitleOverflow}},transfer:{type:Boolean,default:function(){return _conf.default.modal.transfer}},storage:{type:Boolean,default:function(){return _conf.default.modal.storage}},storageKey:{type:String,default:function(){return _conf.default.modal.storageKey}},animat:{type:Boolean,default:function(){return _conf.default.modal.animat}},size:{type:String,default:function(){return _conf.default.modal.size||_conf.default.size}},beforeHideMethod:{type:Function,default:function(){return _conf.default.modal.beforeHideMethod}},slots:Object,events:Object},data:function(){return{initialized:!1,visible:!1,contentVisible:!1,modalTop:0,modalZindex:0,revertLocat:null,firstOpen:!0}},computed:{isMsg:function(){return"message"===this.type}},watch:{width:function(){this.recalculate()},height:function(){this.recalculate()},value:function(t){this[t?"open":"close"]("model")}},created:function(){this.storage&&!this.id&&(0,_log.errLog)("vxe.error.reqProp",["modal.id"])},mounted:function(){var t=this.$listeners,e=this.events,e=void 0===e?{}:e,o=(this.value&&this.open(),this.recalculate(),this.escClosable&&_event.GlobalEvent.on(this,"keydown",this.handleGlobalKeydownEvent),"inserted"),o={type:o,$modal:this,$event:{type:o}};t.inserted?this.$emit("inserted",o):e.inserted&&e.inserted.call(this,o)},beforeDestroy:function(){var t=this.$el;_event.GlobalEvent.off(this,"keydown"),this.removeMsgQueue(),t.parentNode===document.body&&t.parentNode.removeChild(t)},render:function(e){var o=this,t=this._e,i=this.$scopedSlots,n=this.slots,n=void 0===n?{}:n,s=this.initialized,l=this.vSize,r=this.className,a=this.type,c=this.resize,u=this.showClose,d=this.showZoom,f=this.animat,h=this.draggable,m=this.loading,p=this.status,v=this.iconStatus,g=this.showFooter,y=this.revertLocat,x=this.modalTop,_=this.dblclickZoom,b=this.contentVisible,w=this.visible,S=this.title,k=this.lockScroll,B=this.lockView,$=this.mask,N=this.isMsg,T=this.showTitleOverflow,z=this.destroyOnClose,M=this.showCancelButton,O=this.showConfirmButton,A=this.content||this.message,P=i.default||n.default,L=i.footer||n.footer,C=i.header||n.header,E=i.title||n.title,i=i.corner||n.corner,n={};return h&&(n.mousedown=this.mousedownEvent),d&&_&&"modal"===a&&(n.dblclick=this.toggleZoomEvent),e("div",{class:["vxe-modal--wrapper","type--".concat(a),r||"",(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_={},"size--".concat(l),l),"status--".concat(p),p),"is--animat",f),"lock--scroll",k),"lock--view",B),"is--resize",c),"is--mask",$),"is--maximize",y),"is--visible",b),"is--active",w),_defineProperty(_,"is--loading",m))],style:{zIndex:this.modalZindex,top:x?"".concat(x,"px"):null},on:{click:this.selfClickEvent}},[e("div",{class:"vxe-modal--box",on:{mousedown:this.boxMousedownEvent},ref:"modalBox"},[this.showHeader?e("div",{class:["vxe-modal--header",{"is--draggable":h,"is--ellipsis":!N&&T}],on:n},C?!s||z&&!w?[]:(0,_vn.getSlotVNs)(C.call(this,{$modal:this},e)):[e("div",{class:"vxe-modal--header-title"},E?(0,_vn.getSlotVNs)(E.call(this,{$modal:this},e)):S?(0,_utils.getFuncText)(S):_conf.default.i18n("vxe.alert.title")),e("div",{class:"vxe-modal--header-right"},[i?e("span",{class:"vxe-modal--corner-wrapper"},(0,_vn.getSlotVNs)(i({$modal:this}))):t(),d?e("i",{class:["vxe-modal--zoom-btn","trigger--btn",y?_conf.default.icon.MODAL_ZOOM_OUT:_conf.default.icon.MODAL_ZOOM_IN],attrs:{title:_conf.default.i18n("vxe.modal.zoom".concat(y?"Out":"In"))},on:{click:this.toggleZoomEvent}}):t(),u?e("i",{class:["vxe-modal--close-btn","trigger--btn",_conf.default.icon.MODAL_CLOSE],attrs:{title:_conf.default.i18n("vxe.modal.close")},on:{click:this.closeEvent}}):t()])]):null,e("div",{class:"vxe-modal--body"},[p?e("div",{class:"vxe-modal--status-wrapper"},[e("i",{class:["vxe-modal--status-icon",v||_conf.default.icon["MODAL_".concat(p).toLocaleUpperCase()]]})]):null,e("div",{class:"vxe-modal--content"},P?!s||z&&!w?[]:(0,_vn.getSlotVNs)(P.call(this,{$modal:this},e)):(0,_utils.getFuncText)(A)),N?null:e(_index.default,{class:"vxe-modal--loading",props:{value:m}})]),g?e("div",{class:"vxe-modal--footer"},L?!s||z&&!w?[]:(0,_vn.getSlotVNs)(L.call(this,{$modal:this},e)):[_xeUtils.default.isBoolean(M)?M:"confirm"===a?e("vxe-button",{key:1,ref:"cancelBtn",on:{click:this.cancelEvent}},this.cancelButtonText||_conf.default.i18n("vxe.button.cancel")):null,_xeUtils.default.isBoolean(O)?O:"confirm"===a||"alert"===a?e("vxe-button",{key:2,ref:"confirmBtn",props:{status:"primary"},on:{click:this.confirmEvent}},this.confirmButtonText||_conf.default.i18n("vxe.button.confirm")):null]):null,!N&&c?e("span",{class:"vxe-modal--resize"},["wl","wr","swst","sest","st","swlb","selb","sb"].map(function(t){return e("span",{class:"".concat(t,"-resize"),attrs:{type:t},on:{mousedown:o.dragEvent}})})):null])])},methods:{recalculate:function(){var t=this.width,e=this.height,o=this.getBox();return o.style.width=t?isNaN(t)?t:"".concat(t,"px"):null,o.style.height=e?isNaN(e)?e:"".concat(e,"px"):null,this.$nextTick()},selfClickEvent:function(t){this.maskClosable&&t.target===this.$el&&this.close("mask")},updateZindex:function(){var t=this.zIndex,e=this.modalZindex;t?this.modalZindex=t:e<_utils.default.getLastZIndex()&&(this.modalZindex=_utils.default.nextZIndex())},closeEvent:function(t){var e=this.events,e=void 0===e?{}:e,o="close",t={type:o,$modal:this,$event:t};e[o]?e[o].call(this,t):this.$emit(o,t),this.close(o)},confirmEvent:function(t){var e=this.events,e=void 0===e?{}:e,o="confirm",t={type:o,$modal:this,$event:t};e[o]?e[o].call(this,t):this.$emit(o,t),this.close(o)},cancelEvent:function(t){var e=this.events,e=void 0===e?{}:e,o="cancel",t={type:o,$modal:this,$event:t};e[o]?e[o].call(this,t):this.$emit(o,t),this.close(o)},open:function(){var o=this,e=this.$refs,t=this.events,i=void 0===t?{}:t,t=this.initialized,n=this.duration,s=this.visible,l=this.isMsg,r=this.remember,a=this.showFooter;t||(this.initialized=!0,this.transfer&&document.body.appendChild(this.$el)),s||(r||this.recalculate(),this.visible=!0,this.contentVisible=!1,this.updateZindex(),allActivedModals.push(this),setTimeout(function(){o.contentVisible=!0,o.$nextTick(function(){a&&(t=e.confirmBtn||e.cancelBtn)&&t.focus();var t={type:"",$modal:o};i.show?i.show.call(o,t):(o.$emit("input",!0),o.$emit("show",t))})},10),l?(this.addMsgQueue(),-1!==n&&setTimeout(function(){return o.close("close")},_xeUtils.default.toNumber(n))):this.$nextTick(function(){var t=o.firstOpen,e=o.fullscreen;r&&!t||o.updatePosition().then(function(){setTimeout(function(){return o.updatePosition()},20)}),t&&(o.firstOpen=!1,o.hasPosStorage())?o.restorePosStorage():e&&o.$nextTick(function(){return o.maximize()})}))},addMsgQueue:function(){-1===msgQueue.indexOf(this)&&msgQueue.push(this),this.updateStyle()},removeMsgQueue:function(){var e=this;-1<msgQueue.indexOf(this)&&_xeUtils.default.remove(msgQueue,function(t){return t===e}),this.updateStyle()},updateStyle:function(){this.$nextTick(function(){var e=0;msgQueue.forEach(function(t){e+=_xeUtils.default.toNumber(t.top),t.modalTop=e,e+=t.$refs.modalBox.clientHeight})})},updatePosition:function(){var u=this;return this.$nextTick().then(function(){var t=u.marginSize,e=u.position,o=u.getBox(),i=document.documentElement.clientWidth||document.body.clientWidth,n=document.documentElement.clientHeight||document.body.clientHeight,s="center"===e,e=s?{top:e,left:e}:Object.assign({},e),l=e.top,e=e.left,r=s||"center"===l,a="",c="",c=e&&!(s||"center"===e)?isNaN(e)?e:"".concat(e,"px"):"".concat(Math.max(t,i/2-o.offsetWidth/2),"px"),a=l&&!r?isNaN(l)?l:"".concat(l,"px"):"".concat(Math.max(t,n/2-o.offsetHeight/2),"px");o.style.top=a,o.style.left=c})},close:function(t){var e=this,o=this.events,i=void 0===o?{}:o,n=this.remember,o=this.visible,s=this.isMsg,l=this.beforeHideMethod,r={type:t,$modal:this};o&&Promise.resolve(l?l(r):null).then(function(t){_xeUtils.default.isError(t)||(s&&e.removeMsgQueue(),e.contentVisible=!1,n||(e.revertLocat=null),_xeUtils.default.remove(allActivedModals,function(t){return t===e}),e.$emit("before-hide",r),setTimeout(function(){e.visible=!1,i.hide?i.hide.call(e,r):(e.$emit("input",!1),e.$emit("hide",r))},200))}).catch(function(t){return t})},handleGlobalKeydownEvent:function(t){var e,o=this;27===t.keyCode&&(e=_xeUtils.default.max(allActivedModals,function(t){return t.modalZindex}))&&setTimeout(function(){e===o&&e.escClosable&&o.close("exit")},10)},getBox:function(){return this.$refs.modalBox},isMaximized:function(){return!!this.revertLocat},maximize:function(){var n=this;return this.$nextTick().then(function(){var t,e,o,i;n.revertLocat||(t=Math.max(0,n.marginSize),e=n.getBox(),o=(i=_dom.default.getDomNode()).visibleHeight,i=i.visibleWidth,n.revertLocat={top:e.offsetTop,left:e.offsetLeft,width:e.offsetWidth+(e.style.width?0:1),height:e.offsetHeight+(e.style.height?0:1)},Object.assign(e.style,{top:"".concat(t,"px"),left:"".concat(t,"px"),width:"".concat(i-2*t,"px"),height:"".concat(o-2*t,"px")}),n.savePosStorage())})},revert:function(){var o=this;return this.$nextTick().then(function(){var t,e=o.revertLocat;e&&(t=o.getBox(),o.revertLocat=null,Object.assign(t.style,{top:"".concat(e.top,"px"),left:"".concat(e.left,"px"),width:"".concat(e.width,"px"),height:"".concat(e.height,"px")}),o.savePosStorage())})},zoom:function(){var t=this;return this[this.revertLocat?"revert":"maximize"]().then(function(){return t.isMaximized()})},toggleZoomEvent:function(t){var e=this,o=this.$listeners,i=this.revertLocat,n=this.events,s=void 0===n?{}:n,l={type:i?"revert":"max",$modal:this,$event:t};return this.zoom().then(function(){o.zoom?e.$emit("zoom",l):s.zoom&&s.zoom.call(e,l)})},getPosition:function(){if(!this.isMsg){var t=this.getBox();if(t)return{top:t.offsetTop,left:t.offsetLeft}}return null},setPosition:function(t,e){var o;return this.isMsg||(o=this.getBox(),_xeUtils.default.isNumber(t)&&(o.style.top="".concat(t,"px")),_xeUtils.default.isNumber(e)&&(o.style.left="".concat(e,"px"))),this.$nextTick()},boxMousedownEvent:function(){var e=this.modalZindex;allActivedModals.some(function(t){return t.visible&&t.modalZindex>e})&&this.updateZindex()},mousedownEvent:function(t){var e,o,s,l,r,a,c=this,i=this.remember,n=this.storage,u=this.marginSize,d=this.revertLocat,f=this.getBox();d||0!==t.button||_dom.default.getEventTargetNode(t,f,"trigger--btn").flag||(t.preventDefault(),e=document.onmousemove,o=document.onmouseup,s=t.clientX-f.offsetLeft,l=t.clientY-f.offsetTop,d=_dom.default.getDomNode(),r=d.visibleHeight,a=d.visibleWidth,document.onmousemove=function(t){t.preventDefault();var e=f.offsetWidth,o=f.offsetHeight,e=a-e-u-1,o=r-o-u-1,i=t.clientX-s,n=t.clientY-l;(n=o<n?o:n)<u&&(n=u),f.style.left="".concat(i=(i=e<i?e:i)<u?u:i,"px"),f.style.top="".concat(n,"px"),f.className=f.className.replace(/\s?is--drag/,"")+" is--drag",c.$emit("move",{type:"move",$event:t})},document.onmouseup=function(){document.onmousemove=e,document.onmouseup=o,i&&n&&c.$nextTick(function(){c.savePosStorage()}),setTimeout(function(){f.className=f.className.replace(/\s?is--drag/,"")},50)})},dragEvent:function(t){var s=this,l=(t.preventDefault(),this.$listeners),r=this.marginSize,e=this.events,a=void 0===e?{}:e,c=this.remember,u=this.storage,e=_dom.default.getDomNode(),d=e.visibleHeight,f=e.visibleWidth,h=t.target.getAttribute("type"),m=_xeUtils.default.toNumber(this.minWidth),p=_xeUtils.default.toNumber(this.minHeight),v=f,g=d,y=this.getBox(),o=document.onmousemove,i=document.onmouseup,x=y.clientWidth,_=y.clientHeight,b=t.clientX,w=t.clientY,S=y.offsetTop,k=y.offsetLeft,B={type:"resize",$modal:this};document.onmousemove=function(t){var e,o,i,n;switch(t.preventDefault(),h){case"wl":i=(e=b-t.clientX)+x,r<k-e&&m<i&&(y.style.width="".concat(i<v?i:v,"px"),y.style.left="".concat(k-e,"px"));break;case"swst":e=b-t.clientX,o=w-t.clientY,i=e+x,n=o+_,r<k-e&&m<i&&(y.style.width="".concat(i<v?i:v,"px"),y.style.left="".concat(k-e,"px")),r<S-o&&p<n&&(y.style.height="".concat(n<g?n:g,"px"),y.style.top="".concat(S-o,"px"));break;case"swlb":e=b-t.clientX,o=t.clientY-w,i=e+x,n=o+_,r<k-e&&m<i&&(y.style.width="".concat(i<v?i:v,"px"),y.style.left="".concat(k-e,"px")),S+n+r<d&&p<n&&(y.style.height="".concat(n<g?n:g,"px"));break;case"st":o=w-t.clientY,n=_+o,r<S-o&&p<n&&(y.style.height="".concat(n<g?n:g,"px"),y.style.top="".concat(S-o,"px"));break;case"wr":e=t.clientX-b,k+(i=e+x)+r<f&&m<i&&(y.style.width="".concat(i<v?i:v,"px"));break;case"sest":e=t.clientX-b,n=(o=w-t.clientY)+_,k+(i=e+x)+r<f&&m<i&&(y.style.width="".concat(i<v?i:v,"px")),r<S-o&&p<n&&(y.style.height="".concat(n<g?n:g,"px"),y.style.top="".concat(S-o,"px"));break;case"selb":e=t.clientX-b,n=(o=t.clientY-w)+_,k+(i=e+x)+r<f&&m<i&&(y.style.width="".concat(i<v?i:v,"px")),S+n+r<d&&p<n&&(y.style.height="".concat(n<g?n:g,"px"));break;case"sb":o=t.clientY-w,S+(n=o+_)+r<d&&p<n&&(y.style.height="".concat(n<g?n:g,"px"))}y.className=y.className.replace(/\s?is--drag/,"")+" is--drag",c&&u&&s.savePosStorage(),l.resize?s.$emit("resize",B):a.resize&&a.resize.call(s,B)},document.onmouseup=function(){s.revertLocat=null,document.onmousemove=o,document.onmouseup=i,setTimeout(function(){y.className=y.className.replace(/\s?is--drag/,"")},50)}},getStorageMap:function(t){var e=_conf.default.version,t=_xeUtils.default.toStringJSON(localStorage.getItem(t));return t&&t._v===e?t:{_v:e}},hasPosStorage:function(){var t=this.id,e=this.remember,o=this.storage,i=this.storageKey;return!!(e&&o&&this.getStorageMap(i)[t])},restorePosStorage:function(){var t,e,o,i,n,s=this.id,l=this.remember,r=this.storage,a=this.storageKey;l&&r&&(l=this.getStorageMap(a)[s])&&(r=this.getBox(),s=(a=_slicedToArray(l.split(","),8))[0],l=a[1],t=a[2],e=a[3],o=a[4],i=a[5],n=a[6],a=a[7],s&&(r.style.left="".concat(s,"px")),l&&(r.style.top="".concat(l,"px")),t&&(r.style.width="".concat(t,"px")),e&&(r.style.height="".concat(e,"px")),o)&&i&&(this.revertLocat={left:o,top:i,width:n,height:a})},savePosStorage:function(){var t=this.id,e=this.remember,o=this.storage,i=this.storageKey,n=this.revertLocat;e&&o&&(e=this.getBox(),(o=this.getStorageMap(i))[t]=[e.style.left,e.style.top,e.style.width,e.style.height].concat(n?[n.left,n.top,n.width,n.height]:[]).map(function(t){return t?_xeUtils.default.toNumber(t):""}).join(","),localStorage.setItem(i,_xeUtils.default.toJSONString(o)))}}};
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.msgQueue=exports.default=exports.allActivedModals=void 0;var _conf=_interopRequireDefault(require("../../v-x-e-table/src/conf")),_size=_interopRequireDefault(require("../../mixins/size")),_xeUtils=_interopRequireDefault(require("xe-utils")),_utils=_interopRequireWildcard(require("../../tools/utils")),_dom=_interopRequireDefault(require("../../tools/dom")),_event=require("../../tools/event"),_log=require("../../tools/log"),_vn=require("../../tools/vn"),_index=_interopRequireDefault(require("../../loading/index"));function _getRequireWildcardCache(t){var e,o;return"function"!=typeof WeakMap?null:(e=new WeakMap,o=new WeakMap,(_getRequireWildcardCache=function(t){return t?o:e})(t))}function _interopRequireWildcard(t,e){if(!e&&t&&t.__esModule)return t;if(null===t||"object"!=_typeof(t)&&"function"!=typeof t)return{default:t};e=_getRequireWildcardCache(e);if(e&&e.has(t))return e.get(t);var o,i,n={__proto__:null},s=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(o in t)"default"!==o&&{}.hasOwnProperty.call(t,o)&&((i=s?Object.getOwnPropertyDescriptor(t,o):null)&&(i.get||i.set)?Object.defineProperty(n,o,i):n[o]=t[o]);return n.default=t,e&&e.set(t,n),n}function _interopRequireDefault(t){return t&&t.__esModule?t:{default:t}}function _typeof(t){return(_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function _slicedToArray(t,e){return _arrayWithHoles(t)||_iterableToArrayLimit(t,e)||_unsupportedIterableToArray(t,e)||_nonIterableRest()}function _nonIterableRest(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _unsupportedIterableToArray(t,e){var o;if(t)return"string"==typeof t?_arrayLikeToArray(t,e):"Map"===(o="Object"===(o=Object.prototype.toString.call(t).slice(8,-1))&&t.constructor?t.constructor.name:o)||"Set"===o?Array.from(t):"Arguments"===o||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(o)?_arrayLikeToArray(t,e):void 0}function _arrayLikeToArray(t,e){(null==e||e>t.length)&&(e=t.length);for(var o=0,i=new Array(e);o<e;o++)i[o]=t[o];return i}function _iterableToArrayLimit(t,e){var o=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=o){var i,n,s,l,r=[],a=!0,c=!1;try{if(s=(o=o.call(t)).next,0===e){if(Object(o)!==o)return;a=!1}else for(;!(a=(i=s.call(o)).done)&&(r.push(i.value),r.length!==e);a=!0);}catch(t){c=!0,n=t}finally{try{if(!a&&null!=o.return&&(l=o.return(),Object(l)!==l))return}finally{if(c)throw n}}return r}}function _arrayWithHoles(t){if(Array.isArray(t))return t}function _defineProperty(t,e,o){return(e=_toPropertyKey(e))in t?Object.defineProperty(t,e,{value:o,enumerable:!0,configurable:!0,writable:!0}):t[e]=o,t}function _toPropertyKey(t){t=_toPrimitive(t,"string");return"symbol"==_typeof(t)?t:t+""}function _toPrimitive(t,e){if("object"!=_typeof(t)||!t)return t;var o=t[Symbol.toPrimitive];if(void 0===o)return("string"===e?String:Number)(t);o=o.call(t,e||"default");if("object"!=_typeof(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}var allActivedModals=exports.allActivedModals=[],msgQueue=exports.msgQueue=[],_default2=exports.default={name:"VxeModal",mixins:[_size.default],props:{value:Boolean,id:String,type:{type:String,default:"modal"},loading:{type:Boolean,default:null},status:String,iconStatus:String,className:String,top:{type:[Number,String],default:function(){return _conf.default.modal.top}},position:[String,Object],title:String,duration:{type:[Number,String],default:function(){return _conf.default.modal.duration}},message:[String,Function],content:[String,Function],showCancelButton:{type:Boolean,default:null},cancelButtonText:{type:String,default:function(){return _conf.default.modal.cancelButtonText}},showConfirmButton:{type:Boolean,default:function(){return _conf.default.modal.showConfirmButton}},confirmButtonText:{type:String,default:function(){return _conf.default.modal.confirmButtonText}},lockView:{type:Boolean,default:function(){return _conf.default.modal.lockView}},lockScroll:Boolean,mask:{type:Boolean,default:function(){return _conf.default.modal.mask}},maskClosable:{type:Boolean,default:function(){return _conf.default.modal.maskClosable}},escClosable:{type:Boolean,default:function(){return _conf.default.modal.escClosable}},resize:{type:Boolean,default:function(){return _conf.default.modal.resize}},showHeader:{type:Boolean,default:function(){return _conf.default.modal.showHeader}},showFooter:{type:Boolean,default:function(){return _conf.default.modal.showFooter}},showZoom:{type:Boolean,default:null},showClose:{type:Boolean,default:function(){return _conf.default.modal.showClose}},dblclickZoom:{type:Boolean,default:function(){return _conf.default.modal.dblclickZoom}},width:[Number,String],height:[Number,String],minWidth:{type:[Number,String],default:function(){return _conf.default.modal.minWidth}},minHeight:{type:[Number,String],default:function(){return _conf.default.modal.minHeight}},zIndex:Number,marginSize:{type:[Number,String],default:function(){return _conf.default.modal.marginSize}},fullscreen:Boolean,draggable:{type:Boolean,default:function(){return _conf.default.modal.draggable}},remember:{type:Boolean,default:function(){return _conf.default.modal.remember}},destroyOnClose:{type:Boolean,default:function(){return _conf.default.modal.destroyOnClose}},showTitleOverflow:{type:Boolean,default:function(){return _conf.default.modal.showTitleOverflow}},transfer:{type:Boolean,default:function(){return _conf.default.modal.transfer}},storage:{type:Boolean,default:function(){return _conf.default.modal.storage}},storageKey:{type:String,default:function(){return _conf.default.modal.storageKey}},animat:{type:Boolean,default:function(){return _conf.default.modal.animat}},size:{type:String,default:function(){return _conf.default.modal.size||_conf.default.size}},beforeHideMethod:{type:Function,default:function(){return _conf.default.modal.beforeHideMethod}},slots:Object,events:Object},data:function(){return{initialized:!1,visible:!1,contentVisible:!1,modalTop:0,modalZindex:0,revertLocat:null,firstOpen:!0}},computed:{isMsg:function(){return"message"===this.type}},watch:{width:function(){this.recalculate()},height:function(){this.recalculate()},value:function(t){this[t?"open":"close"]("model")}},created:function(){this.storage&&!this.id&&(0,_log.errLog)("vxe.error.reqProp",["modal.id"])},mounted:function(){var t=this.$listeners,e=this.events,e=void 0===e?{}:e,o=(this.value&&this.open(),this.recalculate(),this.escClosable&&_event.GlobalEvent.on(this,"keydown",this.handleGlobalKeydownEvent),"inserted"),o={type:o,$modal:this,$event:{type:o}};t.inserted?this.$emit("inserted",o):e.inserted&&e.inserted.call(this,o)},beforeDestroy:function(){var t=this.$el;_event.GlobalEvent.off(this,"keydown"),this.removeMsgQueue(),t.parentNode===document.body&&t.parentNode.removeChild(t)},render:function(e){var o=this,t=this._e,i=this.$scopedSlots,n=this.slots,n=void 0===n?{}:n,s=this.initialized,l=this.vSize,r=this.className,a=this.type,c=this.resize,u=this.showClose,d=this.showZoom,f=this.animat,h=this.draggable,m=this.loading,p=this.status,v=this.iconStatus,g=this.showFooter,y=this.revertLocat,x=this.modalTop,_=this.dblclickZoom,b=this.contentVisible,w=this.visible,S=this.title,k=this.lockScroll,B=this.lockView,$=this.mask,T=this.isMsg,N=this.showTitleOverflow,z=this.destroyOnClose,M=this.showCancelButton,O=this.showConfirmButton,A=this.content||this.message,P=i.default||n.default,L=i.footer||n.footer,C=i.header||n.header,E=i.title||n.title,i=i.corner||n.corner,n={};return h&&(n.mousedown=this.mousedownEvent),d&&_&&"modal"===a&&(n.dblclick=this.toggleZoomEvent),e("div",{class:["vxe-modal--wrapper","type--".concat(a),r||"",(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_={},"size--".concat(l),l),"status--".concat(p),p),"is--animat",f),"lock--scroll",k),"lock--view",B),"is--resize",c),"is--mask",$),"is--maximize",y),"is--visible",b),"is--active",w),_defineProperty(_,"is--loading",m))],style:{zIndex:this.modalZindex,top:x?"".concat(x,"px"):null},on:{click:this.selfClickEvent}},[e("div",{class:"vxe-modal--box",on:{mousedown:this.boxMousedownEvent},ref:"modalBox"},[this.showHeader?e("div",{class:["vxe-modal--header",{"is--draggable":h,"is--ellipsis":!T&&N}],on:n},C?!s||z&&!w?[]:(0,_vn.getSlotVNs)(C.call(this,{$modal:this},e)):[e("div",{class:"vxe-modal--header-title"},E?(0,_vn.getSlotVNs)(E.call(this,{$modal:this},e)):S?(0,_utils.getFuncText)(S):_conf.default.i18n("vxe.alert.title")),e("div",{class:"vxe-modal--header-right"},[i?e("span",{class:"vxe-modal--corner-wrapper"},(0,_vn.getSlotVNs)(i({$modal:this}))):t(),d?e("i",{class:["vxe-modal--zoom-btn","trigger--btn",y?_conf.default.icon.MODAL_ZOOM_OUT:_conf.default.icon.MODAL_ZOOM_IN],attrs:{title:_conf.default.i18n("vxe.modal.zoom".concat(y?"Out":"In"))},on:{click:this.toggleZoomEvent}}):t(),u?e("i",{class:["vxe-modal--close-btn","trigger--btn",_conf.default.icon.MODAL_CLOSE],attrs:{title:_conf.default.i18n("vxe.modal.close")},on:{click:this.closeEvent}}):t()])]):null,e("div",{class:"vxe-modal--body"},[p?e("div",{class:"vxe-modal--status-wrapper"},[e("i",{class:["vxe-modal--status-icon",v||_conf.default.icon["MODAL_".concat(p).toLocaleUpperCase()]]})]):null,e("div",{class:"vxe-modal--content"},P?!s||z&&!w?[]:(0,_vn.getSlotVNs)(P.call(this,{$modal:this},e)):(0,_utils.getFuncText)(A)),T?null:e(_index.default,{class:"vxe-modal--loading",props:{value:m}})]),g?e("div",{class:"vxe-modal--footer"},L?!s||z&&!w?[]:(0,_vn.getSlotVNs)(L.call(this,{$modal:this},e)):[_xeUtils.default.isBoolean(M)?M:"confirm"===a?e("vxe-button",{key:1,ref:"cancelBtn",on:{click:this.cancelEvent}},this.cancelButtonText||_conf.default.i18n("vxe.button.cancel")):null,_xeUtils.default.isBoolean(O)?O:"confirm"===a||"alert"===a?e("vxe-button",{key:2,ref:"confirmBtn",props:{status:"primary"},on:{click:this.confirmEvent}},this.confirmButtonText||_conf.default.i18n("vxe.button.confirm")):null]):null,!T&&c?e("span",{class:"vxe-modal--resize"},["wl","wr","swst","sest","st","swlb","selb","sb"].map(function(t){return e("span",{class:"".concat(t,"-resize"),attrs:{type:t},on:{mousedown:o.dragEvent}})})):null])])},methods:{recalculate:function(){var t=this.width,e=this.height,o=this.getBox();return o.style.width=t?isNaN(t)?t:"".concat(t,"px"):null,o.style.height=e?isNaN(e)?e:"".concat(e,"px"):null,this.$nextTick()},selfClickEvent:function(t){this.maskClosable&&t.target===this.$el&&this.close("mask")},updateZindex:function(){var t=this.zIndex,e=this.modalZindex;t?this.modalZindex=t:e<_utils.default.getLastZIndex()&&(this.modalZindex=_utils.default.nextZIndex())},closeEvent:function(t){var e=this.events,e=void 0===e?{}:e,o="close",t={type:o,$modal:this,$event:t};e[o]?e[o].call(this,t):this.$emit(o,t),this.close(o)},confirmEvent:function(t){var e=this.events,e=void 0===e?{}:e,o="confirm",t={type:o,$modal:this,$event:t};e[o]?e[o].call(this,t):this.$emit(o,t),this.close(o)},cancelEvent:function(t){var e=this.events,e=void 0===e?{}:e,o="cancel",t={type:o,$modal:this,$event:t};e[o]?e[o].call(this,t):this.$emit(o,t),this.close(o)},open:function(){var o=this,e=this.$refs,t=this.events,i=void 0===t?{}:t,t=this.initialized,n=this.duration,s=this.visible,l=this.isMsg,r=this.remember,a=this.showFooter;t||(this.initialized=!0,this.transfer&&document.body.appendChild(this.$el)),s||(r||this.recalculate(),this.visible=!0,this.contentVisible=!1,this.updateZindex(),allActivedModals.push(this),setTimeout(function(){o.contentVisible=!0,o.$nextTick(function(){a&&(t=e.confirmBtn||e.cancelBtn)&&t.focus();var t={type:"",$modal:o};i.show?i.show.call(o,t):(o.$emit("input",!0),o.$emit("show",t))})},10),l?(this.addMsgQueue(),-1!==n&&setTimeout(function(){return o.close("close")},_xeUtils.default.toNumber(n))):this.$nextTick(function(){var t=o.firstOpen,e=o.fullscreen;r&&!t||o.updatePosition().then(function(){setTimeout(function(){return o.updatePosition()},20)}),t&&(o.firstOpen=!1,o.hasPosStorage())?o.restorePosStorage():e&&o.$nextTick(function(){return o.maximize()})}))},addMsgQueue:function(){-1===msgQueue.indexOf(this)&&msgQueue.push(this),this.updateStyle()},removeMsgQueue:function(){var e=this;-1<msgQueue.indexOf(this)&&_xeUtils.default.remove(msgQueue,function(t){return t===e}),this.updateStyle()},updateStyle:function(){this.$nextTick(function(){var e=0;msgQueue.forEach(function(t){e+=_xeUtils.default.toNumber(t.top),t.modalTop=e,e+=t.$refs.modalBox.clientHeight})})},updatePosition:function(){var u=this;return this.$nextTick().then(function(){var t=u.marginSize,e=u.position,o=u.getBox(),i=document.documentElement.clientWidth||document.body.clientWidth,n=document.documentElement.clientHeight||document.body.clientHeight,s="center"===e,e=s?{top:e,left:e}:Object.assign({},e),l=e.top,e=e.left,r=s||"center"===l,a="",c="",c=e&&!(s||"center"===e)?isNaN(e)?e:"".concat(e,"px"):"".concat(Math.max(t,i/2-o.offsetWidth/2),"px"),a=l&&!r?isNaN(l)?l:"".concat(l,"px"):"".concat(Math.max(t,n/2-o.offsetHeight/2),"px");o.style.top=a,o.style.left=c})},close:function(t){var e=this,o=this.events,i=void 0===o?{}:o,n=this.remember,o=this.visible,s=this.isMsg,l=this.beforeHideMethod,r={type:t,$modal:this};o&&Promise.resolve(l?l(r):null).then(function(t){_xeUtils.default.isError(t)||(s&&e.removeMsgQueue(),e.contentVisible=!1,n||(e.revertLocat=null),_xeUtils.default.remove(allActivedModals,function(t){return t===e}),e.$emit("before-hide",r),setTimeout(function(){e.visible=!1,i.hide?i.hide.call(e,r):(e.$emit("input",!1),e.$emit("hide",r))},200))}).catch(function(t){return t})},handleGlobalKeydownEvent:function(t){var e,o=this;27===t.keyCode&&(e=_xeUtils.default.max(allActivedModals,function(t){return t.modalZindex}))&&setTimeout(function(){e===o&&e.escClosable&&o.close("exit")},10)},getBox:function(){return this.$refs.modalBox},isMaximized:function(){return!!this.revertLocat},maximize:function(){var e=this;return this.$nextTick().then(function(){var t;e.revertLocat||(t=e.getBox(),e.revertLocat={top:t.offsetTop,left:t.offsetLeft,width:t.offsetWidth+(t.style.width?0:1),height:t.offsetHeight+(t.style.height?0:1)},Object.assign(t.style,{top:"0",left:"0",width:"100%",height:"100%"}),e.savePosStorage())})},revert:function(){var o=this;return this.$nextTick().then(function(){var t,e=o.revertLocat;e&&(t=o.getBox(),o.revertLocat=null,Object.assign(t.style,{top:"".concat(e.top,"px"),left:"".concat(e.left,"px"),width:"".concat(e.width,"px"),height:"".concat(e.height,"px")}),o.savePosStorage())})},zoom:function(){var t=this;return this[this.revertLocat?"revert":"maximize"]().then(function(){return t.isMaximized()})},toggleZoomEvent:function(t){var e=this,o=this.$listeners,i=this.revertLocat,n=this.events,s=void 0===n?{}:n,l={type:i?"revert":"max",$modal:this,$event:t};return this.zoom().then(function(){o.zoom?e.$emit("zoom",l):s.zoom&&s.zoom.call(e,l)})},getPosition:function(){if(!this.isMsg){var t=this.getBox();if(t)return{top:t.offsetTop,left:t.offsetLeft}}return null},setPosition:function(t,e){var o;return this.isMsg||(o=this.getBox(),_xeUtils.default.isNumber(t)&&(o.style.top="".concat(t,"px")),_xeUtils.default.isNumber(e)&&(o.style.left="".concat(e,"px"))),this.$nextTick()},boxMousedownEvent:function(){var e=this.modalZindex;allActivedModals.some(function(t){return t.visible&&t.modalZindex>e})&&this.updateZindex()},mousedownEvent:function(t){var e,o,s,l,r,a,c=this,i=this.remember,n=this.storage,u=this.marginSize,d=this.revertLocat,f=this.getBox();d||0!==t.button||_dom.default.getEventTargetNode(t,f,"trigger--btn").flag||(t.preventDefault(),e=document.onmousemove,o=document.onmouseup,s=t.clientX-f.offsetLeft,l=t.clientY-f.offsetTop,d=_dom.default.getDomNode(),r=d.visibleHeight,a=d.visibleWidth,document.onmousemove=function(t){t.preventDefault();var e=f.offsetWidth,o=f.offsetHeight,e=a-e-u-1,o=r-o-u-1,i=t.clientX-s,n=t.clientY-l;(n=o<n?o:n)<u&&(n=u),f.style.left="".concat(i=(i=e<i?e:i)<u?u:i,"px"),f.style.top="".concat(n,"px"),f.className=f.className.replace(/\s?is--drag/,"")+" is--drag",c.$emit("move",{type:"move",$event:t})},document.onmouseup=function(){document.onmousemove=e,document.onmouseup=o,i&&n&&c.$nextTick(function(){c.savePosStorage()}),setTimeout(function(){f.className=f.className.replace(/\s?is--drag/,"")},50)})},dragEvent:function(t){var s=this,l=(t.preventDefault(),this.$listeners),r=this.marginSize,e=this.events,a=void 0===e?{}:e,c=this.remember,u=this.storage,e=_dom.default.getDomNode(),d=e.visibleHeight,f=e.visibleWidth,h=t.target.getAttribute("type"),m=_xeUtils.default.toNumber(this.minWidth),p=_xeUtils.default.toNumber(this.minHeight),v=f,g=d,y=this.getBox(),o=document.onmousemove,i=document.onmouseup,x=y.clientWidth,_=y.clientHeight,b=t.clientX,w=t.clientY,S=y.offsetTop,k=y.offsetLeft,B={type:"resize",$modal:this};document.onmousemove=function(t){var e,o,i,n;switch(t.preventDefault(),h){case"wl":i=(e=b-t.clientX)+x,r<k-e&&m<i&&(y.style.width="".concat(i<v?i:v,"px"),y.style.left="".concat(k-e,"px"));break;case"swst":e=b-t.clientX,o=w-t.clientY,i=e+x,n=o+_,r<k-e&&m<i&&(y.style.width="".concat(i<v?i:v,"px"),y.style.left="".concat(k-e,"px")),r<S-o&&p<n&&(y.style.height="".concat(n<g?n:g,"px"),y.style.top="".concat(S-o,"px"));break;case"swlb":e=b-t.clientX,o=t.clientY-w,i=e+x,n=o+_,r<k-e&&m<i&&(y.style.width="".concat(i<v?i:v,"px"),y.style.left="".concat(k-e,"px")),S+n+r<d&&p<n&&(y.style.height="".concat(n<g?n:g,"px"));break;case"st":o=w-t.clientY,n=_+o,r<S-o&&p<n&&(y.style.height="".concat(n<g?n:g,"px"),y.style.top="".concat(S-o,"px"));break;case"wr":e=t.clientX-b,k+(i=e+x)+r<f&&m<i&&(y.style.width="".concat(i<v?i:v,"px"));break;case"sest":e=t.clientX-b,n=(o=w-t.clientY)+_,k+(i=e+x)+r<f&&m<i&&(y.style.width="".concat(i<v?i:v,"px")),r<S-o&&p<n&&(y.style.height="".concat(n<g?n:g,"px"),y.style.top="".concat(S-o,"px"));break;case"selb":e=t.clientX-b,n=(o=t.clientY-w)+_,k+(i=e+x)+r<f&&m<i&&(y.style.width="".concat(i<v?i:v,"px")),S+n+r<d&&p<n&&(y.style.height="".concat(n<g?n:g,"px"));break;case"sb":o=t.clientY-w,S+(n=o+_)+r<d&&p<n&&(y.style.height="".concat(n<g?n:g,"px"))}y.className=y.className.replace(/\s?is--drag/,"")+" is--drag",c&&u&&s.savePosStorage(),l.resize?s.$emit("resize",B):a.resize&&a.resize.call(s,B)},document.onmouseup=function(){s.revertLocat=null,document.onmousemove=o,document.onmouseup=i,setTimeout(function(){y.className=y.className.replace(/\s?is--drag/,"")},50)}},getStorageMap:function(t){var e=_conf.default.version,t=_xeUtils.default.toStringJSON(localStorage.getItem(t));return t&&t._v===e?t:{_v:e}},hasPosStorage:function(){var t=this.id,e=this.remember,o=this.storage,i=this.storageKey;return!!(e&&o&&this.getStorageMap(i)[t])},restorePosStorage:function(){var t,e,o,i,n,s=this.id,l=this.remember,r=this.storage,a=this.storageKey;l&&r&&(l=this.getStorageMap(a)[s])&&(r=this.getBox(),s=(a=_slicedToArray(l.split(","),8))[0],l=a[1],t=a[2],e=a[3],o=a[4],i=a[5],n=a[6],a=a[7],s&&(r.style.left="".concat(s,"px")),l&&(r.style.top="".concat(l,"px")),t&&(r.style.width="".concat(t,"px")),e&&(r.style.height="".concat(e,"px")),o)&&i&&(this.revertLocat={left:o,top:i,width:n,height:a})},savePosStorage:function(){var t=this.id,e=this.remember,o=this.storage,i=this.storageKey,n=this.revertLocat;e&&o&&(e=this.getBox(),(o=this.getStorageMap(i))[t]=[e.style.left,e.style.top,e.style.width,e.style.height].concat(n?[n.left,n.top,n.width,n.height]:[]).map(function(t){return t?_xeUtils.default.toNumber(t):""}).join(","),localStorage.setItem(i,_xeUtils.default.toJSONString(o)))}}};
@@ -200,11 +200,11 @@
200
200
 
201
201
  /*radio*/
202
202
  .vxe-radio {
203
- cursor: pointer;
204
203
  display: inline-block;
205
204
  vertical-align: middle;
206
205
  white-space: nowrap;
207
206
  line-height: 1;
207
+ cursor: pointer;
208
208
  }
209
209
  .vxe-radio .vxe-radio--icon {
210
210
  font-size: 1.4em;
@@ -1 +1 @@
1
- [class*=vxe-],[class*=vxe-] :after,[class*=vxe-] :before,[class*=vxe-]:after,[class*=vxe-]:before{box-sizing:border-box}.vxe-radio .vxe-radio--label,.vxe-radio-button .vxe-radio--label{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}[class*=vxe-]{font-variant:tabular-nums;font-feature-settings:"tnum"}.vxe-primary-color{color:#409eff}.vxe-success-color{color:#67c23a}.vxe-info-color{color:#909399}.vxe-warning-color{color:#e6a23c}.vxe-danger-color{color:#f56c6c}.vxe-perfect-color{color:#f8f8f9}.vxe-row:after{content:"";display:block;clear:both;height:0;overflow:hidden;visibility:hidden}.vxe-row>.vxe-col--1{float:left;width:4.16667%}.vxe-row>.vxe-col--2{float:left;width:8.33333%}.vxe-row>.vxe-col--3{float:left;width:12.5%}.vxe-row>.vxe-col--4{float:left;width:16.66667%}.vxe-row>.vxe-col--5{float:left;width:20.83333%}.vxe-row>.vxe-col--6{float:left;width:25%}.vxe-row>.vxe-col--7{float:left;width:29.16667%}.vxe-row>.vxe-col--8{float:left;width:33.33333%}.vxe-row>.vxe-col--9{float:left;width:37.5%}.vxe-row>.vxe-col--10{float:left;width:41.66667%}.vxe-row>.vxe-col--11{float:left;width:45.83333%}.vxe-row>.vxe-col--12{float:left;width:50%}.vxe-row>.vxe-col--13{float:left;width:54.16667%}.vxe-row>.vxe-col--14{float:left;width:58.33333%}.vxe-row>.vxe-col--15{float:left;width:62.5%}.vxe-row>.vxe-col--16{float:left;width:66.66667%}.vxe-row>.vxe-col--17{float:left;width:70.83333%}.vxe-row>.vxe-col--18{float:left;width:75%}.vxe-row>.vxe-col--19{float:left;width:79.16667%}.vxe-row>.vxe-col--20{float:left;width:83.33333%}.vxe-row>.vxe-col--21{float:left;width:87.5%}.vxe-row>.vxe-col--22{float:left;width:91.66667%}.vxe-row>.vxe-col--23{float:left;width:95.83333%}.vxe-row>.vxe-col--24{float:left;width:100%}.is--animat .vxe-filter--btn:after,.is--animat .vxe-filter--btn:before,.is--animat .vxe-sort--asc-btn:after,.is--animat .vxe-sort--asc-btn:before,.is--animat .vxe-sort--desc-btn:after,.is--animat .vxe-sort--desc-btn:before{transition:border .1s ease-in-out}.is--animat .vxe-input--wrapper .vxe-input{transition:border .1s ease-in-out}.is--animat .vxe-table--expand-btn,.is--animat .vxe-tree--node-btn{transition:transform .1s ease-in-out}.is--animat .vxe-checkbox>input:checked+span,.is--animat .vxe-radio>input:checked+span{transition:background-color .1s ease-in-out}.vxe-radio-group{display:inline-block;vertical-align:middle;line-height:1;font-size:0}.vxe-radio-group+.vxe-radio-group{margin-left:10px}.vxe-radio{cursor:pointer;display:inline-block;vertical-align:middle;white-space:nowrap;line-height:1}.vxe-radio .vxe-radio--icon{font-size:1.4em}.vxe-radio .vxe-radio--icon{color:#dcdfe6;vertical-align:middle;font-weight:700;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.vxe-radio.is--checked{color:#409eff}.vxe-radio.is--checked .vxe-radio--icon{color:#409eff}.vxe-radio:not(.is--disabled){cursor:pointer}.vxe-radio:not(.is--disabled):hover .vxe-radio--icon{color:#409eff}.vxe-radio.is--disabled{color:#bfbfbf;cursor:not-allowed}.vxe-radio.is--disabled .vxe-radio--icon{color:#dcdfe6}.vxe-radio .vxe-radio--label{padding-left:.5em;vertical-align:middle}.vxe-radio>input[type=radio]{position:absolute;width:0;height:0;border:0;-webkit-appearance:none;-moz-appearance:none;appearance:none}.vxe-radio .vxe-radio--label{vertical-align:middle;display:inline-block;max-width:50em}.vxe-radio:not(.is--disabled)>input:focus+.vxe-radio--icon{color:#409eff}.vxe-radio:not(.vxe-radio-button)+.vxe-radio{margin-left:10px}.vxe-radio-button .vxe-radio--label{background-color:#fff}.vxe-radio-button:first-child .vxe-radio--label{border-left:1px solid #dcdfe6;border-radius:4px 0 0 4px}.vxe-radio-button:last-child .vxe-radio--label{border-radius:0 4px 4px 0}.vxe-radio-button>input:checked+.vxe-radio--label{color:#fff;background-color:#409eff;border-color:#409eff}.vxe-radio-button .vxe-radio--label{padding:0 1em;line-height:32px;display:inline-block;border-style:solid;border-color:#dcdfe6;border-width:1px 1px 1px 0;max-width:50em}.vxe-radio-button.is--disabled{cursor:not-allowed}.vxe-radio-button.is--disabled>input:not(:checked)+.vxe-radio--label{color:#dcdfe6}.vxe-radio-button.is--disabled>input:checked+.vxe-radio--label{border-color:#73b8ff;background-color:#73b8ff}.vxe-radio-button:not(.is--disabled)>input:focus+.vxe-radio--label{border-color:#409eff;box-shadow:0 0 .2em 0 #409eff}.vxe-radio-button:not(.is--disabled):hover>input:not(:checked)+.vxe-radio--label{color:#409eff}.vxe-radio-button.size--medium .vxe-radio--label{line-height:30px}.vxe-radio-button.size--small .vxe-radio--label{line-height:28px}.vxe-radio-button.size--mini .vxe-radio--label{line-height:26px}.vxe-radio{font-size:14px}.vxe-radio.size--medium{font-size:14px}.vxe-radio.size--small{font-size:13px}.vxe-radio.size--mini{font-size:12px}
1
+ [class*=vxe-],[class*=vxe-] :after,[class*=vxe-] :before,[class*=vxe-]:after,[class*=vxe-]:before{box-sizing:border-box}.vxe-radio .vxe-radio--label,.vxe-radio-button .vxe-radio--label{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}[class*=vxe-]{font-variant:tabular-nums;font-feature-settings:"tnum"}.vxe-primary-color{color:#409eff}.vxe-success-color{color:#67c23a}.vxe-info-color{color:#909399}.vxe-warning-color{color:#e6a23c}.vxe-danger-color{color:#f56c6c}.vxe-perfect-color{color:#f8f8f9}.vxe-row:after{content:"";display:block;clear:both;height:0;overflow:hidden;visibility:hidden}.vxe-row>.vxe-col--1{float:left;width:4.16667%}.vxe-row>.vxe-col--2{float:left;width:8.33333%}.vxe-row>.vxe-col--3{float:left;width:12.5%}.vxe-row>.vxe-col--4{float:left;width:16.66667%}.vxe-row>.vxe-col--5{float:left;width:20.83333%}.vxe-row>.vxe-col--6{float:left;width:25%}.vxe-row>.vxe-col--7{float:left;width:29.16667%}.vxe-row>.vxe-col--8{float:left;width:33.33333%}.vxe-row>.vxe-col--9{float:left;width:37.5%}.vxe-row>.vxe-col--10{float:left;width:41.66667%}.vxe-row>.vxe-col--11{float:left;width:45.83333%}.vxe-row>.vxe-col--12{float:left;width:50%}.vxe-row>.vxe-col--13{float:left;width:54.16667%}.vxe-row>.vxe-col--14{float:left;width:58.33333%}.vxe-row>.vxe-col--15{float:left;width:62.5%}.vxe-row>.vxe-col--16{float:left;width:66.66667%}.vxe-row>.vxe-col--17{float:left;width:70.83333%}.vxe-row>.vxe-col--18{float:left;width:75%}.vxe-row>.vxe-col--19{float:left;width:79.16667%}.vxe-row>.vxe-col--20{float:left;width:83.33333%}.vxe-row>.vxe-col--21{float:left;width:87.5%}.vxe-row>.vxe-col--22{float:left;width:91.66667%}.vxe-row>.vxe-col--23{float:left;width:95.83333%}.vxe-row>.vxe-col--24{float:left;width:100%}.is--animat .vxe-filter--btn:after,.is--animat .vxe-filter--btn:before,.is--animat .vxe-sort--asc-btn:after,.is--animat .vxe-sort--asc-btn:before,.is--animat .vxe-sort--desc-btn:after,.is--animat .vxe-sort--desc-btn:before{transition:border .1s ease-in-out}.is--animat .vxe-input--wrapper .vxe-input{transition:border .1s ease-in-out}.is--animat .vxe-table--expand-btn,.is--animat .vxe-tree--node-btn{transition:transform .1s ease-in-out}.is--animat .vxe-checkbox>input:checked+span,.is--animat .vxe-radio>input:checked+span{transition:background-color .1s ease-in-out}.vxe-radio-group{display:inline-block;vertical-align:middle;line-height:1;font-size:0}.vxe-radio-group+.vxe-radio-group{margin-left:10px}.vxe-radio{display:inline-block;vertical-align:middle;white-space:nowrap;line-height:1;cursor:pointer}.vxe-radio .vxe-radio--icon{font-size:1.4em}.vxe-radio .vxe-radio--icon{color:#dcdfe6;vertical-align:middle;font-weight:700;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.vxe-radio.is--checked{color:#409eff}.vxe-radio.is--checked .vxe-radio--icon{color:#409eff}.vxe-radio:not(.is--disabled){cursor:pointer}.vxe-radio:not(.is--disabled):hover .vxe-radio--icon{color:#409eff}.vxe-radio.is--disabled{color:#bfbfbf;cursor:not-allowed}.vxe-radio.is--disabled .vxe-radio--icon{color:#dcdfe6}.vxe-radio .vxe-radio--label{padding-left:.5em;vertical-align:middle}.vxe-radio>input[type=radio]{position:absolute;width:0;height:0;border:0;-webkit-appearance:none;-moz-appearance:none;appearance:none}.vxe-radio .vxe-radio--label{vertical-align:middle;display:inline-block;max-width:50em}.vxe-radio:not(.is--disabled)>input:focus+.vxe-radio--icon{color:#409eff}.vxe-radio:not(.vxe-radio-button)+.vxe-radio{margin-left:10px}.vxe-radio-button .vxe-radio--label{background-color:#fff}.vxe-radio-button:first-child .vxe-radio--label{border-left:1px solid #dcdfe6;border-radius:4px 0 0 4px}.vxe-radio-button:last-child .vxe-radio--label{border-radius:0 4px 4px 0}.vxe-radio-button>input:checked+.vxe-radio--label{color:#fff;background-color:#409eff;border-color:#409eff}.vxe-radio-button .vxe-radio--label{padding:0 1em;line-height:32px;display:inline-block;border-style:solid;border-color:#dcdfe6;border-width:1px 1px 1px 0;max-width:50em}.vxe-radio-button.is--disabled{cursor:not-allowed}.vxe-radio-button.is--disabled>input:not(:checked)+.vxe-radio--label{color:#dcdfe6}.vxe-radio-button.is--disabled>input:checked+.vxe-radio--label{border-color:#73b8ff;background-color:#73b8ff}.vxe-radio-button:not(.is--disabled)>input:focus+.vxe-radio--label{border-color:#409eff;box-shadow:0 0 .2em 0 #409eff}.vxe-radio-button:not(.is--disabled):hover>input:not(:checked)+.vxe-radio--label{color:#409eff}.vxe-radio-button.size--medium .vxe-radio--label{line-height:30px}.vxe-radio-button.size--small .vxe-radio--label{line-height:28px}.vxe-radio-button.size--mini .vxe-radio--label{line-height:26px}.vxe-radio{font-size:14px}.vxe-radio.size--medium{font-size:14px}.vxe-radio.size--small{font-size:13px}.vxe-radio.size--mini{font-size:12px}