vxe-pc-ui 3.14.9 → 3.14.11
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/button/src/button.js +1 -1
- package/es/drawer/src/drawer.js +16 -4
- package/es/modal/src/modal.js +17 -4
- package/es/tooltip/src/tooltip.js +15 -7
- package/es/ui/index.js +3 -1
- package/es/ui/src/log.js +1 -1
- package/lib/button/src/button.js +1 -1
- package/lib/button/src/button.min.js +1 -1
- package/lib/drawer/src/drawer.js +15 -2
- package/lib/drawer/src/drawer.min.js +1 -1
- package/lib/index.umd.js +56 -14
- package/lib/index.umd.min.js +1 -1
- package/lib/modal/src/modal.js +16 -2
- package/lib/modal/src/modal.min.js +1 -1
- package/lib/tooltip/src/tooltip.js +20 -7
- package/lib/tooltip/src/tooltip.min.js +1 -1
- package/lib/ui/index.js +3 -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/package.json +1 -1
- package/packages/button/src/button.ts +1 -1
- package/packages/drawer/src/drawer.ts +16 -4
- package/packages/modal/src/modal.ts +17 -4
- package/packages/tooltip/src/tooltip.ts +15 -7
- package/packages/ui/index.ts +2 -0
- package/types/components/drawer.d.ts +2 -0
- package/types/components/gantt.d.ts +6 -1
- package/types/components/modal.d.ts +2 -0
- package/types/components/table.d.ts +11 -1
- package/types/components/tooltip.d.ts +18 -2
- /package/es/icon/{iconfont.1778663897774.ttf → iconfont.1778735749339.ttf} +0 -0
- /package/es/icon/{iconfont.1778663897774.woff → iconfont.1778735749339.woff} +0 -0
- /package/es/icon/{iconfont.1778663897774.woff2 → iconfont.1778735749339.woff2} +0 -0
- /package/es/{iconfont.1778663897774.ttf → iconfont.1778735749339.ttf} +0 -0
- /package/es/{iconfont.1778663897774.woff → iconfont.1778735749339.woff} +0 -0
- /package/es/{iconfont.1778663897774.woff2 → iconfont.1778735749339.woff2} +0 -0
- /package/lib/icon/style/{iconfont.1778663897774.ttf → iconfont.1778735749339.ttf} +0 -0
- /package/lib/icon/style/{iconfont.1778663897774.woff → iconfont.1778735749339.woff} +0 -0
- /package/lib/icon/style/{iconfont.1778663897774.woff2 → iconfont.1778735749339.woff2} +0 -0
- /package/lib/{iconfont.1778663897774.ttf → iconfont.1778735749339.ttf} +0 -0
- /package/lib/{iconfont.1778663897774.woff → iconfont.1778735749339.woff} +0 -0
- /package/lib/{iconfont.1778663897774.woff2 → iconfont.1778735749339.woff2} +0 -0
package/lib/modal/src/modal.js
CHANGED
|
@@ -61,6 +61,12 @@ var _default2 = exports.default = /* define-vxe-component start */(0, _comp.defi
|
|
|
61
61
|
}
|
|
62
62
|
},
|
|
63
63
|
content: [Number, String],
|
|
64
|
+
useHtml: {
|
|
65
|
+
type: Boolean,
|
|
66
|
+
default: function _default() {
|
|
67
|
+
return (0, _ui.getConfig)().modal.useHtml;
|
|
68
|
+
}
|
|
69
|
+
},
|
|
64
70
|
showCancelButton: {
|
|
65
71
|
type: Boolean,
|
|
66
72
|
default: null
|
|
@@ -1485,7 +1491,8 @@ var _default2 = exports.default = /* define-vxe-component start */(0, _comp.defi
|
|
|
1485
1491
|
propSlots = _props$slots3 === void 0 ? {} : _props$slots3,
|
|
1486
1492
|
status = props.status,
|
|
1487
1493
|
message = props.message,
|
|
1488
|
-
iconStatus = props.iconStatus
|
|
1494
|
+
iconStatus = props.iconStatus,
|
|
1495
|
+
useHtml = props.useHtml;
|
|
1489
1496
|
var content = props.content || message;
|
|
1490
1497
|
var isMsg = $xeModal.computeIsMsg;
|
|
1491
1498
|
var defaultSlot = slots.default || propSlots.default;
|
|
@@ -1499,7 +1506,14 @@ var _default2 = exports.default = /* define-vxe-component start */(0, _comp.defi
|
|
|
1499
1506
|
class: ['vxe-modal--status-icon', iconStatus || (0, _ui.getIcon)()["MODAL_".concat(status).toLocaleUpperCase()]]
|
|
1500
1507
|
})]));
|
|
1501
1508
|
}
|
|
1502
|
-
contVNs.push(h('div', {
|
|
1509
|
+
contVNs.push(useHtml && !defaultSlot ? h('div', {
|
|
1510
|
+
key: 'hc',
|
|
1511
|
+
class: 'vxe-modal--content',
|
|
1512
|
+
domProps: {
|
|
1513
|
+
innerHTML: (0, _utils.getFuncText)(content)
|
|
1514
|
+
}
|
|
1515
|
+
}) : h('div', {
|
|
1516
|
+
key: 'dc',
|
|
1503
1517
|
class: 'vxe-modal--content'
|
|
1504
1518
|
}, defaultSlot ? $xeModal.callSlot(defaultSlot, {
|
|
1505
1519
|
$modal: $xeModal
|
|
@@ -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=exports.allActiveModals=void 0;var _comp=require("../../ui/src/comp"),_xeUtils=_interopRequireDefault(require("xe-utils")),_ui=require("../../ui"),_dom=require("../../ui/src/dom"),_utils=require("../../ui/src/utils"),_button=_interopRequireDefault(require("../../button/src/button")),_index=_interopRequireDefault(require("../../loading/index")),_vn=require("../../ui/src/vn"),_log=require("../../ui/src/log");function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function _defineProperty(e,t,o){return(t=_toPropertyKey(t))in e?Object.defineProperty(e,t,{value:o,enumerable:!0,configurable:!0,writable:!0}):e[t]=o,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 o=e[Symbol.toPrimitive];if(void 0===o)return("string"===t?String:Number)(e);o=o.call(e,t||"default");if("object"!=_typeof(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}function _slicedToArray(e,t){return _arrayWithHoles(e)||_iterableToArrayLimit(e,t)||_unsupportedIterableToArray(e,t)||_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(e,t){var o;if(e)return"string"==typeof e?_arrayLikeToArray(e,t):"Map"===(o="Object"===(o={}.toString.call(e).slice(8,-1))&&e.constructor?e.constructor.name:o)||"Set"===o?Array.from(e):"Arguments"===o||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(o)?_arrayLikeToArray(e,t):void 0}function _arrayLikeToArray(e,t){(null==t||t>e.length)&&(t=e.length);for(var o=0,i=Array(t);o<t;o++)i[o]=e[o];return i}function _iterableToArrayLimit(e,t){var o=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=o){var i,n,a,l,r=[],s=!0,u=!1;try{if(a=(o=o.call(e)).next,0===t){if(Object(o)!==o)return;s=!1}else for(;!(s=(i=a.call(o)).done)&&(r.push(i.value),r.length!==t);s=!0);}catch(e){u=!0,n=e}finally{try{if(!s&&null!=o.return&&(l=o.return(),Object(l)!==l))return}finally{if(u)throw n}}return r}}function _arrayWithHoles(e){if(Array.isArray(e))return e}var allActiveModals=exports.allActiveModals=[],msgQueue=[],notifyQueue=[],lockScrollAttrKey="data-vxe-lock-scroll",lockScrollCssWidthKey="--vxe-ui-modal-lock-scroll-view-width",_default2=exports.default=(0,_comp.defineVxeComponent)({name:"VxeModal",mixins:[_ui.globalMixins.sizeMixin,_ui.globalMixins.permissionMixin],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(0,_ui.getConfig)().modal.top}},position:[String,Object],title:String,duration:{type:[Number,String],default:function(){return(0,_ui.getConfig)().modal.duration}},content:[Number,String],showCancelButton:{type:Boolean,default:null},cancelButtonText:{type:String,default:function(){return(0,_ui.getConfig)().modal.cancelButtonText}},showConfirmButton:{type:Boolean,default:function(){return(0,_ui.getConfig)().modal.showConfirmButton}},confirmButtonText:{type:String,default:function(){return(0,_ui.getConfig)().modal.confirmButtonText}},lockView:{type:Boolean,default:function(){return(0,_ui.getConfig)().modal.lockView}},lockScroll:Boolean,mask:{type:Boolean,default:function(){return(0,_ui.getConfig)().modal.mask}},maskClosable:{type:Boolean,default:function(){return(0,_ui.getConfig)().modal.maskClosable}},escClosable:{type:Boolean,default:function(){return(0,_ui.getConfig)().modal.escClosable}},cancelClosable:{type:Boolean,default:function(){return(0,_ui.getConfig)().modal.cancelClosable}},confirmClosable:{type:Boolean,default:function(){return(0,_ui.getConfig)().modal.confirmClosable}},resize:Boolean,showHeader:{type:Boolean,default:function(){return(0,_ui.getConfig)().modal.showHeader}},showFooter:{type:Boolean,default:function(){return(0,_ui.getConfig)().modal.showFooter}},showZoom:Boolean,zoomConfig:Object,showMaximize:{type:Boolean,default:function(){return(0,_utils.handleBooleanDefaultValue)((0,_ui.getConfig)().modal.showMaximize)}},showMinimize:{type:Boolean,default:function(){return(0,_utils.handleBooleanDefaultValue)((0,_ui.getConfig)().modal.showMinimize)}},showClose:{type:Boolean,default:function(){return(0,_ui.getConfig)().modal.showClose}},dblclickZoom:{type:Boolean,default:function(){return(0,_ui.getConfig)().modal.dblclickZoom}},width:{type:[Number,String],default:function(){return(0,_ui.getConfig)().modal.width}},height:{type:[Number,String],default:function(){return(0,_ui.getConfig)().modal.height}},minWidth:{type:[Number,String],default:function(){return(0,_ui.getConfig)().modal.minWidth}},minHeight:{type:[Number,String],default:function(){return(0,_ui.getConfig)().modal.minHeight}},zIndex:Number,marginSize:{type:[Number,String],default:function(){return(0,_ui.getConfig)().modal.marginSize}},fullscreen:Boolean,draggable:{type:Boolean,default:function(){return(0,_ui.getConfig)().modal.draggable}},remember:{type:Boolean,default:function(){return(0,_ui.getConfig)().modal.remember}},destroyOnClose:{type:Boolean,default:function(){return(0,_ui.getConfig)().modal.destroyOnClose}},showTitleOverflow:{type:Boolean,default:function(){return(0,_ui.getConfig)().modal.showTitleOverflow}},transfer:{type:Boolean,default:function(){return(0,_ui.getConfig)().modal.transfer}},storage:{type:Boolean,default:function(){return(0,_ui.getConfig)().modal.storage}},storageKey:{type:String,default:function(){return(0,_ui.getConfig)().modal.storageKey}},padding:{type:Boolean,default:function(){return(0,_ui.getConfig)().modal.padding}},size:{type:String,default:function(){return(0,_ui.getConfig)().modal.size||(0,_ui.getConfig)().size}},beforeHideMethod:Function,slots:Object,message:[Number,String],animat:{type:Boolean,default:function(){return(0,_ui.getConfig)().modal.animat}}},inject:{$xeParentModal:{from:"$xeModal",default:null},$xeDrawer:{default:null},$xeTable:{default:null},$xeForm:{default:null}},provide:function(){return{$xeModal:this}},data:function(){return{xID:_xeUtils.default.uniqueId(),reactData:{initialized:!1,visible:!1,contentVisible:!1,modalTop:0,modalZindex:0,prevZoomStatus:"",zoomStatus:"",revertLocat:null,prevLocat:null,firstOpen:!0,resizeFlag:1},internalData:{msgTimeout:void 0}}},computed:Object.assign(Object.assign({},{}),{computeBtnTransfer:function(){var e=this,t=e.$xeTable,o=e.$xeParentModal,i=e.$xeDrawer,n=e.$xeForm,e=e.transfer;if(null===e){var a=(0,_ui.getConfig)().select.transfer;if(_xeUtils.default.isBoolean(a))return a;if(t||o||i||n)return!0}return e},computeIsMsg:function(){return"message"===this.type||"notification"===this.type},computeIsMinimizeStatus:function(){return"minimize"===this.reactData.zoomStatus},computeIsMaximizeStatus:function(){return"maximize"===this.reactData.zoomStatus},computeZoomOpts:function(){return Object.assign({},(0,_ui.getConfig)().modal.zoomConfig,this.zoomConfig)}}),watch:{width:function(){this.recalculate()},height:function(){this.recalculate()},value:function(e){e?this.openModal():this.closeModal("model")}},methods:{dispatchEvent:function(e,t,o){this.$emit(e,(0,_ui.createEvent)(o,{$modal:this},t))},emitModel:function(e){var t=this._events;this.$emit("input",e),t&&t.modelValue?this.$emit("modelValue",e):this.$emit("model-value",e)},callSlot:function(e,t,o){var i=this.$scopedSlots;return e&&(_xeUtils.default.isString(e)&&(e=i[e]||null),_xeUtils.default.isFunction(e))?(0,_vn.getSlotVNs)(e.call(this,t,o)):[]},open:function(){return this.openModal()},close:function(){return this.closeModal("close")},getBox:function(){return this.$refs.refModalBox},getPosition:function(){if(!this.computeIsMsg){var e=this.getBox();if(e)return{top:e.offsetTop,left:e.offsetLeft}}return null},setPosition:function(e,t){var o;return this.computeIsMsg||(o=this.getBox())&&(_xeUtils.default.isNumber(e)&&(o.style.top="".concat(e,"px")),_xeUtils.default.isNumber(t))&&(o.style.left="".concat(t,"px")),this.$nextTick()},isMinimized:function(){return"minimize"===this.reactData.zoomStatus},isMaximized:function(){return"maximize"===this.reactData.zoomStatus},zoom:function(){return this.handleZoom()},minimize:function(){return this.reactData.visible?this.handleMinimize():Promise.resolve({status:!1})},maximize:function(){return this.reactData.visible?this.handleMaximize():Promise.resolve({status:!1})},revert:function(){return this.reactData.visible?this.handleRevert():Promise.resolve({status:!1})},recalculate:function(){var e=this.width,t=this.height,o=this.minWidth,i=this.minHeight,n=this.computeIsMsg,a=this.getBox();return a&&(a.style.width=e?(0,_dom.toCssUnit)(e):"",a.style.height=t?(0,_dom.toCssUnit)(t):"",a.style.minWidth=!n&&o?(0,_dom.toCssUnit)(o):"",a.style.minHeight=!n&&i?(0,_dom.toCssUnit)(i):""),this.$nextTick()},updateZindex:function(){var e=this.reactData,t=this.zIndex,o=e.modalZindex;t?e.modalZindex=t:this.computeIsMsg?o<(0,_utils.getSubLastZIndex)()&&(e.modalZindex=(0,_utils.nextSubZIndex)()):o<(0,_utils.getLastZIndex)()&&(e.modalZindex=(0,_utils.nextZIndex)())},updatePosition:function(){var c=this,d=c;return c.$nextTick().then(function(){var e,t,o,i,n,a,l,r=d.position,s=_xeUtils.default.toNumber(d.marginSize),u=c.getBox();u&&(e=document.documentElement.clientWidth||document.body.clientWidth,t=document.documentElement.clientHeight||document.body.clientHeight,o="center"===r,i=(r=_xeUtils.default.isString(r)?{top:r,left:r}:Object.assign({},r)).top,n=o||"center"===i,a=l="",a=(r=r.left)&&!(o||"center"===r)?isNaN(r)?r:"".concat(r,"px"):"".concat(Math.max(s,e/2-u.offsetWidth/2),"px"),l=i&&!n?isNaN(i)?i:"".concat(i,"px"):"".concat(Math.max(s,t/2-u.offsetHeight/2),"px"),u.style.top=l,u.style.left=a)})},updateStyle:function(){var t=this;this.$nextTick(function(){var e=t.type,o=0;("notification"===e?notifyQueue:msgQueue).forEach(function(e){var t=e.getBox();t&&(o+=_xeUtils.default.toNumber(e.top),e.reactData.modalTop=o,o+=t.clientHeight)})})},removeActiveQueue:function(){var t=this;-1<allActiveModals.indexOf(t)&&_xeUtils.default.remove(allActiveModals,function(e){return e===t})},removeMsgQueue:function(){var t=this,e="notification"===t.type?notifyQueue:msgQueue;-1<e.indexOf(t)&&_xeUtils.default.remove(e,function(e){return e===t}),t.updateStyle()},closeModal:function(e){var t=this,o=t.reactData,i=t.remember,n=o.visible,a=t.computeIsMsg,l=t.beforeHideMethod||(0,_ui.getConfig)().modal.beforeHideMethod,r={type:e};return n&&Promise.resolve(l?l(r):null).then(function(e){_xeUtils.default.isError(e)||(a&&t.removeMsgQueue(),o.contentVisible=!1,i||t.handleRevert(),t.removeActiveQueue(),t.dispatchEvent("before-hide",r,null),setTimeout(function(){o.visible=!1,t.emitModel(!1),t.dispatchEvent("hide",r,null)},200),t.removeBodyLockScroll())}).catch(function(e){return e}),t.$nextTick()},closeEvent:function(e){var t="close";this.dispatchEvent(t,{type:t},e),this.closeModal(t)},confirmEvent:function(e){var t=this.confirmClosable,o="confirm";this.dispatchEvent(o,{type:o},e),t&&this.closeModal(o)},cancelEvent:function(e){var t=this.cancelClosable,o="cancel";this.dispatchEvent(o,{type:o},e),t&&this.closeModal(o)},getStorageMap:function(e){var t=(0,_ui.getConfig)().version,e=_xeUtils.default.toStringJSON(localStorage.getItem(e)||"");return e&&e._v===t?e:{_v:t}},hasPosStorage:function(){var e=this.id,t=this.storage,o=this.storageKey;return!!(e&&t&&this.getStorageMap(o)[e])},restorePosStorage:function(){var e,t,o,i,n,a,l=this.reactData,r=this.id,s=this.storage,u=this.storageKey;r&&s&&(s=this.getStorageMap(u)[r])&&(u=this.getBox(),s=(r=_slicedToArray(s.split(","),8))[0],e=r[1],t=r[2],o=r[3],i=r[4],n=r[5],a=r[6],r=r[7],u&&(s&&(u.style.left="".concat(s,"px")),e&&(u.style.top="".concat(e,"px")),t&&(u.style.width="".concat(t,"px")),o)&&(u.style.height="".concat(o,"px")),i)&&n&&(l.revertLocat={left:i,top:n,width:a,height:r})},addMsgQueue:function(){var e="notification"===this.type?notifyQueue:msgQueue;-1===e.indexOf(this)&&e.push(this),this.updateStyle()},savePosStorage:function(){var e=this.reactData,t=this.id,o=this.storage,i=this.storageKey,n=e.zoomStatus,e=e.revertLocat;n||t&&o&&(n=this.getBox())&&((o=this.getStorageMap(i))[t]=[n.style.left,n.style.top,n.clientWidth,n.clientHeight].concat(e?[e.left,e.top,e.width,e.height]:[]).map(function(e){return e?_xeUtils.default.toNumber(e):""}).join(","),localStorage.setItem(i,_xeUtils.default.toJSONString(o)))},handleMinimize:function(){var r=this,s=r.reactData,e=r.computeZoomOpts,t=e.minimizeLayout,o=e.minimizeMaxSize,u=e.minimizeHorizontalOffset,c=e.minimizeVerticalOffset,d=e.minimizeOffsetMethod,m="horizontal"===t,f=s.zoomStatus,i=[],n=[],h=(allActiveModals.forEach(function(e){e.xID!==r.xID&&"modal"===e.type&&"minimize"===e.reactData.zoomStatus&&("horizontal"===e.computeZoomOpts.minimizeLayout?i:n).push(e)}),m?i:n);return o&&o<=h.length?(_ui.VxeUI.modal&&_ui.VxeUI.modal.message({status:"error",content:(0,_ui.getI18n)("vxe.modal.miniMaxSize",[o])}),Promise.resolve({status:!1})):(s.prevZoomStatus=f,s.zoomStatus="minimize",r.$nextTick().then(function(){var e,t,o,i,n,a,l=r.getBox();return l&&(e=r.$refs.refHeaderElem)?(a=(0,_dom.getDomNode)().visibleHeight,f||(s.revertLocat={top:l.offsetTop,left:l.offsetLeft,width:l.offsetWidth+(l.style.width?0:1),height:l.offsetHeight+(l.style.height?0:1)}),o=_xeUtils.default[m?"max":"min"](h,function(e){e=e.getBox();return e?_xeUtils.default.toNumber(e.style[m?"left":"top"]):0}),a=a-e.offsetHeight-16,n=16,o&&(o=o.getBox())&&(t=_xeUtils.default.toNumber(o.style.left),o=_xeUtils.default.toNumber(o.style.top),i={},i=m?Object.assign({},u):Object.assign({},c),n=t+_xeUtils.default.toNumber(i.left),a=o+_xeUtils.default.toNumber(i.top),d)&&(i=d({$modal:r,left:n,top:a}),n=_xeUtils.default.toNumber(i.left),a=_xeUtils.default.toNumber(i.top)),Object.assign(l.style,{top:"".concat(a,"px"),left:"".concat(n,"px"),width:"200px",height:"".concat(e.offsetHeight,"px")}),r.savePosStorage(),{status:!0}):{status:!1}}))},handleMaximize:function(){var n=this,a=n,l=n.reactData,r=l.zoomStatus;return l.prevZoomStatus=r,l.zoomStatus="maximize",n.$nextTick().then(function(){var e,t,o,i=n.getBox();i&&(r||(e=_xeUtils.default.toNumber(a.marginSize),t=document.documentElement.clientWidth||document.body.clientWidth,o=document.documentElement.clientHeight||document.body.clientHeight,l.revertLocat={top:Math.max(e,o/2-i.offsetHeight/2),left:Math.max(e,t/2-i.offsetWidth/2),width:i.offsetWidth+(i.style.width?0:1),height:i.offsetHeight+(i.style.height?0:1)}),Object.assign(i.style,{top:"0",left:"0",width:"100%",height:"100%"})),n.savePosStorage()})},handleMsgAutoClose:function(){var e=this,t=e.internalData,o=e.duration;-1!==o&&(t.msgTimeout=setTimeout(function(){return e.closeModal("close")},_xeUtils.default.toNumber(o)))},removeBodyLockScroll:function(){var t=this.xID,e=document.documentElement,o=e.getAttribute(lockScrollAttrKey);o&&((o=o.split(",").filter(function(e){return e!==t})).length?e.setAttribute(lockScrollAttrKey,o.join(",")):(e.removeAttribute(lockScrollAttrKey),e.style.removeProperty(lockScrollCssWidthKey)))},addBodyLockScroll:function(){var e,t=this.xID,o=this.lockScroll,i=this.computeIsMsg;o&&!i&&(o=document.documentElement,i=document.body.clientWidth,(e=(e=o.getAttribute(lockScrollAttrKey))?e.split(","):[]).includes(t)||(e.push(t),o.setAttribute(lockScrollAttrKey,e.join(","))),o.style.setProperty(lockScrollCssWidthKey,"".concat(i,"px")))},openModal:function(){var o=this,i=o,e=o.reactData,t=i.remember,n=i.showFooter,a=e.initialized,l=e.visible,r=o.computeIsMsg,s=o.computeBtnTransfer;return a||(e.initialized=!0,s&&(a=o.$refs.refElem,document.body.appendChild(a))),l||(o.addBodyLockScroll(),e.visible=!0,e.contentVisible=!1,o.updateZindex(),allActiveModals.push(o),setTimeout(function(){e.contentVisible=!0,o.$nextTick(function(){i.fullscreen||o.recalculate(),n&&(e=o.$refs.refConfirmBtn,t=o.$refs.refCancelBtn,e=e||t)&&e.focus();var e,t={type:""};o.emitModel(!0),o.dispatchEvent("show",t,null)})},10),r?(o.addMsgQueue(),o.handleMsgAutoClose()):o.$nextTick(function(){e.firstOpen?(e.firstOpen=!1,o.hasPosStorage()?o.restorePosStorage():i.fullscreen?o.$nextTick(function(){return o.handleMaximize()}):(o.recalculate(),o.updatePosition().then(function(){setTimeout(function(){return o.updatePosition()},20)}))):t||(o.recalculate(),o.updatePosition().then(function(){setTimeout(function(){return o.updatePosition()},20)}))})),o.$nextTick()},selfClickEvent:function(e){var t=this.$refs.refElem;this.maskClosable&&e.target===t&&this.closeModal("mask")},selfMouseoverEvent:function(){var e=this.internalData,t=e.msgTimeout;t&&this.computeIsMsg&&(clearTimeout(t),e.msgTimeout=void 0)},selfMouseoutEvent:function(){this.internalData.msgTimeout||this.computeIsMsg&&this.handleMsgAutoClose()},handleGlobalKeydownEvent:function(e){var t,o=this;_ui.globalEvents.hasKey(e,_ui.GLOBAL_EVENT_KEYS.ESCAPE)&&(t=_xeUtils.default.max(allActiveModals,function(e){return e.reactData.modalZindex}))&&setTimeout(function(){t===o&&t.escClosable&&(o.dispatchEvent("close",{type:"exit"},e),o.closeModal("exit"))},10)},handleRevert:function(){var o=this,i=o.reactData;return i.prevZoomStatus=i.zoomStatus,i.zoomStatus="",o.$nextTick().then(function(){var e,t=i.revertLocat;return t?(e=o.getBox(),i.revertLocat=null,e&&Object.assign(e.style,{top:"".concat(t.top,"px"),left:"".concat(t.left,"px"),width:"".concat(t.width,"px"),height:"".concat(t.height,"px")}),o.savePosStorage(),o.$nextTick().then(function(){return{status:!0}})):{status:!1}})},handleZoom:function(t){var o=this,e=o.reactData,i=e.zoomStatus;return new Promise(function(e){if(t)return"maximize"===t?void e(o.handleMaximize()):"minimize"===t?void e(o.handleMinimize()):void e(o.handleRevert());e(i?o.handleRevert():o.handleMaximize())}).then(function(){return e.zoomStatus||"revert"})},toggleZoomMinEvent:function(t){var o=this,e=o.reactData,i=e.zoomStatus;return o.handleZoom("minimize"===i?e.prevZoomStatus||"revert":"minimize").then(function(e){o.dispatchEvent("zoom",{type:e},t)})},toggleZoomMaxEvent:function(t){var o=this;return o.handleZoom().then(function(e){o.dispatchEvent("zoom",{type:e},t)})},boxMousedownEvent:function(){var t=this.reactData.modalZindex;allActiveModals.some(function(e){return e.reactData.visible&&e.reactData.modalZindex>t})&&this.updateZindex()},mousedownEvent:function(e){var a,l,r,s,u=this,c=u.reactData,t=u.storage,o=c.zoomStatus,d=_xeUtils.default.toNumber(u.marginSize),m=u.getBox();m&&"maximize"!==o&&0===e.button&&!(0,_dom.getEventTargetNode)(e,m,"trigger--btn").flag&&(e.preventDefault(),a=e.clientX-m.offsetLeft,l=e.clientY-m.offsetTop,o=(0,_dom.getDomNode)(),r=o.visibleHeight,s=o.visibleWidth,document.onmousemove=function(e){e.preventDefault();var t=m.offsetWidth,o=m.offsetHeight,t=s-t-d-1,o=r-o-d-1,i=e.clientX-a,n=e.clientY-l;(n=o<n?o:n)<d&&(n=d),m.style.left="".concat(i=(i=t<i?t:i)<d?d:i,"px"),m.style.top="".concat(n,"px"),m.className=m.className.replace(/\s?is--drag/,"")+" is--drag",u.$emit("move",(0,_ui.createEvent)(e,{type:"move"})),c.resizeFlag++},document.onmouseup=function(){document.onmousemove=null,document.onmouseup=null,t&&u.$nextTick(function(){u.savePosStorage()}),c.resizeFlag++,setTimeout(function(){m.className=m.className.replace(/\s?is--drag/,"")},50)})},dragEvent:function(e){var a=this,t=a,o=a.reactData,l=(e.preventDefault(),t.storage),i=(0,_dom.getDomNode)(),r=i.visibleHeight,s=i.visibleWidth,u=_xeUtils.default.toNumber(t.marginSize),c=e.target.getAttribute("type"),d=_xeUtils.default.toNumber(t.minWidth),m=_xeUtils.default.toNumber(t.minHeight),f=s,h=r,g=a.getBox(),p=g.clientWidth,v=g.clientHeight,x=e.clientX,y=e.clientY,_=g.offsetTop,b=g.offsetLeft,S={type:"resize"};document.onmousemove=function(e){var t,o,i,n;switch(e.preventDefault(),c){case"wl":i=(t=x-e.clientX)+p,u<b-t&&d<i&&(g.style.width="".concat(i<f?i:f,"px"),g.style.left="".concat(b-t,"px"));break;case"swst":i=(t=x-e.clientX)+p,n=(o=y-e.clientY)+v,u<b-t&&d<i&&(g.style.width="".concat(i<f?i:f,"px"),g.style.left="".concat(b-t,"px")),u<_-o&&m<n&&(g.style.height="".concat(n<h?n:h,"px"),g.style.top="".concat(_-o,"px"));break;case"swlb":i=(t=x-e.clientX)+p,n=(o=e.clientY-y)+v,u<b-t&&d<i&&(g.style.width="".concat(i<f?i:f,"px"),g.style.left="".concat(b-t,"px")),_+n+u<r&&m<n&&(g.style.height="".concat(n<h?n:h,"px"));break;case"st":o=y-e.clientY,n=v+o,u<_-o&&m<n&&(g.style.height="".concat(n<h?n:h,"px"),g.style.top="".concat(_-o,"px"));break;case"wr":t=e.clientX-x,b+(i=t+p)+u<s&&d<i&&(g.style.width="".concat(i<f?i:f,"px"));break;case"sest":t=e.clientX-x,n=(o=y-e.clientY)+v,b+(i=t+p)+u<s&&d<i&&(g.style.width="".concat(i<f?i:f,"px")),u<_-o&&m<n&&(g.style.height="".concat(n<h?n:h,"px"),g.style.top="".concat(_-o,"px"));break;case"selb":t=e.clientX-x,n=(o=e.clientY-y)+v,b+(i=t+p)+u<s&&d<i&&(g.style.width="".concat(i<f?i:f,"px")),_+n+u<r&&m<n&&(g.style.height="".concat(n<h?n:h,"px"));break;case"sb":o=e.clientY-y,_+(n=o+v)+u<r&&m<n&&(g.style.height="".concat(n<h?n:h,"px"))}g.className=g.className.replace(/\s?is--drag/,"")+" is--drag",l&&a.savePosStorage(),a.dispatchEvent("resize",S,e)},document.onmouseup=function(){o.revertLocat=null,document.onmousemove=null,document.onmouseup=null,setTimeout(function(){g.className=g.className.replace(/\s?is--drag/,"")},50)}},renderTitles:function(e){var t=this,o=t.$scopedSlots,i=t.slots,i=void 0===i?{}:i,n=t.showClose,a=t.showZoom,l=t.showMaximize,r=t.showMinimize,s=t.title,u=t.reactData.zoomStatus,c=o.title||i.title,o=o.corner||i.corner,i=t.computeIsMinimizeStatus;return[e("div",{class:"vxe-modal--header-title"},c?t.callSlot(c,{$modal:t,minimized:i,maximized:t.computeIsMaximizeStatus},e):s?(0,_utils.getFuncText)(s):(0,_ui.getI18n)("vxe.alert.title")),e("div",{class:"vxe-modal--header-right"},[o&&!i?e("div",{class:"vxe-modal--corner-wrapper"},t.callSlot(o,{$modal:t},e)):(0,_ui.renderEmptyElement)(t),(_xeUtils.default.isBoolean(r)?r:a)?e("div",{class:["vxe-modal--zoom-btn","trigger--btn"],attrs:{title:(0,_ui.getI18n)("vxe.modal.zoom".concat("minimize"===u?"Out":"Min"))},on:{click:t.toggleZoomMinEvent}},[e("i",{class:"minimize"===u?(0,_ui.getIcon)().MODAL_ZOOM_REVERT:(0,_ui.getIcon)().MODAL_ZOOM_MIN})]):(0,_ui.renderEmptyElement)(t),(_xeUtils.default.isBoolean(l)?l:a)&&"minimize"!==u?e("div",{class:["vxe-modal--zoom-btn","trigger--btn"],attrs:{title:(0,_ui.getI18n)("vxe.modal.zoom".concat("maximize"===u?"Out":"In"))},on:{click:t.toggleZoomMaxEvent}},[e("i",{class:"maximize"===u?(0,_ui.getIcon)().MODAL_ZOOM_OUT:(0,_ui.getIcon)().MODAL_ZOOM_IN})]):(0,_ui.renderEmptyElement)(t),n?e("div",{class:["vxe-modal--close-btn","trigger--btn"],attrs:{title:(0,_ui.getI18n)("vxe.modal.close")},on:{click:t.closeEvent}},[e("i",{class:(0,_ui.getIcon)().MODAL_CLOSE})]):(0,_ui.renderEmptyElement)(t)])]},renderHeader:function(e){var t=this,o=t,i=t.$scopedSlots,n=o.slots,a=o.showZoom,l=o.showMaximize,i=i.header||(void 0===n?{}:n).header;return o.showHeader?(n={},o.draggable&&(n.mousedown=t.mousedownEvent),(_xeUtils.default.isBoolean(l)?l:a)&&o.dblclickZoom&&"modal"===o.type&&(n.dblclick=t.toggleZoomMaxEvent),e("div",{ref:"refHeaderElem",class:["vxe-modal--header",{"is--ellipsis":o.showTitleOverflow}],on:n},i?t.callSlot(i,{$modal:t},e):t.renderTitles(e))):(0,_ui.renderEmptyElement)(t)},renderBody:function(e){var t=this,o=t,i=t.$scopedSlots,n=o.slots,n=void 0===n?{}:n,a=o.status,l=o.iconStatus,r=o.content||o.message,s=t.computeIsMsg,u=i.default||n.default,c=i.left||n.left,i=i.right||n.right,n=[];return s||!a&&!l||n.push(e("div",{class:"vxe-modal--status-wrapper"},[e("i",{class:["vxe-modal--status-icon",l||(0,_ui.getIcon)()["MODAL_".concat(a).toLocaleUpperCase()]]})])),n.push(e("div",{class:"vxe-modal--content"},u?t.callSlot(u,{$modal:t},e):(0,_utils.getFuncText)(r))),e("div",{class:"vxe-modal--body"},[c?e("div",{class:"vxe-modal--body-left"},t.callSlot(c,{$modal:t},e)):(0,_ui.renderEmptyElement)(t),e("div",{class:"vxe-modal--body-default"},n),i?e("div",{class:"vxe-modal--body-right"},t.callSlot(i,{$modal:t},e)):(0,_ui.renderEmptyElement)(t),s?(0,_ui.renderEmptyElement)(t):e(_index.default,{class:"vxe-modal--loading",props:{value:o.loading}})])},renderDefaultFooter:function(e){var t=this,o=t,i=t.$scopedSlots,n=o.slots,n=void 0===n?{}:n,a=o.showCancelButton,l=o.showConfirmButton,r=o.type,s=o.loading,u=i.leftfoot||n.leftfoot,i=i.rightfoot||n.rightfoot,n=[];return(_xeUtils.default.isBoolean(a)?a:"confirm"===r)&&n.push(e(_button.default,{key:1,ref:"refCancelBtn",props:{content:o.cancelButtonText||(0,_ui.getI18n)("vxe.button.cancel")},on:{click:t.cancelEvent}})),(_xeUtils.default.isBoolean(l)?l:"confirm"===r||"alert"===r)&&n.push(e(_button.default,{key:2,ref:"refConfirmBtn",props:{status:"primary",loading:s,content:o.confirmButtonText||(0,_ui.getI18n)("vxe.button.confirm")},on:{click:t.confirmEvent}})),e("div",{class:"vxe-modal--footer-wrapper"},[e("div",{class:"vxe-modal--footer-left"},u?t.callSlot(u,{$modal:t},e):[]),e("div",{class:"vxe-modal--footer-right"},i?t.callSlot(i,{$modal:t},e):n)])},renderFooter:function(e){var t=this,o=t.$scopedSlots,i=t.slots,o=o.footer||(void 0===i?{}:i).footer;return t.showFooter?e("div",{class:"vxe-modal--footer"},o?t.callSlot(o,{$modal:t},e):[t.renderDefaultFooter(e)]):(0,_ui.renderEmptyElement)(t)},renderVN:function(t){var o=this,e=o.$scopedSlots,i=o.reactData,n=o.slots,a=o.className,l=o.type,r=o.animat,s=o.draggable,u=o.iconStatus,c=o.position,d=o.loading,m=o.destroyOnClose,f=o.status,h=o.lockScroll,g=o.padding,p=o.lockView,v=o.mask,x=o.resize,y=i.initialized,_=i.modalTop,b=i.contentVisible,S=i.visible,M=i.zoomStatus,e=e.aside||(void 0===n?{}:n).aside,n=o.computeSize,z=o.computeIsMsg,w=o.computeIsMinimizeStatus,E={};return z&&(E.mouseover=o.selfMouseoverEvent,E.mouseout=o.selfMouseoutEvent),t("div",{ref:"refElem",class:["vxe-modal--wrapper","type--".concat(l),"zoom--".concat(M||"revert"),a||"",c?"pos--".concat(c):"",(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(l={},"size--".concat(n),n),"status--".concat(f),f),"is--padding",g),"is--animat",r),"lock--scroll",h),"lock--view",p),"is--draggable",s),"is--resize",x),"is--mask",v),"is--visible",b),_defineProperty(_defineProperty(l,"is--active",S),"is--loading",d))],style:{zIndex:i.modalZindex,top:_?"".concat(_,"px"):null},on:Object.assign(Object.assign({},E),{click:o.selfClickEvent})},y?[t("div",{ref:"refModalBox",class:"vxe-modal--box",on:{mousedown:o.boxMousedownEvent}},[!z&&!e||w?(0,_ui.renderEmptyElement)(o):t("div",{class:"vxe-modal--aside"},e?o.callSlot(e,{$modal:o},t):[f||u?t("div",{class:"vxe-modal--status-wrapper"},[t("i",{class:["vxe-modal--status-icon",u||(0,_ui.getIcon)()["MODAL_".concat(f).toLocaleUpperCase()]]})]):(0,_ui.renderEmptyElement)(o)]),t("div",{class:"vxe-modal--container"},!i.initialized||m&&!i.visible?[]:[o.renderHeader(t),o.renderBody(t),o.renderFooter(t),!z&&x?t("span",{class:"vxe-modal--resize"},["wl","wr","swst","sest","st","swlb","selb","sb"].map(function(e){return t("span",{class:"".concat(e,"-resize"),attrs:{type:e},on:{mousedown:o.dragEvent}})})):(0,_ui.renderEmptyElement)(o)])])]:[])}},mounted:function(){var e=this,t=e.$scopedSlots,o=e;"modal"===o.type&&o.showFooter&&!(o.showConfirmButton||o.showCancelButton||t.footer)&&(0,_log.warnLog)("vxe.modal.footPropErr"),e.$nextTick(function(){o.storage&&!o.id&&(0,_log.errLog)("vxe.error.reqProp",["[modal] id"]),o.value&&e.openModal(),e.recalculate()}),o.escClosable&&_ui.globalEvents.on(e,"keydown",e.handleGlobalKeydownEvent)},beforeDestroy:function(){var e=this,t=e.$refs.refElem;t&&t.parentNode&&t.parentNode.removeChild(t),_ui.globalEvents.off(e,"keydown"),e.removeMsgQueue(),e.removeActiveQueue(),e.removeBodyLockScroll()},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=exports.allActiveModals=void 0;var _comp=require("../../ui/src/comp"),_xeUtils=_interopRequireDefault(require("xe-utils")),_ui=require("../../ui"),_dom=require("../../ui/src/dom"),_utils=require("../../ui/src/utils"),_button=_interopRequireDefault(require("../../button/src/button")),_index=_interopRequireDefault(require("../../loading/index")),_vn=require("../../ui/src/vn"),_log=require("../../ui/src/log");function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function _defineProperty(e,t,o){return(t=_toPropertyKey(t))in e?Object.defineProperty(e,t,{value:o,enumerable:!0,configurable:!0,writable:!0}):e[t]=o,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 o=e[Symbol.toPrimitive];if(void 0===o)return("string"===t?String:Number)(e);o=o.call(e,t||"default");if("object"!=_typeof(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}function _slicedToArray(e,t){return _arrayWithHoles(e)||_iterableToArrayLimit(e,t)||_unsupportedIterableToArray(e,t)||_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(e,t){var o;if(e)return"string"==typeof e?_arrayLikeToArray(e,t):"Map"===(o="Object"===(o={}.toString.call(e).slice(8,-1))&&e.constructor?e.constructor.name:o)||"Set"===o?Array.from(e):"Arguments"===o||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(o)?_arrayLikeToArray(e,t):void 0}function _arrayLikeToArray(e,t){(null==t||t>e.length)&&(t=e.length);for(var o=0,i=Array(t);o<t;o++)i[o]=e[o];return i}function _iterableToArrayLimit(e,t){var o=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=o){var i,n,a,l,r=[],s=!0,u=!1;try{if(a=(o=o.call(e)).next,0===t){if(Object(o)!==o)return;s=!1}else for(;!(s=(i=a.call(o)).done)&&(r.push(i.value),r.length!==t);s=!0);}catch(e){u=!0,n=e}finally{try{if(!s&&null!=o.return&&(l=o.return(),Object(l)!==l))return}finally{if(u)throw n}}return r}}function _arrayWithHoles(e){if(Array.isArray(e))return e}var allActiveModals=exports.allActiveModals=[],msgQueue=[],notifyQueue=[],lockScrollAttrKey="data-vxe-lock-scroll",lockScrollCssWidthKey="--vxe-ui-modal-lock-scroll-view-width",_default2=exports.default=(0,_comp.defineVxeComponent)({name:"VxeModal",mixins:[_ui.globalMixins.sizeMixin,_ui.globalMixins.permissionMixin],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(0,_ui.getConfig)().modal.top}},position:[String,Object],title:String,duration:{type:[Number,String],default:function(){return(0,_ui.getConfig)().modal.duration}},content:[Number,String],useHtml:{type:Boolean,default:function(){return(0,_ui.getConfig)().modal.useHtml}},showCancelButton:{type:Boolean,default:null},cancelButtonText:{type:String,default:function(){return(0,_ui.getConfig)().modal.cancelButtonText}},showConfirmButton:{type:Boolean,default:function(){return(0,_ui.getConfig)().modal.showConfirmButton}},confirmButtonText:{type:String,default:function(){return(0,_ui.getConfig)().modal.confirmButtonText}},lockView:{type:Boolean,default:function(){return(0,_ui.getConfig)().modal.lockView}},lockScroll:Boolean,mask:{type:Boolean,default:function(){return(0,_ui.getConfig)().modal.mask}},maskClosable:{type:Boolean,default:function(){return(0,_ui.getConfig)().modal.maskClosable}},escClosable:{type:Boolean,default:function(){return(0,_ui.getConfig)().modal.escClosable}},cancelClosable:{type:Boolean,default:function(){return(0,_ui.getConfig)().modal.cancelClosable}},confirmClosable:{type:Boolean,default:function(){return(0,_ui.getConfig)().modal.confirmClosable}},resize:Boolean,showHeader:{type:Boolean,default:function(){return(0,_ui.getConfig)().modal.showHeader}},showFooter:{type:Boolean,default:function(){return(0,_ui.getConfig)().modal.showFooter}},showZoom:Boolean,zoomConfig:Object,showMaximize:{type:Boolean,default:function(){return(0,_utils.handleBooleanDefaultValue)((0,_ui.getConfig)().modal.showMaximize)}},showMinimize:{type:Boolean,default:function(){return(0,_utils.handleBooleanDefaultValue)((0,_ui.getConfig)().modal.showMinimize)}},showClose:{type:Boolean,default:function(){return(0,_ui.getConfig)().modal.showClose}},dblclickZoom:{type:Boolean,default:function(){return(0,_ui.getConfig)().modal.dblclickZoom}},width:{type:[Number,String],default:function(){return(0,_ui.getConfig)().modal.width}},height:{type:[Number,String],default:function(){return(0,_ui.getConfig)().modal.height}},minWidth:{type:[Number,String],default:function(){return(0,_ui.getConfig)().modal.minWidth}},minHeight:{type:[Number,String],default:function(){return(0,_ui.getConfig)().modal.minHeight}},zIndex:Number,marginSize:{type:[Number,String],default:function(){return(0,_ui.getConfig)().modal.marginSize}},fullscreen:Boolean,draggable:{type:Boolean,default:function(){return(0,_ui.getConfig)().modal.draggable}},remember:{type:Boolean,default:function(){return(0,_ui.getConfig)().modal.remember}},destroyOnClose:{type:Boolean,default:function(){return(0,_ui.getConfig)().modal.destroyOnClose}},showTitleOverflow:{type:Boolean,default:function(){return(0,_ui.getConfig)().modal.showTitleOverflow}},transfer:{type:Boolean,default:function(){return(0,_ui.getConfig)().modal.transfer}},storage:{type:Boolean,default:function(){return(0,_ui.getConfig)().modal.storage}},storageKey:{type:String,default:function(){return(0,_ui.getConfig)().modal.storageKey}},padding:{type:Boolean,default:function(){return(0,_ui.getConfig)().modal.padding}},size:{type:String,default:function(){return(0,_ui.getConfig)().modal.size||(0,_ui.getConfig)().size}},beforeHideMethod:Function,slots:Object,message:[Number,String],animat:{type:Boolean,default:function(){return(0,_ui.getConfig)().modal.animat}}},inject:{$xeParentModal:{from:"$xeModal",default:null},$xeDrawer:{default:null},$xeTable:{default:null},$xeForm:{default:null}},provide:function(){return{$xeModal:this}},data:function(){return{xID:_xeUtils.default.uniqueId(),reactData:{initialized:!1,visible:!1,contentVisible:!1,modalTop:0,modalZindex:0,prevZoomStatus:"",zoomStatus:"",revertLocat:null,prevLocat:null,firstOpen:!0,resizeFlag:1},internalData:{msgTimeout:void 0}}},computed:Object.assign(Object.assign({},{}),{computeBtnTransfer:function(){var e=this,t=e.$xeTable,o=e.$xeParentModal,i=e.$xeDrawer,n=e.$xeForm,e=e.transfer;if(null===e){var a=(0,_ui.getConfig)().select.transfer;if(_xeUtils.default.isBoolean(a))return a;if(t||o||i||n)return!0}return e},computeIsMsg:function(){return"message"===this.type||"notification"===this.type},computeIsMinimizeStatus:function(){return"minimize"===this.reactData.zoomStatus},computeIsMaximizeStatus:function(){return"maximize"===this.reactData.zoomStatus},computeZoomOpts:function(){return Object.assign({},(0,_ui.getConfig)().modal.zoomConfig,this.zoomConfig)}}),watch:{width:function(){this.recalculate()},height:function(){this.recalculate()},value:function(e){e?this.openModal():this.closeModal("model")}},methods:{dispatchEvent:function(e,t,o){this.$emit(e,(0,_ui.createEvent)(o,{$modal:this},t))},emitModel:function(e){var t=this._events;this.$emit("input",e),t&&t.modelValue?this.$emit("modelValue",e):this.$emit("model-value",e)},callSlot:function(e,t,o){var i=this.$scopedSlots;return e&&(_xeUtils.default.isString(e)&&(e=i[e]||null),_xeUtils.default.isFunction(e))?(0,_vn.getSlotVNs)(e.call(this,t,o)):[]},open:function(){return this.openModal()},close:function(){return this.closeModal("close")},getBox:function(){return this.$refs.refModalBox},getPosition:function(){if(!this.computeIsMsg){var e=this.getBox();if(e)return{top:e.offsetTop,left:e.offsetLeft}}return null},setPosition:function(e,t){var o;return this.computeIsMsg||(o=this.getBox())&&(_xeUtils.default.isNumber(e)&&(o.style.top="".concat(e,"px")),_xeUtils.default.isNumber(t))&&(o.style.left="".concat(t,"px")),this.$nextTick()},isMinimized:function(){return"minimize"===this.reactData.zoomStatus},isMaximized:function(){return"maximize"===this.reactData.zoomStatus},zoom:function(){return this.handleZoom()},minimize:function(){return this.reactData.visible?this.handleMinimize():Promise.resolve({status:!1})},maximize:function(){return this.reactData.visible?this.handleMaximize():Promise.resolve({status:!1})},revert:function(){return this.reactData.visible?this.handleRevert():Promise.resolve({status:!1})},recalculate:function(){var e=this.width,t=this.height,o=this.minWidth,i=this.minHeight,n=this.computeIsMsg,a=this.getBox();return a&&(a.style.width=e?(0,_dom.toCssUnit)(e):"",a.style.height=t?(0,_dom.toCssUnit)(t):"",a.style.minWidth=!n&&o?(0,_dom.toCssUnit)(o):"",a.style.minHeight=!n&&i?(0,_dom.toCssUnit)(i):""),this.$nextTick()},updateZindex:function(){var e=this.reactData,t=this.zIndex,o=e.modalZindex;t?e.modalZindex=t:this.computeIsMsg?o<(0,_utils.getSubLastZIndex)()&&(e.modalZindex=(0,_utils.nextSubZIndex)()):o<(0,_utils.getLastZIndex)()&&(e.modalZindex=(0,_utils.nextZIndex)())},updatePosition:function(){var c=this,d=c;return c.$nextTick().then(function(){var e,t,o,i,n,a,l,r=d.position,s=_xeUtils.default.toNumber(d.marginSize),u=c.getBox();u&&(e=document.documentElement.clientWidth||document.body.clientWidth,t=document.documentElement.clientHeight||document.body.clientHeight,o="center"===r,i=(r=_xeUtils.default.isString(r)?{top:r,left:r}:Object.assign({},r)).top,n=o||"center"===i,a=l="",a=(r=r.left)&&!(o||"center"===r)?isNaN(r)?r:"".concat(r,"px"):"".concat(Math.max(s,e/2-u.offsetWidth/2),"px"),l=i&&!n?isNaN(i)?i:"".concat(i,"px"):"".concat(Math.max(s,t/2-u.offsetHeight/2),"px"),u.style.top=l,u.style.left=a)})},updateStyle:function(){var t=this;this.$nextTick(function(){var e=t.type,o=0;("notification"===e?notifyQueue:msgQueue).forEach(function(e){var t=e.getBox();t&&(o+=_xeUtils.default.toNumber(e.top),e.reactData.modalTop=o,o+=t.clientHeight)})})},removeActiveQueue:function(){var t=this;-1<allActiveModals.indexOf(t)&&_xeUtils.default.remove(allActiveModals,function(e){return e===t})},removeMsgQueue:function(){var t=this,e="notification"===t.type?notifyQueue:msgQueue;-1<e.indexOf(t)&&_xeUtils.default.remove(e,function(e){return e===t}),t.updateStyle()},closeModal:function(e){var t=this,o=t.reactData,i=t.remember,n=o.visible,a=t.computeIsMsg,l=t.beforeHideMethod||(0,_ui.getConfig)().modal.beforeHideMethod,r={type:e};return n&&Promise.resolve(l?l(r):null).then(function(e){_xeUtils.default.isError(e)||(a&&t.removeMsgQueue(),o.contentVisible=!1,i||t.handleRevert(),t.removeActiveQueue(),t.dispatchEvent("before-hide",r,null),setTimeout(function(){o.visible=!1,t.emitModel(!1),t.dispatchEvent("hide",r,null)},200),t.removeBodyLockScroll())}).catch(function(e){return e}),t.$nextTick()},closeEvent:function(e){var t="close";this.dispatchEvent(t,{type:t},e),this.closeModal(t)},confirmEvent:function(e){var t=this.confirmClosable,o="confirm";this.dispatchEvent(o,{type:o},e),t&&this.closeModal(o)},cancelEvent:function(e){var t=this.cancelClosable,o="cancel";this.dispatchEvent(o,{type:o},e),t&&this.closeModal(o)},getStorageMap:function(e){var t=(0,_ui.getConfig)().version,e=_xeUtils.default.toStringJSON(localStorage.getItem(e)||"");return e&&e._v===t?e:{_v:t}},hasPosStorage:function(){var e=this.id,t=this.storage,o=this.storageKey;return!!(e&&t&&this.getStorageMap(o)[e])},restorePosStorage:function(){var e,t,o,i,n,a,l=this.reactData,r=this.id,s=this.storage,u=this.storageKey;r&&s&&(s=this.getStorageMap(u)[r])&&(u=this.getBox(),s=(r=_slicedToArray(s.split(","),8))[0],e=r[1],t=r[2],o=r[3],i=r[4],n=r[5],a=r[6],r=r[7],u&&(s&&(u.style.left="".concat(s,"px")),e&&(u.style.top="".concat(e,"px")),t&&(u.style.width="".concat(t,"px")),o)&&(u.style.height="".concat(o,"px")),i)&&n&&(l.revertLocat={left:i,top:n,width:a,height:r})},addMsgQueue:function(){var e="notification"===this.type?notifyQueue:msgQueue;-1===e.indexOf(this)&&e.push(this),this.updateStyle()},savePosStorage:function(){var e=this.reactData,t=this.id,o=this.storage,i=this.storageKey,n=e.zoomStatus,e=e.revertLocat;n||t&&o&&(n=this.getBox())&&((o=this.getStorageMap(i))[t]=[n.style.left,n.style.top,n.clientWidth,n.clientHeight].concat(e?[e.left,e.top,e.width,e.height]:[]).map(function(e){return e?_xeUtils.default.toNumber(e):""}).join(","),localStorage.setItem(i,_xeUtils.default.toJSONString(o)))},handleMinimize:function(){var r=this,s=r.reactData,e=r.computeZoomOpts,t=e.minimizeLayout,o=e.minimizeMaxSize,u=e.minimizeHorizontalOffset,c=e.minimizeVerticalOffset,d=e.minimizeOffsetMethod,m="horizontal"===t,f=s.zoomStatus,i=[],n=[],h=(allActiveModals.forEach(function(e){e.xID!==r.xID&&"modal"===e.type&&"minimize"===e.reactData.zoomStatus&&("horizontal"===e.computeZoomOpts.minimizeLayout?i:n).push(e)}),m?i:n);return o&&o<=h.length?(_ui.VxeUI.modal&&_ui.VxeUI.modal.message({status:"error",content:(0,_ui.getI18n)("vxe.modal.miniMaxSize",[o])}),Promise.resolve({status:!1})):(s.prevZoomStatus=f,s.zoomStatus="minimize",r.$nextTick().then(function(){var e,t,o,i,n,a,l=r.getBox();return l&&(e=r.$refs.refHeaderElem)?(a=(0,_dom.getDomNode)().visibleHeight,f||(s.revertLocat={top:l.offsetTop,left:l.offsetLeft,width:l.offsetWidth+(l.style.width?0:1),height:l.offsetHeight+(l.style.height?0:1)}),o=_xeUtils.default[m?"max":"min"](h,function(e){e=e.getBox();return e?_xeUtils.default.toNumber(e.style[m?"left":"top"]):0}),a=a-e.offsetHeight-16,n=16,o&&(o=o.getBox())&&(t=_xeUtils.default.toNumber(o.style.left),o=_xeUtils.default.toNumber(o.style.top),i={},i=m?Object.assign({},u):Object.assign({},c),n=t+_xeUtils.default.toNumber(i.left),a=o+_xeUtils.default.toNumber(i.top),d)&&(i=d({$modal:r,left:n,top:a}),n=_xeUtils.default.toNumber(i.left),a=_xeUtils.default.toNumber(i.top)),Object.assign(l.style,{top:"".concat(a,"px"),left:"".concat(n,"px"),width:"200px",height:"".concat(e.offsetHeight,"px")}),r.savePosStorage(),{status:!0}):{status:!1}}))},handleMaximize:function(){var n=this,a=n,l=n.reactData,r=l.zoomStatus;return l.prevZoomStatus=r,l.zoomStatus="maximize",n.$nextTick().then(function(){var e,t,o,i=n.getBox();i&&(r||(e=_xeUtils.default.toNumber(a.marginSize),t=document.documentElement.clientWidth||document.body.clientWidth,o=document.documentElement.clientHeight||document.body.clientHeight,l.revertLocat={top:Math.max(e,o/2-i.offsetHeight/2),left:Math.max(e,t/2-i.offsetWidth/2),width:i.offsetWidth+(i.style.width?0:1),height:i.offsetHeight+(i.style.height?0:1)}),Object.assign(i.style,{top:"0",left:"0",width:"100%",height:"100%"})),n.savePosStorage()})},handleMsgAutoClose:function(){var e=this,t=e.internalData,o=e.duration;-1!==o&&(t.msgTimeout=setTimeout(function(){return e.closeModal("close")},_xeUtils.default.toNumber(o)))},removeBodyLockScroll:function(){var t=this.xID,e=document.documentElement,o=e.getAttribute(lockScrollAttrKey);o&&((o=o.split(",").filter(function(e){return e!==t})).length?e.setAttribute(lockScrollAttrKey,o.join(",")):(e.removeAttribute(lockScrollAttrKey),e.style.removeProperty(lockScrollCssWidthKey)))},addBodyLockScroll:function(){var e,t=this.xID,o=this.lockScroll,i=this.computeIsMsg;o&&!i&&(o=document.documentElement,i=document.body.clientWidth,(e=(e=o.getAttribute(lockScrollAttrKey))?e.split(","):[]).includes(t)||(e.push(t),o.setAttribute(lockScrollAttrKey,e.join(","))),o.style.setProperty(lockScrollCssWidthKey,"".concat(i,"px")))},openModal:function(){var o=this,i=o,e=o.reactData,t=i.remember,n=i.showFooter,a=e.initialized,l=e.visible,r=o.computeIsMsg,s=o.computeBtnTransfer;return a||(e.initialized=!0,s&&(a=o.$refs.refElem,document.body.appendChild(a))),l||(o.addBodyLockScroll(),e.visible=!0,e.contentVisible=!1,o.updateZindex(),allActiveModals.push(o),setTimeout(function(){e.contentVisible=!0,o.$nextTick(function(){i.fullscreen||o.recalculate(),n&&(e=o.$refs.refConfirmBtn,t=o.$refs.refCancelBtn,e=e||t)&&e.focus();var e,t={type:""};o.emitModel(!0),o.dispatchEvent("show",t,null)})},10),r?(o.addMsgQueue(),o.handleMsgAutoClose()):o.$nextTick(function(){e.firstOpen?(e.firstOpen=!1,o.hasPosStorage()?o.restorePosStorage():i.fullscreen?o.$nextTick(function(){return o.handleMaximize()}):(o.recalculate(),o.updatePosition().then(function(){setTimeout(function(){return o.updatePosition()},20)}))):t||(o.recalculate(),o.updatePosition().then(function(){setTimeout(function(){return o.updatePosition()},20)}))})),o.$nextTick()},selfClickEvent:function(e){var t=this.$refs.refElem;this.maskClosable&&e.target===t&&this.closeModal("mask")},selfMouseoverEvent:function(){var e=this.internalData,t=e.msgTimeout;t&&this.computeIsMsg&&(clearTimeout(t),e.msgTimeout=void 0)},selfMouseoutEvent:function(){this.internalData.msgTimeout||this.computeIsMsg&&this.handleMsgAutoClose()},handleGlobalKeydownEvent:function(e){var t,o=this;_ui.globalEvents.hasKey(e,_ui.GLOBAL_EVENT_KEYS.ESCAPE)&&(t=_xeUtils.default.max(allActiveModals,function(e){return e.reactData.modalZindex}))&&setTimeout(function(){t===o&&t.escClosable&&(o.dispatchEvent("close",{type:"exit"},e),o.closeModal("exit"))},10)},handleRevert:function(){var o=this,i=o.reactData;return i.prevZoomStatus=i.zoomStatus,i.zoomStatus="",o.$nextTick().then(function(){var e,t=i.revertLocat;return t?(e=o.getBox(),i.revertLocat=null,e&&Object.assign(e.style,{top:"".concat(t.top,"px"),left:"".concat(t.left,"px"),width:"".concat(t.width,"px"),height:"".concat(t.height,"px")}),o.savePosStorage(),o.$nextTick().then(function(){return{status:!0}})):{status:!1}})},handleZoom:function(t){var o=this,e=o.reactData,i=e.zoomStatus;return new Promise(function(e){if(t)return"maximize"===t?void e(o.handleMaximize()):"minimize"===t?void e(o.handleMinimize()):void e(o.handleRevert());e(i?o.handleRevert():o.handleMaximize())}).then(function(){return e.zoomStatus||"revert"})},toggleZoomMinEvent:function(t){var o=this,e=o.reactData,i=e.zoomStatus;return o.handleZoom("minimize"===i?e.prevZoomStatus||"revert":"minimize").then(function(e){o.dispatchEvent("zoom",{type:e},t)})},toggleZoomMaxEvent:function(t){var o=this;return o.handleZoom().then(function(e){o.dispatchEvent("zoom",{type:e},t)})},boxMousedownEvent:function(){var t=this.reactData.modalZindex;allActiveModals.some(function(e){return e.reactData.visible&&e.reactData.modalZindex>t})&&this.updateZindex()},mousedownEvent:function(e){var a,l,r,s,u=this,c=u.reactData,t=u.storage,o=c.zoomStatus,d=_xeUtils.default.toNumber(u.marginSize),m=u.getBox();m&&"maximize"!==o&&0===e.button&&!(0,_dom.getEventTargetNode)(e,m,"trigger--btn").flag&&(e.preventDefault(),a=e.clientX-m.offsetLeft,l=e.clientY-m.offsetTop,o=(0,_dom.getDomNode)(),r=o.visibleHeight,s=o.visibleWidth,document.onmousemove=function(e){e.preventDefault();var t=m.offsetWidth,o=m.offsetHeight,t=s-t-d-1,o=r-o-d-1,i=e.clientX-a,n=e.clientY-l;(n=o<n?o:n)<d&&(n=d),m.style.left="".concat(i=(i=t<i?t:i)<d?d:i,"px"),m.style.top="".concat(n,"px"),m.className=m.className.replace(/\s?is--drag/,"")+" is--drag",u.$emit("move",(0,_ui.createEvent)(e,{type:"move"})),c.resizeFlag++},document.onmouseup=function(){document.onmousemove=null,document.onmouseup=null,t&&u.$nextTick(function(){u.savePosStorage()}),c.resizeFlag++,setTimeout(function(){m.className=m.className.replace(/\s?is--drag/,"")},50)})},dragEvent:function(e){var a=this,t=a,o=a.reactData,l=(e.preventDefault(),t.storage),i=(0,_dom.getDomNode)(),r=i.visibleHeight,s=i.visibleWidth,u=_xeUtils.default.toNumber(t.marginSize),c=e.target.getAttribute("type"),d=_xeUtils.default.toNumber(t.minWidth),m=_xeUtils.default.toNumber(t.minHeight),f=s,h=r,g=a.getBox(),p=g.clientWidth,v=g.clientHeight,x=e.clientX,y=e.clientY,_=g.offsetTop,b=g.offsetLeft,S={type:"resize"};document.onmousemove=function(e){var t,o,i,n;switch(e.preventDefault(),c){case"wl":i=(t=x-e.clientX)+p,u<b-t&&d<i&&(g.style.width="".concat(i<f?i:f,"px"),g.style.left="".concat(b-t,"px"));break;case"swst":i=(t=x-e.clientX)+p,n=(o=y-e.clientY)+v,u<b-t&&d<i&&(g.style.width="".concat(i<f?i:f,"px"),g.style.left="".concat(b-t,"px")),u<_-o&&m<n&&(g.style.height="".concat(n<h?n:h,"px"),g.style.top="".concat(_-o,"px"));break;case"swlb":i=(t=x-e.clientX)+p,n=(o=e.clientY-y)+v,u<b-t&&d<i&&(g.style.width="".concat(i<f?i:f,"px"),g.style.left="".concat(b-t,"px")),_+n+u<r&&m<n&&(g.style.height="".concat(n<h?n:h,"px"));break;case"st":o=y-e.clientY,n=v+o,u<_-o&&m<n&&(g.style.height="".concat(n<h?n:h,"px"),g.style.top="".concat(_-o,"px"));break;case"wr":t=e.clientX-x,b+(i=t+p)+u<s&&d<i&&(g.style.width="".concat(i<f?i:f,"px"));break;case"sest":t=e.clientX-x,n=(o=y-e.clientY)+v,b+(i=t+p)+u<s&&d<i&&(g.style.width="".concat(i<f?i:f,"px")),u<_-o&&m<n&&(g.style.height="".concat(n<h?n:h,"px"),g.style.top="".concat(_-o,"px"));break;case"selb":t=e.clientX-x,n=(o=e.clientY-y)+v,b+(i=t+p)+u<s&&d<i&&(g.style.width="".concat(i<f?i:f,"px")),_+n+u<r&&m<n&&(g.style.height="".concat(n<h?n:h,"px"));break;case"sb":o=e.clientY-y,_+(n=o+v)+u<r&&m<n&&(g.style.height="".concat(n<h?n:h,"px"))}g.className=g.className.replace(/\s?is--drag/,"")+" is--drag",l&&a.savePosStorage(),a.dispatchEvent("resize",S,e)},document.onmouseup=function(){o.revertLocat=null,document.onmousemove=null,document.onmouseup=null,setTimeout(function(){g.className=g.className.replace(/\s?is--drag/,"")},50)}},renderTitles:function(e){var t=this,o=t.$scopedSlots,i=t.slots,i=void 0===i?{}:i,n=t.showClose,a=t.showZoom,l=t.showMaximize,r=t.showMinimize,s=t.title,u=t.reactData.zoomStatus,c=o.title||i.title,o=o.corner||i.corner,i=t.computeIsMinimizeStatus;return[e("div",{class:"vxe-modal--header-title"},c?t.callSlot(c,{$modal:t,minimized:i,maximized:t.computeIsMaximizeStatus},e):s?(0,_utils.getFuncText)(s):(0,_ui.getI18n)("vxe.alert.title")),e("div",{class:"vxe-modal--header-right"},[o&&!i?e("div",{class:"vxe-modal--corner-wrapper"},t.callSlot(o,{$modal:t},e)):(0,_ui.renderEmptyElement)(t),(_xeUtils.default.isBoolean(r)?r:a)?e("div",{class:["vxe-modal--zoom-btn","trigger--btn"],attrs:{title:(0,_ui.getI18n)("vxe.modal.zoom".concat("minimize"===u?"Out":"Min"))},on:{click:t.toggleZoomMinEvent}},[e("i",{class:"minimize"===u?(0,_ui.getIcon)().MODAL_ZOOM_REVERT:(0,_ui.getIcon)().MODAL_ZOOM_MIN})]):(0,_ui.renderEmptyElement)(t),(_xeUtils.default.isBoolean(l)?l:a)&&"minimize"!==u?e("div",{class:["vxe-modal--zoom-btn","trigger--btn"],attrs:{title:(0,_ui.getI18n)("vxe.modal.zoom".concat("maximize"===u?"Out":"In"))},on:{click:t.toggleZoomMaxEvent}},[e("i",{class:"maximize"===u?(0,_ui.getIcon)().MODAL_ZOOM_OUT:(0,_ui.getIcon)().MODAL_ZOOM_IN})]):(0,_ui.renderEmptyElement)(t),n?e("div",{class:["vxe-modal--close-btn","trigger--btn"],attrs:{title:(0,_ui.getI18n)("vxe.modal.close")},on:{click:t.closeEvent}},[e("i",{class:(0,_ui.getIcon)().MODAL_CLOSE})]):(0,_ui.renderEmptyElement)(t)])]},renderHeader:function(e){var t=this,o=t,i=t.$scopedSlots,n=o.slots,a=o.showZoom,l=o.showMaximize,i=i.header||(void 0===n?{}:n).header;return o.showHeader?(n={},o.draggable&&(n.mousedown=t.mousedownEvent),(_xeUtils.default.isBoolean(l)?l:a)&&o.dblclickZoom&&"modal"===o.type&&(n.dblclick=t.toggleZoomMaxEvent),e("div",{ref:"refHeaderElem",class:["vxe-modal--header",{"is--ellipsis":o.showTitleOverflow}],on:n},i?t.callSlot(i,{$modal:t},e):t.renderTitles(e))):(0,_ui.renderEmptyElement)(t)},renderBody:function(e){var t=this,o=t,i=t.$scopedSlots,n=o.slots,n=void 0===n?{}:n,a=o.status,l=o.iconStatus,r=o.useHtml,s=o.content||o.message,u=t.computeIsMsg,c=i.default||n.default,d=i.left||n.left,i=i.right||n.right,n=[];return u||!a&&!l||n.push(e("div",{class:"vxe-modal--status-wrapper"},[e("i",{class:["vxe-modal--status-icon",l||(0,_ui.getIcon)()["MODAL_".concat(a).toLocaleUpperCase()]]})])),n.push(r&&!c?e("div",{key:"hc",class:"vxe-modal--content",domProps:{innerHTML:(0,_utils.getFuncText)(s)}}):e("div",{key:"dc",class:"vxe-modal--content"},c?t.callSlot(c,{$modal:t},e):(0,_utils.getFuncText)(s))),e("div",{class:"vxe-modal--body"},[d?e("div",{class:"vxe-modal--body-left"},t.callSlot(d,{$modal:t},e)):(0,_ui.renderEmptyElement)(t),e("div",{class:"vxe-modal--body-default"},n),i?e("div",{class:"vxe-modal--body-right"},t.callSlot(i,{$modal:t},e)):(0,_ui.renderEmptyElement)(t),u?(0,_ui.renderEmptyElement)(t):e(_index.default,{class:"vxe-modal--loading",props:{value:o.loading}})])},renderDefaultFooter:function(e){var t=this,o=t,i=t.$scopedSlots,n=o.slots,n=void 0===n?{}:n,a=o.showCancelButton,l=o.showConfirmButton,r=o.type,s=o.loading,u=i.leftfoot||n.leftfoot,i=i.rightfoot||n.rightfoot,n=[];return(_xeUtils.default.isBoolean(a)?a:"confirm"===r)&&n.push(e(_button.default,{key:1,ref:"refCancelBtn",props:{content:o.cancelButtonText||(0,_ui.getI18n)("vxe.button.cancel")},on:{click:t.cancelEvent}})),(_xeUtils.default.isBoolean(l)?l:"confirm"===r||"alert"===r)&&n.push(e(_button.default,{key:2,ref:"refConfirmBtn",props:{status:"primary",loading:s,content:o.confirmButtonText||(0,_ui.getI18n)("vxe.button.confirm")},on:{click:t.confirmEvent}})),e("div",{class:"vxe-modal--footer-wrapper"},[e("div",{class:"vxe-modal--footer-left"},u?t.callSlot(u,{$modal:t},e):[]),e("div",{class:"vxe-modal--footer-right"},i?t.callSlot(i,{$modal:t},e):n)])},renderFooter:function(e){var t=this,o=t.$scopedSlots,i=t.slots,o=o.footer||(void 0===i?{}:i).footer;return t.showFooter?e("div",{class:"vxe-modal--footer"},o?t.callSlot(o,{$modal:t},e):[t.renderDefaultFooter(e)]):(0,_ui.renderEmptyElement)(t)},renderVN:function(t){var o=this,e=o.$scopedSlots,i=o.reactData,n=o.slots,a=o.className,l=o.type,r=o.animat,s=o.draggable,u=o.iconStatus,c=o.position,d=o.loading,m=o.destroyOnClose,f=o.status,h=o.lockScroll,g=o.padding,p=o.lockView,v=o.mask,x=o.resize,y=i.initialized,_=i.modalTop,b=i.contentVisible,S=i.visible,M=i.zoomStatus,e=e.aside||(void 0===n?{}:n).aside,n=o.computeSize,z=o.computeIsMsg,w=o.computeIsMinimizeStatus,E={};return z&&(E.mouseover=o.selfMouseoverEvent,E.mouseout=o.selfMouseoutEvent),t("div",{ref:"refElem",class:["vxe-modal--wrapper","type--".concat(l),"zoom--".concat(M||"revert"),a||"",c?"pos--".concat(c):"",(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(l={},"size--".concat(n),n),"status--".concat(f),f),"is--padding",g),"is--animat",r),"lock--scroll",h),"lock--view",p),"is--draggable",s),"is--resize",x),"is--mask",v),"is--visible",b),_defineProperty(_defineProperty(l,"is--active",S),"is--loading",d))],style:{zIndex:i.modalZindex,top:_?"".concat(_,"px"):null},on:Object.assign(Object.assign({},E),{click:o.selfClickEvent})},y?[t("div",{ref:"refModalBox",class:"vxe-modal--box",on:{mousedown:o.boxMousedownEvent}},[!z&&!e||w?(0,_ui.renderEmptyElement)(o):t("div",{class:"vxe-modal--aside"},e?o.callSlot(e,{$modal:o},t):[f||u?t("div",{class:"vxe-modal--status-wrapper"},[t("i",{class:["vxe-modal--status-icon",u||(0,_ui.getIcon)()["MODAL_".concat(f).toLocaleUpperCase()]]})]):(0,_ui.renderEmptyElement)(o)]),t("div",{class:"vxe-modal--container"},!i.initialized||m&&!i.visible?[]:[o.renderHeader(t),o.renderBody(t),o.renderFooter(t),!z&&x?t("span",{class:"vxe-modal--resize"},["wl","wr","swst","sest","st","swlb","selb","sb"].map(function(e){return t("span",{class:"".concat(e,"-resize"),attrs:{type:e},on:{mousedown:o.dragEvent}})})):(0,_ui.renderEmptyElement)(o)])])]:[])}},mounted:function(){var e=this,t=e.$scopedSlots,o=e;"modal"===o.type&&o.showFooter&&!(o.showConfirmButton||o.showCancelButton||t.footer)&&(0,_log.warnLog)("vxe.modal.footPropErr"),e.$nextTick(function(){o.storage&&!o.id&&(0,_log.errLog)("vxe.error.reqProp",["[modal] id"]),o.value&&e.openModal(),e.recalculate()}),o.escClosable&&_ui.globalEvents.on(e,"keydown",e.handleGlobalKeydownEvent)},beforeDestroy:function(){var e=this,t=e.$refs.refElem;t&&t.parentNode&&t.parentNode.removeChild(t),_ui.globalEvents.off(e,"keydown"),e.removeMsgQueue(),e.removeActiveQueue(),e.removeBodyLockScroll()},render:function(e){return this.renderVN(e)}});
|
|
@@ -49,7 +49,19 @@ var _default2 = exports.default = /* define-vxe-component start */(0, _comp.defi
|
|
|
49
49
|
type: [String, Number],
|
|
50
50
|
default: null
|
|
51
51
|
},
|
|
52
|
-
|
|
52
|
+
useHtml: {
|
|
53
|
+
type: Boolean,
|
|
54
|
+
default: function _default() {
|
|
55
|
+
return _xeUtils.default.isBoolean((0, _ui.getConfig)().tooltip.useHtml) ? (0, _ui.getConfig)().tooltip.useHtml : null;
|
|
56
|
+
}
|
|
57
|
+
},
|
|
58
|
+
// 已废弃,请使用 useHtml
|
|
59
|
+
useHTML: {
|
|
60
|
+
type: Boolean,
|
|
61
|
+
default: function _default() {
|
|
62
|
+
return (0, _ui.getConfig)().tooltip.useHTML;
|
|
63
|
+
}
|
|
64
|
+
},
|
|
53
65
|
zIndex: [String, Number],
|
|
54
66
|
popupClassName: [String, Function],
|
|
55
67
|
width: {
|
|
@@ -528,25 +540,26 @@ var _default2 = exports.default = /* define-vxe-component start */(0, _comp.defi
|
|
|
528
540
|
var props = $xeTooltip;
|
|
529
541
|
var slots = $xeTooltip.$scopedSlots;
|
|
530
542
|
var reactData = $xeTooltip.reactData;
|
|
531
|
-
var
|
|
543
|
+
var useHtml = props.useHtml,
|
|
544
|
+
useHTML = props.useHTML;
|
|
532
545
|
var tipContent = reactData.tipContent;
|
|
533
546
|
var wrapperStyle = $xeTooltip.computeWrapperStyle;
|
|
534
547
|
var contentSlot = slots.content;
|
|
535
548
|
var contVNs = [];
|
|
536
549
|
if (contentSlot) {
|
|
537
550
|
contVNs.push(h('div', {
|
|
538
|
-
key:
|
|
551
|
+
key: 'ct'
|
|
539
552
|
}, (0, _vn.getSlotVNs)(contentSlot({}))));
|
|
540
|
-
} else if (useHTML) {
|
|
553
|
+
} else if (_xeUtils.default.isBoolean(useHtml) ? useHtml : useHTML) {
|
|
541
554
|
contVNs.push(h('div', {
|
|
542
|
-
key:
|
|
543
|
-
|
|
555
|
+
key: 'ch',
|
|
556
|
+
domProps: {
|
|
544
557
|
innerHTML: tipContent
|
|
545
558
|
}
|
|
546
559
|
}));
|
|
547
560
|
} else {
|
|
548
561
|
contVNs.push(h('span', {
|
|
549
|
-
key:
|
|
562
|
+
key: 'cd'
|
|
550
563
|
}, "".concat(tipContent)));
|
|
551
564
|
}
|
|
552
565
|
return h('div', {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var _comp=require("../../ui/src/comp"),_xeUtils=_interopRequireDefault(require("xe-utils")),_ui=require("../../ui"),_utils=require("../../ui/src/utils"),_dom=require("../../ui/src/dom"),_vn=require("../../ui/src/vn");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 _toConsumableArray(t){return _arrayWithoutHoles(t)||_iterableToArray(t)||_unsupportedIterableToArray(t)||_nonIterableSpread()}function _nonIterableSpread(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _unsupportedIterableToArray(t,e){var i;if(t)return"string"==typeof t?_arrayLikeToArray(t,e):"Map"===(i="Object"===(i={}.toString.call(t).slice(8,-1))&&t.constructor?t.constructor.name:i)||"Set"===i?Array.from(t):"Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)?_arrayLikeToArray(t,e):void 0}function _iterableToArray(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}function _arrayWithoutHoles(t){if(Array.isArray(t))return _arrayLikeToArray(t)}function _arrayLikeToArray(t,e){(null==e||e>t.length)&&(e=t.length);for(var i=0,n=Array(e);i<e;i++)n[i]=t[i];return n}function _defineProperty(t,e,i){return(e=_toPropertyKey(e))in t?Object.defineProperty(t,e,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[e]=i,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 i=t[Symbol.toPrimitive];if(void 0===i)return("string"===e?String:Number)(t);i=i.call(t,e||"default");if("object"!=_typeof(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}var _default2=exports.default=(0,_comp.defineVxeComponent)({name:"VxeTooltip",mixins:[_ui.globalMixins.sizeMixin],props:{value:Boolean,size:{type:String,default:function(){return(0,_ui.getConfig)().tooltip.size||(0,_ui.getConfig)().size}},selector:String,trigger:{type:String,default:function(){return(0,_ui.getConfig)().tooltip.trigger||"hover"}},theme:{type:String,default:function(){return(0,_ui.getConfig)().tooltip.theme||"dark"}},content:{type:[String,Number],default:null},useHTML:Boolean,zIndex:[String,Number],popupClassName:[String,Function],width:{type:[String,Number],default:function(){return(0,_ui.getConfig)().tooltip.Width}},height:{type:[String,Number],default:function(){return(0,_ui.getConfig)().tooltip.height}},minWidth:{type:[String,Number],default:function(){return(0,_ui.getConfig)().tooltip.minWidth}},minHeight:{type:[String,Number],default:function(){return(0,_ui.getConfig)().tooltip.minHeight}},maxWidth:{type:[String,Number],default:function(){return(0,_ui.getConfig)().tooltip.maxWidth}},maxHeight:{type:[String,Number],default:function(){return(0,_ui.getConfig)().tooltip.maxHeight}},placement:{type:String,default:function(){return(0,_ui.getConfig)().tooltip.placement}},defaultPlacement:{type:String,default:function(){return(0,_ui.getConfig)().tooltip.defaultPlacement}},isArrow:{type:Boolean,default:function(){return(0,_ui.getConfig)().tooltip.isArrow}},enterable:{type:Boolean,default:function(){return(0,_ui.getConfig)().tooltip.enterable}},enterDelay:{type:Number,default:function(){return(0,_ui.getConfig)().tooltip.enterDelay}},leaveDelay:{type:Number,default:function(){return(0,_ui.getConfig)().tooltip.leaveDelay}}},data:function(){return{xID:_xeUtils.default.uniqueId(),reactData:{target:null,isUpdate:!1,visible:!1,tipPos:null,tipContent:"",tipActive:!1,tipTarget:null,tipZindex:0,tipStore:{style:{},placement:"",arrowStyle:{}}},internalData:{}}},computed:Object.assign(Object.assign({},{}),{computeWrapperStyle:function(){var t=this,e=t.width,i=t.height,n=t.minHeight,r=t.minWidth,o=t.maxHeight,t=t.maxWidth,a={};return e&&(a.width=(0,_dom.toCssUnit)(e)),i&&(a.height=(0,_dom.toCssUnit)(i)),r&&(a.minWidth=(0,_dom.toCssUnit)(r)),n&&(a.minHeight=(0,_dom.toCssUnit)(n)),t&&(a.maxWidth=(0,_dom.toCssUnit)(t)),o&&(a.maxHeight=(0,_dom.toCssUnit)(o)),a}}),methods:{dispatchEvent:function(t,e,i){this.$emit(t,(0,_ui.createEvent)(i,{$tooltip:this},e))},emitModel:function(t){var e=this._events;this.$emit("input",t),e&&e.modelValue?this.$emit("modelValue",t):this.$emit("model-value",t)},getSelectorEl:function(){var t=this.selector;if(t){if(_xeUtils.default.isElement(t))return t;if(_xeUtils.default.isString(t))return document.querySelector(t)}return null},openByEvent:function(t,e,i){var n=this.reactData;return this.handleVisible(e||n.target||this.getSelectorEl(),i,t)},open:function(t,e){var i=this.reactData;return this.handleVisible(t||i.target||this.getSelectorEl(),e)},close:function(){var t=this.reactData;return t.tipPos=null,t.tipTarget=null,t.tipActive=!1,Object.assign(t.tipStore,{style:{},placement:"",arrowStyle:null}),this.updateValue(!1),this.$nextTick()},toVisible:function(t,e){return this.handleVisible(t,e)},updatePlacement:function(){var e=this,i=e.reactData,t=i.visible,n=e.$refs.refElem;return t&&i.tipTarget&&n&&e.updateTipStyle(),e.$nextTick().then(function(){var t=i.tipTarget;if(n=e.$refs.refElem,t&&n)return e.updateTipStyle(),e.$nextTick().then(function(){e.updateTipStyle()})})},isActived:function(){return this.reactData.tipActive},setActived:function(t){this.reactData.tipActive=!!t},updateTipStyle:function(){var t,e,i,n,r,o,a=this.reactData,l=this.isArrow,u=this.placement,s=this.defaultPlacement,c=a.tipTarget,p=a.tipStore,a=a.tipPos,f="",d="",h="bottom",m="",y=this.$refs.refElem;y&&c&&(o=document.documentElement,t=document.body,e=c.offsetWidth,i=c.offsetHeight,n=y.offsetHeight,y=y.offsetWidth,c=c.getBoundingClientRect(),r=o.clientHeight||t.clientHeight,o=o.clientWidth||t.clientWidth,d=c.left,f=c.top+i,a&&(a.oLeft||a.oTop)?l?d=d+Math.max(8,Math.min(e-8,a.oLeft))-y/2:(d=a.x+1,f=a.y+1):d=c.left+(e-y)/2,"top"===u?(h="top",f=c.top-n):u||("top"===s?(h="top",(f=c.top-n)<6&&(h="bottom",f=c.top+i),r<f+n+6&&(h="top",f=c.top-n)):(r<f+n+6&&(h="top",f=c.top-n),f<6&&(h="bottom",f=c.top+i))),o<d+y+6&&(d-=d+y+6-o),(d=d<6?6:d)===c.left?e<=y&&(m=e/2):d<c.left&&(m=d+y>c.left+e?c.left-d+e/2:c.left-d+(y-(c.left-d))/2),p.placement=h,p.style.top="".concat(f,"px"),p.style.left="".concat(d,"px"),p.arrowStyle.left="".concat(m,"px"))},updateValue:function(t){var e=this.reactData;t!==e.visible&&(e.visible=t,e.isUpdate=!0,this.emitModel(t))},updateZindex:function(){var t=this.reactData;t.tipZindex<(0,_utils.getLastZIndex)()&&(t.tipZindex=(0,_utils.nextZIndex)())},clickEvent:function(){var t=this,e=t,i=t.reactData;i.visible?t.close():t.handleVisible(i.target||t.getSelectorEl(),e.content)},targetMouseenterEvent:function(){var t=this.reactData;this.handleVisible(t.target||this.getSelectorEl(),this.content)},targetMouseleaveEvent:function(){var t=this,e=t.reactData,i=t.trigger,n=t.enterable,r=t.leaveDelay;e.tipActive=!1,n&&"hover"===i?setTimeout(function(){e.tipActive||t.close()},r):t.close()},wrapperMouseenterEvent:function(){this.reactData.tipActive=!0},wrapperMouseleaveEvent:function(){var t=this,e=t.reactData,i=t.trigger,n=t.enterable,r=t.leaveDelay;e.tipActive=!1,n&&"hover"===i&&setTimeout(function(){e.tipActive||t.close()},r)},showTip:function(){var t=this,e=t,i=t.reactData,n=i.tipStore,r=t.$refs.refElem;return r&&!r.parentNode&&document.body.appendChild(r),t.updateValue(!0),t.updateZindex(),n.placement="top",n.style={width:"auto",left:0,top:0,zIndex:e.zIndex||i.tipZindex},n.arrowStyle={left:"50%"},t.updatePlacement()},handleDelayFn:function(){var t=this,e=t.reactData;t.internalData.showDelayTip=_xeUtils.default.debounce(function(){e.tipActive&&t.showTip()},t.enterDelay,{leading:!1,trailing:!0})},handleVisible:function(t,e,i){var n=this,r=n,o=n.$scopedSlots,a=n.reactData,l=n.internalData,o=o.content;if((o||""!==e&&!_xeUtils.default.eqNull(e))&&t){o=l.showDelayTip,l=r.trigger,r=r.enterDelay;if(a.tipPos=i?{x:i.clientX,y:i.clientY,oLeft:i.offsetX,oTop:i.offsetY}:null,a.tipActive=!0,a.tipTarget=t,a.tipContent=e,a.visible)return n.updatePlacement();if(!r||"hover"!==l)return n.showTip();o&&o()}return n.$nextTick()},wheelEvent:function(t){t.stopPropagation()},renderContent:function(t){var e=this.$scopedSlots,i=this.reactData,n=this.useHTML,i=i.tipContent,r=this.computeWrapperStyle,e=e.content,o=[];return o.push(e?t("div",{key:1},(0,_vn.getSlotVNs)(e({}))):n?t("div",{key:2,props:{innerHTML:i}}):t("span",{key:3},"".concat(i))),t("div",{key:3,ref:"contentWrapperfElem",class:"vxe-tooltip--content",style:r},o)},renderVN:function(t){var e,i=this,n=i.$scopedSlots,r=i.reactData,o=i.popupClassName,a=i.isArrow,l=i.enterable,u=r.tipActive,s=r.visible,r=r.tipStore,n=n.default,c=i.computeSize;return l&&(e={mouseenter:i.wrapperMouseenterEvent,mouseleave:i.wrapperMouseleaveEvent}),t("div",{ref:"refElem",class:["vxe-tooltip--wrapper","theme--".concat(i.theme),o?_xeUtils.default.isFunction(o)?o({$tooltip:i}):o:"",_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty({},"size--".concat(c),c),"placement--".concat(r.placement),r.placement),"is--enterable",l),"is--visible",s),"is--arrow",a),"is--active",u)],style:r.style,on:e},[t("div",{key:"tby",class:"vxe-tooltip--body"},[i.renderContent(t),t("div",{class:"vxe-tooltip--arrow",style:r.arrowStyle})])].concat(_toConsumableArray(n?(0,_vn.getSlotVNs)(n({})):[])))}},watch:{content:function(t){this.reactData.tipContent=t},value:function(t){var e=this,i=e,n=e.reactData;n.isUpdate||(t?e.handleVisible(n.target||e.getSelectorEl(),i.content):e.close()),n.isUpdate=!1},enterDelay:function(){this.handleDelayFn()}},created:function(){this.handleDelayFn()},mounted:function(){var o=this,a=o,l=o.reactData,t=o.$refs.contentWrapperfElem;t&&t.addEventListener("wheel",o.wheelEvent,{passive:!1}),o.$nextTick(function(){var i,t,e=a.trigger,n=a.content,r=o.$refs.refElem;r&&(i=r.parentNode)&&(l.tipContent=n,l.tipZindex=(0,_utils.nextZIndex)(),_xeUtils.default.arrayEach(r.children,function(t,e){e&&(i.insertBefore(t,r),l.target||(l.target=t))}),i.removeChild(r),(t=l.target)&&("hover"===e?(t.onmouseenter=o.targetMouseenterEvent,t.onmouseleave=o.targetMouseleaveEvent):"click"===e&&(t.onclick=o.clickEvent)),a.value)&&o.handleVisible(t||o.getSelectorEl(),n)})},beforeDestroy:function(){var t=this.reactData.target,e=this.$refs.refElem,t=(t&&(t.onmouseenter=null,t.onmouseleave=null,t.onclick=null),this.$refs.contentWrapperfElem);t&&t.removeEventListener("wheel",this.wheelEvent),e&&(t=e.parentNode)&&t.removeChild(e)},render:function(t){return this.renderVN(t)}});
|
|
1
|
+
Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var _comp=require("../../ui/src/comp"),_xeUtils=_interopRequireDefault(require("xe-utils")),_ui=require("../../ui"),_utils=require("../../ui/src/utils"),_dom=require("../../ui/src/dom"),_vn=require("../../ui/src/vn");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 _toConsumableArray(t){return _arrayWithoutHoles(t)||_iterableToArray(t)||_unsupportedIterableToArray(t)||_nonIterableSpread()}function _nonIterableSpread(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _unsupportedIterableToArray(t,e){var i;if(t)return"string"==typeof t?_arrayLikeToArray(t,e):"Map"===(i="Object"===(i={}.toString.call(t).slice(8,-1))&&t.constructor?t.constructor.name:i)||"Set"===i?Array.from(t):"Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)?_arrayLikeToArray(t,e):void 0}function _iterableToArray(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}function _arrayWithoutHoles(t){if(Array.isArray(t))return _arrayLikeToArray(t)}function _arrayLikeToArray(t,e){(null==e||e>t.length)&&(e=t.length);for(var i=0,n=Array(e);i<e;i++)n[i]=t[i];return n}function _defineProperty(t,e,i){return(e=_toPropertyKey(e))in t?Object.defineProperty(t,e,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[e]=i,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 i=t[Symbol.toPrimitive];if(void 0===i)return("string"===e?String:Number)(t);i=i.call(t,e||"default");if("object"!=_typeof(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}var _default2=exports.default=(0,_comp.defineVxeComponent)({name:"VxeTooltip",mixins:[_ui.globalMixins.sizeMixin],props:{value:Boolean,size:{type:String,default:function(){return(0,_ui.getConfig)().tooltip.size||(0,_ui.getConfig)().size}},selector:String,trigger:{type:String,default:function(){return(0,_ui.getConfig)().tooltip.trigger||"hover"}},theme:{type:String,default:function(){return(0,_ui.getConfig)().tooltip.theme||"dark"}},content:{type:[String,Number],default:null},useHtml:{type:Boolean,default:function(){return _xeUtils.default.isBoolean((0,_ui.getConfig)().tooltip.useHtml)?(0,_ui.getConfig)().tooltip.useHtml:null}},useHTML:{type:Boolean,default:function(){return(0,_ui.getConfig)().tooltip.useHTML}},zIndex:[String,Number],popupClassName:[String,Function],width:{type:[String,Number],default:function(){return(0,_ui.getConfig)().tooltip.Width}},height:{type:[String,Number],default:function(){return(0,_ui.getConfig)().tooltip.height}},minWidth:{type:[String,Number],default:function(){return(0,_ui.getConfig)().tooltip.minWidth}},minHeight:{type:[String,Number],default:function(){return(0,_ui.getConfig)().tooltip.minHeight}},maxWidth:{type:[String,Number],default:function(){return(0,_ui.getConfig)().tooltip.maxWidth}},maxHeight:{type:[String,Number],default:function(){return(0,_ui.getConfig)().tooltip.maxHeight}},placement:{type:String,default:function(){return(0,_ui.getConfig)().tooltip.placement}},defaultPlacement:{type:String,default:function(){return(0,_ui.getConfig)().tooltip.defaultPlacement}},isArrow:{type:Boolean,default:function(){return(0,_ui.getConfig)().tooltip.isArrow}},enterable:{type:Boolean,default:function(){return(0,_ui.getConfig)().tooltip.enterable}},enterDelay:{type:Number,default:function(){return(0,_ui.getConfig)().tooltip.enterDelay}},leaveDelay:{type:Number,default:function(){return(0,_ui.getConfig)().tooltip.leaveDelay}}},data:function(){return{xID:_xeUtils.default.uniqueId(),reactData:{target:null,isUpdate:!1,visible:!1,tipPos:null,tipContent:"",tipActive:!1,tipTarget:null,tipZindex:0,tipStore:{style:{},placement:"",arrowStyle:{}}},internalData:{}}},computed:Object.assign(Object.assign({},{}),{computeWrapperStyle:function(){var t=this,e=t.width,i=t.height,n=t.minHeight,r=t.minWidth,o=t.maxHeight,t=t.maxWidth,a={};return e&&(a.width=(0,_dom.toCssUnit)(e)),i&&(a.height=(0,_dom.toCssUnit)(i)),r&&(a.minWidth=(0,_dom.toCssUnit)(r)),n&&(a.minHeight=(0,_dom.toCssUnit)(n)),t&&(a.maxWidth=(0,_dom.toCssUnit)(t)),o&&(a.maxHeight=(0,_dom.toCssUnit)(o)),a}}),methods:{dispatchEvent:function(t,e,i){this.$emit(t,(0,_ui.createEvent)(i,{$tooltip:this},e))},emitModel:function(t){var e=this._events;this.$emit("input",t),e&&e.modelValue?this.$emit("modelValue",t):this.$emit("model-value",t)},getSelectorEl:function(){var t=this.selector;if(t){if(_xeUtils.default.isElement(t))return t;if(_xeUtils.default.isString(t))return document.querySelector(t)}return null},openByEvent:function(t,e,i){var n=this.reactData;return this.handleVisible(e||n.target||this.getSelectorEl(),i,t)},open:function(t,e){var i=this.reactData;return this.handleVisible(t||i.target||this.getSelectorEl(),e)},close:function(){var t=this.reactData;return t.tipPos=null,t.tipTarget=null,t.tipActive=!1,Object.assign(t.tipStore,{style:{},placement:"",arrowStyle:null}),this.updateValue(!1),this.$nextTick()},toVisible:function(t,e){return this.handleVisible(t,e)},updatePlacement:function(){var e=this,i=e.reactData,t=i.visible,n=e.$refs.refElem;return t&&i.tipTarget&&n&&e.updateTipStyle(),e.$nextTick().then(function(){var t=i.tipTarget;if(n=e.$refs.refElem,t&&n)return e.updateTipStyle(),e.$nextTick().then(function(){e.updateTipStyle()})})},isActived:function(){return this.reactData.tipActive},setActived:function(t){this.reactData.tipActive=!!t},updateTipStyle:function(){var t,e,i,n,r,o,a=this.reactData,l=this.isArrow,u=this.placement,s=this.defaultPlacement,c=a.tipTarget,p=a.tipStore,a=a.tipPos,f="",d="",h="bottom",m="",g=this.$refs.refElem;g&&c&&(o=document.documentElement,t=document.body,e=c.offsetWidth,i=c.offsetHeight,n=g.offsetHeight,g=g.offsetWidth,c=c.getBoundingClientRect(),r=o.clientHeight||t.clientHeight,o=o.clientWidth||t.clientWidth,d=c.left,f=c.top+i,a&&(a.oLeft||a.oTop)?l?d=d+Math.max(8,Math.min(e-8,a.oLeft))-g/2:(d=a.x+1,f=a.y+1):d=c.left+(e-g)/2,"top"===u?(h="top",f=c.top-n):u||("top"===s?(h="top",(f=c.top-n)<6&&(h="bottom",f=c.top+i),r<f+n+6&&(h="top",f=c.top-n)):(r<f+n+6&&(h="top",f=c.top-n),f<6&&(h="bottom",f=c.top+i))),o<d+g+6&&(d-=d+g+6-o),(d=d<6?6:d)===c.left?e<=g&&(m=e/2):d<c.left&&(m=d+g>c.left+e?c.left-d+e/2:c.left-d+(g-(c.left-d))/2),p.placement=h,p.style.top="".concat(f,"px"),p.style.left="".concat(d,"px"),p.arrowStyle.left="".concat(m,"px"))},updateValue:function(t){var e=this.reactData;t!==e.visible&&(e.visible=t,e.isUpdate=!0,this.emitModel(t))},updateZindex:function(){var t=this.reactData;t.tipZindex<(0,_utils.getLastZIndex)()&&(t.tipZindex=(0,_utils.nextZIndex)())},clickEvent:function(){var t=this,e=t,i=t.reactData;i.visible?t.close():t.handleVisible(i.target||t.getSelectorEl(),e.content)},targetMouseenterEvent:function(){var t=this.reactData;this.handleVisible(t.target||this.getSelectorEl(),this.content)},targetMouseleaveEvent:function(){var t=this,e=t.reactData,i=t.trigger,n=t.enterable,r=t.leaveDelay;e.tipActive=!1,n&&"hover"===i?setTimeout(function(){e.tipActive||t.close()},r):t.close()},wrapperMouseenterEvent:function(){this.reactData.tipActive=!0},wrapperMouseleaveEvent:function(){var t=this,e=t.reactData,i=t.trigger,n=t.enterable,r=t.leaveDelay;e.tipActive=!1,n&&"hover"===i&&setTimeout(function(){e.tipActive||t.close()},r)},showTip:function(){var t=this,e=t,i=t.reactData,n=i.tipStore,r=t.$refs.refElem;return r&&!r.parentNode&&document.body.appendChild(r),t.updateValue(!0),t.updateZindex(),n.placement="top",n.style={width:"auto",left:0,top:0,zIndex:e.zIndex||i.tipZindex},n.arrowStyle={left:"50%"},t.updatePlacement()},handleDelayFn:function(){var t=this,e=t.reactData;t.internalData.showDelayTip=_xeUtils.default.debounce(function(){e.tipActive&&t.showTip()},t.enterDelay,{leading:!1,trailing:!0})},handleVisible:function(t,e,i){var n=this,r=n,o=n.$scopedSlots,a=n.reactData,l=n.internalData,o=o.content;if((o||""!==e&&!_xeUtils.default.eqNull(e))&&t){o=l.showDelayTip,l=r.trigger,r=r.enterDelay;if(a.tipPos=i?{x:i.clientX,y:i.clientY,oLeft:i.offsetX,oTop:i.offsetY}:null,a.tipActive=!0,a.tipTarget=t,a.tipContent=e,a.visible)return n.updatePlacement();if(!r||"hover"!==l)return n.showTip();o&&o()}return n.$nextTick()},wheelEvent:function(t){t.stopPropagation()},renderContent:function(t){var e=this.$scopedSlots,i=this.reactData,n=this.useHtml,r=this.useHTML,i=i.tipContent,o=this.computeWrapperStyle,e=e.content,a=[];return e?a.push(t("div",{key:"ct"},(0,_vn.getSlotVNs)(e({})))):(_xeUtils.default.isBoolean(n)?n:r)?a.push(t("div",{key:"ch",domProps:{innerHTML:i}})):a.push(t("span",{key:"cd"},"".concat(i))),t("div",{key:3,ref:"contentWrapperfElem",class:"vxe-tooltip--content",style:o},a)},renderVN:function(t){var e,i=this,n=i.$scopedSlots,r=i.reactData,o=i.popupClassName,a=i.isArrow,l=i.enterable,u=r.tipActive,s=r.visible,r=r.tipStore,n=n.default,c=i.computeSize;return l&&(e={mouseenter:i.wrapperMouseenterEvent,mouseleave:i.wrapperMouseleaveEvent}),t("div",{ref:"refElem",class:["vxe-tooltip--wrapper","theme--".concat(i.theme),o?_xeUtils.default.isFunction(o)?o({$tooltip:i}):o:"",_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty({},"size--".concat(c),c),"placement--".concat(r.placement),r.placement),"is--enterable",l),"is--visible",s),"is--arrow",a),"is--active",u)],style:r.style,on:e},[t("div",{key:"tby",class:"vxe-tooltip--body"},[i.renderContent(t),t("div",{class:"vxe-tooltip--arrow",style:r.arrowStyle})])].concat(_toConsumableArray(n?(0,_vn.getSlotVNs)(n({})):[])))}},watch:{content:function(t){this.reactData.tipContent=t},value:function(t){var e=this,i=e,n=e.reactData;n.isUpdate||(t?e.handleVisible(n.target||e.getSelectorEl(),i.content):e.close()),n.isUpdate=!1},enterDelay:function(){this.handleDelayFn()}},created:function(){this.handleDelayFn()},mounted:function(){var o=this,a=o,l=o.reactData,t=o.$refs.contentWrapperfElem;t&&t.addEventListener("wheel",o.wheelEvent,{passive:!1}),o.$nextTick(function(){var i,t,e=a.trigger,n=a.content,r=o.$refs.refElem;r&&(i=r.parentNode)&&(l.tipContent=n,l.tipZindex=(0,_utils.nextZIndex)(),_xeUtils.default.arrayEach(r.children,function(t,e){e&&(i.insertBefore(t,r),l.target||(l.target=t))}),i.removeChild(r),(t=l.target)&&("hover"===e?(t.onmouseenter=o.targetMouseenterEvent,t.onmouseleave=o.targetMouseleaveEvent):"click"===e&&(t.onclick=o.clickEvent)),a.value)&&o.handleVisible(t||o.getSelectorEl(),n)})},beforeDestroy:function(){var t=this.reactData.target,e=this.$refs.refElem,t=(t&&(t.onmouseenter=null,t.onmouseleave=null,t.onclick=null),this.$refs.contentWrapperfElem);t&&t.removeEventListener("wheel",this.wheelEvent),e&&(t=e.parentNode)&&t.removeChild(e)},render:function(t){return this.renderVN(t)}});
|
package/lib/ui/index.js
CHANGED
|
@@ -26,7 +26,7 @@ Object.keys(_core).forEach(function (key) {
|
|
|
26
26
|
});
|
|
27
27
|
var _dynamics = require("../dynamics");
|
|
28
28
|
var _log = require("./src/log");
|
|
29
|
-
var version = exports.version = "3.14.
|
|
29
|
+
var version = exports.version = "3.14.11";
|
|
30
30
|
_core.VxeUI.uiVersion = version;
|
|
31
31
|
_core.VxeUI.dynamicApp = _dynamics.dynamicApp;
|
|
32
32
|
function config(options) {
|
|
@@ -153,6 +153,7 @@ _core.VxeUI.setup = setup;
|
|
|
153
153
|
},
|
|
154
154
|
drawer: {
|
|
155
155
|
// size: null,
|
|
156
|
+
// useHtml: false,
|
|
156
157
|
position: 'right',
|
|
157
158
|
showHeader: true,
|
|
158
159
|
lockView: true,
|
|
@@ -252,6 +253,7 @@ _core.VxeUI.setup = setup;
|
|
|
252
253
|
// size: null,
|
|
253
254
|
top: 16,
|
|
254
255
|
showHeader: true,
|
|
256
|
+
// useHtml: false,
|
|
255
257
|
// width: null,
|
|
256
258
|
// height: null,
|
|
257
259
|
minWidth: 340,
|
package/lib/ui/index.min.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
Object.defineProperty(exports,"__esModule",{value:!0});var _exportNames={version:!0,config:!0,setup:!0},_core=(exports.config=config,exports.default=void 0,exports.setup=setup,exports.version=void 0,require("@vxe-ui/core")),_dynamics=(Object.keys(_core).forEach(function(e){"default"===e||"__esModule"===e||Object.prototype.hasOwnProperty.call(_exportNames,e)||e in exports&&exports[e]===_core[e]||Object.defineProperty(exports,e,{enumerable:!0,get:function(){return _core[e]}})}),require("../dynamics")),_log=require("./src/log"),version=exports.version="3.14.9";function config(e){return(0,_log.warnLog)("vxe.error.delFunc",["config","setConfig"]),(0,_core.setConfig)(e)}function setup(e){return(0,_log.warnLog)("vxe.error.delFunc",["setup","setConfig"]),(0,_core.setConfig)(e)}_core.VxeUI.uiVersion=version,_core.VxeUI.dynamicApp=_dynamics.dynamicApp,_core.VxeUI.config=config,_core.VxeUI.setup=setup,(0,_core.setConfig)({alert:{},anchor:{},anchorLink:{},avatar:{},backtop:{showIcon:!0,showContent:!0,showTop:!0,showBottom:!0,shadow:!0,threshold:20},badge:{},breadcrumb:{separator:"/"},breadcrumbItem:{},button:{trigger:"hover",prefixTooltip:{enterable:!0},suffixTooltip:{enterable:!0},showDropdownIcon:!0},buttonGroup:{},calendar:{minDate:new Date(1900,0,1),maxDate:new Date(2100,0,1),startDay:1,selectDay:1},card:{border:!0,padding:!0},carousel:{height:200,loop:!0,interval:5e3},carouselItem:{},cascader:{autoClose:!0},checkbox:{},checkboxButton:{},checkboxGroup:{},col:{},collapse:{padding:!0,expandConfig:{showIcon:!0}},collapsePane:{},contextMenu:{autoLocate:!0},countdown:{},colorPicker:{type:"rgb",clearable:!0,showAlpha:!0,clickToCopy:!0,showColorExtractor:!0,showQuick:!0},datePanel:{startDate:new Date(1900,0,1),endDate:new Date(2100,0,1),startDay:1,selectDay:1},datePicker:{shortcutConfig:{align:"left",mode:"text",autoClose:!0},startDay:1,selectDay:1,autoClose:!0,showClearButton:null,showConfirmButton:null},dateRangePicker:{shortcutConfig:{align:"left",mode:"text",autoClose:!0},startDay:1,selectDay:1,separator:" ~ ",autoClose:!0,showClearButton:!0,showConfirmButton:null},drawer:{position:"right",showHeader:!0,lockView:!0,mask:!0,showTitleOverflow:!0,showClose:!0,padding:!0,cancelClosable:!0,confirmClosable:!0},empty:{},form:{validConfig:{showErrorMessage:!0,autoPos:!0,theme:"beautify"},tooltipConfig:{enterable:!0},titleAsterisk:!0,titleOverflow:!1,padding:!0},formDesign:{height:400,showHeader:!0,showPc:!0},formGather:{},formGroup:{},formItem:{},formView:{},icon:{},iconPicker:{icons:["home","company","comment","setting","send","envelope","envelope-open","bell","search","print","pc","goods","chart-line","edit","delete","save","folder","microphone","flag","link","location","sunny","rmb","usd","user","add-user","add-users","star","unlock","time","text","feedback","calendar","association-form","cloud-download","cloud-upload","file","subtable","chart-bar-x","chart-bar-y","chart-line","chart-pie","chart-radar"]},image:{draggable:null,showPreview:!0,showPrintButton:!0},imageGroup:{showPreview:!0,showPrintButton:!0},imagePreview:{showPrintButton:!0,maskClosable:!0},input:{startDate:new Date(1900,0,1),endDate:new Date(2100,0,1),startDay:1,selectDay:1,digits:2,controls:!0},layoutAside:{},layoutBody:{backtopConfig:{}},layoutContainer:{},layoutFooter:{},layoutHeader:{},link:{underline:!0},listDesign:{height:400,showPc:!0},listView:{},list:{virtualYConfig:{enabled:!0,gt:60}},loading:{showIcon:!0,showText:!0},menu:{},modal:{top:16,showHeader:!0,minWidth:340,minHeight:140,lockView:!0,mask:!0,duration:3e3,marginSize:0,dblclickZoom:!0,showTitleOverflow:!0,animat:!0,showClose:!0,padding:!0,draggable:!0,showConfirmButton:null,cancelClosable:!0,confirmClosable:!0,zoomConfig:{minimizeMaxSize:10,minimizeVerticalOffset:{top:-24,left:0},minimizeHorizontalOffset:{top:0,left:32}},storageKey:"VXE_MODAL_POSITION"},noticeBar:{},numberInput:{digits:2,autoFill:!0,controlConfig:{enabled:!0,layout:"right",showButton:!0,isWheel:!0,isArrow:!0}},optgroup:{},option:{},pager:{pageSizePlacement:"top"},print:{pageStyle:{}},passwordInput:{controls:!0},printPageBreak:{},pulldown:{},radio:{strict:!0},radioButton:{strict:!0},radioGroup:{strict:!0},rate:{},result:{},row:{},segmented:{},select:{multiCharOverflow:8,remoteConfig:{enabled:!0,autoLoad:!0},virtualYConfig:{enabled:!0,gt:50,oSize:2}},splitter:{resize:!0,itemConfig:{minWidth:40,minHeight:40},resizeConfig:{showTip:!0}},splitterPanel:{},slider:{max:100,min:0},steps:{},switch:{},tabPane:{},tableSelect:{gridConfig:{showOverflow:!0,showHeaderOverflow:!0,showFooterOverflow:!0,rowConfig:{isHover:!0},virtualXConfig:{enabled:!0,gt:0},virtualYConfig:{enabled:!0,gt:0}}},tabs:{},tag:{},textEllipsis:{underline:!0},text:{copyConfig:{showMessage:!0}},textarea:{resize:"none"},timeline:{},timelineItem:{},tip:{},tooltip:{trigger:"hover",theme:"dark",enterDelay:500,leaveDelay:300,isArrow:!0},tree:{indent:20,minHeight:60,radioConfig:{strict:!0},dragConfig:{showIcon:!0,animation:!0,showGuidesStatus:!0,showDragTip:!0},virtualYConfig:{enabled:!0,gt:50,oSize:2}},treeSelect:{autoClose:!0,virtualYConfig:{enabled:!0,gt:0,oSize:2},treeConfig:{maxHeight:300,radioConfig:{},checkboxConfig:{},filterConfig:{autoExpandAll:!0}}},upload:{mode:"all",imageTypes:["jpg","jpeg","png","gif"],showList:!0,showUploadButton:!0,showButtonText:!0,showRemoveButton:!0,showButtonIcon:!0,showPreview:!0,dragToUpload:!0,showLimitSize:!0,showLimitCount:!0,autoSubmit:!0,maxSimultaneousUploads:5,previewImageConfig:{}},watermark:{rotate:-30,gap:[100,100]},table:{},colgroup:{},column:{},toolbar:{},grid:{},gantt:{}});var iconPrefix="vxe-icon-",_default=((0,_core.setIcon)({LOADING:iconPrefix+"spinner roll vxe-loading--default-icon",BUTTON_DROPDOWN:iconPrefix+"arrow-down",BUTTON_LOADING:iconPrefix+"spinner roll",BUTTON_TOOLTIP_ICON:iconPrefix+"question-circle-fill",MENU_ITEM_EXPAND_OPEN:iconPrefix+"arrow-down rotate180",MENU_ITEM_EXPAND_CLOSE:iconPrefix+"arrow-down",SELECT_LOADED:iconPrefix+"spinner roll",SELECT_OPEN:iconPrefix+"caret-down rotate180",SELECT_CLOSE:iconPrefix+"caret-down",SELECT_ADD_OPTION:iconPrefix+"add",ICON_PICKER_OPEN:iconPrefix+"caret-down rotate180",ICON_PICKER_CLOSE:iconPrefix+"caret-down",PAGER_HOME:iconPrefix+"home-page",PAGER_END:iconPrefix+"end-page",PAGER_JUMP_PREV:iconPrefix+"arrow-double-left",PAGER_JUMP_NEXT:iconPrefix+"arrow-double-right",PAGER_PREV_PAGE:iconPrefix+"arrow-left",PAGER_NEXT_PAGE:iconPrefix+"arrow-right",PAGER_JUMP_MORE:iconPrefix+"ellipsis-h",RADIO_CHECKED:iconPrefix+"radio-checked-fill",RADIO_UNCHECKED:iconPrefix+"radio-unchecked",RADIO_DISABLED_UNCHECKED:iconPrefix+"radio-unchecked-fill",CHECKBOX_INDETERMINATE:iconPrefix+"checkbox-indeterminate-fill",CHECKBOX_CHECKED:iconPrefix+"checkbox-checked-fill",CHECKBOX_UNCHECKED:iconPrefix+"checkbox-unchecked",CHECKBOX_DISABLED_UNCHECKED:iconPrefix+"checkbox-unchecked-fill",INPUT_CLEAR:iconPrefix+"error-circle-fill",INPUT_SEARCH:iconPrefix+"search",INPUT_PLUS_NUM:iconPrefix+"caret-up",INPUT_MINUS_NUM:iconPrefix+"caret-down",NUMBER_INPUT_MINUS_NUM:iconPrefix+"minus",NUMBER_INPUT_PLUS_NUM:iconPrefix+"add",DATE_PICKER_DATE:iconPrefix+"calendar",PASSWORD_INPUT_SHOW_PWD:iconPrefix+"eye-fill-close",PASSWORD_INPUT_HIDE_PWD:iconPrefix+"eye-fill",MODAL_ZOOM_MIN:iconPrefix+"minus",MODAL_ZOOM_REVERT:iconPrefix+"recover",MODAL_ZOOM_IN:iconPrefix+"square",MODAL_ZOOM_OUT:iconPrefix+"maximize",MODAL_CLOSE:iconPrefix+"close",MODAL_INFO:iconPrefix+"info-circle-fill",MODAL_SUCCESS:iconPrefix+"success-circle-fill",MODAL_WARNING:iconPrefix+"warning-circle-fill",MODAL_ERROR:iconPrefix+"error-circle-fill",MODAL_QUESTION:iconPrefix+"question-circle-fill",MODAL_LOADING:iconPrefix+"spinner roll",DRAWER_CLOSE:iconPrefix+"close",FORM_PREFIX:iconPrefix+"question-circle-fill",FORM_SUFFIX:iconPrefix+"question-circle-fill",FORM_FOLDING:iconPrefix+"arrow-up rotate180",FORM_UNFOLDING:iconPrefix+"arrow-up",FORM_VALID_ERROR_ICON:iconPrefix+"warning-circle-fill",FORM_DESIGN_STYLE_SETTING:iconPrefix+"layout",FORM_DESIGN_PROPS_PC:iconPrefix+"pc",FORM_DESIGN_PROPS_MOBILE:iconPrefix+"mobile",FORM_DESIGN_PROPS_ADD:iconPrefix+"add",FORM_DESIGN_PROPS_EDIT:iconPrefix+"edit",FORM_DESIGN_WIDGET_ADD:iconPrefix+"square-plus-fill",FORM_DESIGN_WIDGET_COPY:iconPrefix+"copy",FORM_DESIGN_WIDGET_DELETE:iconPrefix+"delete",FORM_DESIGN_WIDGET_SWAP_LR:iconPrefix+"swap",FORM_DESIGN_WIDGET_OPTION_DELETE:iconPrefix+"delete",FORM_DESIGN_WIDGET_OPTION_EXPAND_OPEN:iconPrefix+"square-plus",FORM_DESIGN_WIDGET_OPTION_EXPAND_CLOSE:iconPrefix+"square-minus",LIST_DESIGN_FIELD_SETTING:iconPrefix+"custom-column",LIST_DESIGN_LIST_SETTING:iconPrefix+"menu",LIST_DESIGN_LIST_SETTING_SEARCH_DELETE:iconPrefix+"delete",LIST_DESIGN_LIST_SETTING_ACTIVE_DELETE:iconPrefix+"delete",UPLOAD_FILE_ERROR:iconPrefix+"warning-circle-fill",UPLOAD_FILE_ADD:iconPrefix+"upload",UPLOAD_FILE_REMOVE:iconPrefix+"delete",UPLOAD_FILE_DOWNLOAD:iconPrefix+"download",UPLOAD_IMAGE_UPLOAD:iconPrefix+"upload",UPLOAD_IMAGE_RE_UPLOAD:iconPrefix+"repeat",UPLOAD_IMAGE_ADD:iconPrefix+"add",UPLOAD_IMAGE_REMOVE:iconPrefix+"close",UPLOAD_LOADING:iconPrefix+"spinner roll vxe-loading--default-icon",UPLOAD_FILE_TYPE_DEFAULT:iconPrefix+"file",UPLOAD_FILE_TYPE_XLSX:iconPrefix+"file-excel",UPLOAD_FILE_TYPE_XLS:iconPrefix+"file-excel",UPLOAD_FILE_TYPE_PDF:iconPrefix+"file-pdf",UPLOAD_FILE_TYPE_PNG:iconPrefix+"file-image",UPLOAD_FILE_TYPE_GIF:iconPrefix+"file-image",UPLOAD_FILE_TYPE_JPG:iconPrefix+"file-image",UPLOAD_FILE_TYPE_JPEG:iconPrefix+"file-image",UPLOAD_FILE_TYPE_MD:iconPrefix+"file-markdown",UPLOAD_FILE_TYPE_PPD:iconPrefix+"file-ppt",UPLOAD_FILE_TYPE_DOCX:iconPrefix+"file-word",UPLOAD_FILE_TYPE_DOC:iconPrefix+"file-word",UPLOAD_FILE_TYPE_ZIP:iconPrefix+"file-zip",UPLOAD_FILE_TYPE_TXT:iconPrefix+"file-txt",IMAGE_PREVIEW_CLOSE:iconPrefix+"close",IMAGE_PREVIEW_PREVIOUS:iconPrefix+"arrow-left",IMAGE_PREVIEW_NEXT:iconPrefix+"arrow-right",IMAGE_PREVIEW_PCT_FULL:iconPrefix+"pct-full",IMAGE_PREVIEW_PCT_1_1:iconPrefix+"pct-1-1",IMAGE_PREVIEW_ZOOM_OUT:iconPrefix+"search-zoom-out",IMAGE_PREVIEW_ZOOM_IN:iconPrefix+"search-zoom-in",IMAGE_PREVIEW_ROTATE_LEFT:iconPrefix+"rotate-left",IMAGE_PREVIEW_ROTATE_RIGHT:iconPrefix+"rotate-right",IMAGE_PREVIEW_PRINT:iconPrefix+"print",IMAGE_PREVIEW_DOWNLOAD:iconPrefix+"download",ALERT_CLOSE:iconPrefix+"close",ALERT_INFO:iconPrefix+"info-circle-fill",ALERT_SUCCESS:iconPrefix+"success-circle-fill",ALERT_WARNING:iconPrefix+"warning-circle-fill",ALERT_ERROR:iconPrefix+"error-circle-fill",TREE_NODE_OPEN:iconPrefix+"caret-right rotate90",TREE_NODE_CLOSE:iconPrefix+"caret-right",TREE_NODE_LOADED:iconPrefix+"spinner roll",TREE_DRAG:iconPrefix+"drag-handle",TREE_DRAG_STATUS_NODE:iconPrefix+"sort",TREE_DRAG_STATUS_SUB_NODE:iconPrefix+"add-sub",TREE_DRAG_DISABLED:iconPrefix+"no-drop",TREE_SELECT_LOADED:iconPrefix+"spinner roll",TREE_SELECT_OPEN:iconPrefix+"caret-down rotate180",TREE_SELECT_CLOSE:iconPrefix+"caret-down",TABLE_SELECT_LOADED:iconPrefix+"spinner roll",TABLE_SELECT_OPEN:iconPrefix+"caret-down rotate180",TABLE_SELECT_CLOSE:iconPrefix+"caret-down",TABS_TAB_BUTTON_TOP:iconPrefix+"arrow-up",TABS_TAB_BUTTON_BOTTOM:iconPrefix+"arrow-down",TABS_TAB_BUTTON_LEFT:iconPrefix+"arrow-left",TABS_TAB_BUTTON_RIGHT:iconPrefix+"arrow-right",TABS_TAB_CLOSE:iconPrefix+"close",TABS_TAB_REFRESH:iconPrefix+"refresh",TABS_TAB_REFRESH_LOADING:iconPrefix+"refresh roll",TEXT_COPY:iconPrefix+"copy",TEXT_LOADING:iconPrefix+"spinner roll",TAG_CLOSE:iconPrefix+"close",TAG_LOADING:iconPrefix+"spinner roll",CAROUSEL_HORIZONTAL_PREVIOUS:iconPrefix+"arrow-left",CAROUSEL_HORIZONTAL_NEXT:iconPrefix+"arrow-right",CAROUSEL_VERTICAL_PREVIOUS:iconPrefix+"arrow-up",CAROUSEL_VERTICAL_NEXT:iconPrefix+"arrow-down",COLLAPSE_OPEN:iconPrefix+"arrow-right rotate90",COLLAPSE_CLOSE:iconPrefix+"arrow-right",EMPTY_DEFAULT:iconPrefix+"empty",RESULT_INFO:iconPrefix+"info-circle-fill",RESULT_SUCCESS:iconPrefix+"success-circle-fill",RESULT_WARNING:iconPrefix+"warning-circle-fill",RESULT_ERROR:iconPrefix+"error-circle-fill",RESULT_QUESTION:iconPrefix+"question-circle-fill",RESULT_LOADING:iconPrefix+"spinner roll",RATE_CHECKED:iconPrefix+"star-fill",RATE_UNCHECKED:iconPrefix+"star",COLOR_PICKER_COLOR_COPY:iconPrefix+"copy",COLOR_PICKER_EYE_DROPPER:iconPrefix+"dropper",COLOR_PICKER_TPTY_OPEN:iconPrefix+"arrow-down rotate180",COLOR_PICKER_TPTY_CLOSE:iconPrefix+"arrow-down",SPLIT_TOP_ACTION:iconPrefix+"arrow-up",SPLIT_BOTTOM_ACTION:iconPrefix+"arrow-down",SPLIT_LEFT_ACTION:iconPrefix+"arrow-left",SPLIT_RIGHT_ACTION:iconPrefix+"arrow-right",BACKTOP_TOP:iconPrefix+"top",CONTEXT_MENU_OPTION_LOADING:iconPrefix+"spinner roll",CONTEXT_MENU_CHILDREN:iconPrefix+"arrow-right"}),exports.default=_core.VxeUI);
|
|
1
|
+
Object.defineProperty(exports,"__esModule",{value:!0});var _exportNames={version:!0,config:!0,setup:!0},_core=(exports.config=config,exports.default=void 0,exports.setup=setup,exports.version=void 0,require("@vxe-ui/core")),_dynamics=(Object.keys(_core).forEach(function(e){"default"===e||"__esModule"===e||Object.prototype.hasOwnProperty.call(_exportNames,e)||e in exports&&exports[e]===_core[e]||Object.defineProperty(exports,e,{enumerable:!0,get:function(){return _core[e]}})}),require("../dynamics")),_log=require("./src/log"),version=exports.version="3.14.11";function config(e){return(0,_log.warnLog)("vxe.error.delFunc",["config","setConfig"]),(0,_core.setConfig)(e)}function setup(e){return(0,_log.warnLog)("vxe.error.delFunc",["setup","setConfig"]),(0,_core.setConfig)(e)}_core.VxeUI.uiVersion=version,_core.VxeUI.dynamicApp=_dynamics.dynamicApp,_core.VxeUI.config=config,_core.VxeUI.setup=setup,(0,_core.setConfig)({alert:{},anchor:{},anchorLink:{},avatar:{},backtop:{showIcon:!0,showContent:!0,showTop:!0,showBottom:!0,shadow:!0,threshold:20},badge:{},breadcrumb:{separator:"/"},breadcrumbItem:{},button:{trigger:"hover",prefixTooltip:{enterable:!0},suffixTooltip:{enterable:!0},showDropdownIcon:!0},buttonGroup:{},calendar:{minDate:new Date(1900,0,1),maxDate:new Date(2100,0,1),startDay:1,selectDay:1},card:{border:!0,padding:!0},carousel:{height:200,loop:!0,interval:5e3},carouselItem:{},cascader:{autoClose:!0},checkbox:{},checkboxButton:{},checkboxGroup:{},col:{},collapse:{padding:!0,expandConfig:{showIcon:!0}},collapsePane:{},contextMenu:{autoLocate:!0},countdown:{},colorPicker:{type:"rgb",clearable:!0,showAlpha:!0,clickToCopy:!0,showColorExtractor:!0,showQuick:!0},datePanel:{startDate:new Date(1900,0,1),endDate:new Date(2100,0,1),startDay:1,selectDay:1},datePicker:{shortcutConfig:{align:"left",mode:"text",autoClose:!0},startDay:1,selectDay:1,autoClose:!0,showClearButton:null,showConfirmButton:null},dateRangePicker:{shortcutConfig:{align:"left",mode:"text",autoClose:!0},startDay:1,selectDay:1,separator:" ~ ",autoClose:!0,showClearButton:!0,showConfirmButton:null},drawer:{position:"right",showHeader:!0,lockView:!0,mask:!0,showTitleOverflow:!0,showClose:!0,padding:!0,cancelClosable:!0,confirmClosable:!0},empty:{},form:{validConfig:{showErrorMessage:!0,autoPos:!0,theme:"beautify"},tooltipConfig:{enterable:!0},titleAsterisk:!0,titleOverflow:!1,padding:!0},formDesign:{height:400,showHeader:!0,showPc:!0},formGather:{},formGroup:{},formItem:{},formView:{},icon:{},iconPicker:{icons:["home","company","comment","setting","send","envelope","envelope-open","bell","search","print","pc","goods","chart-line","edit","delete","save","folder","microphone","flag","link","location","sunny","rmb","usd","user","add-user","add-users","star","unlock","time","text","feedback","calendar","association-form","cloud-download","cloud-upload","file","subtable","chart-bar-x","chart-bar-y","chart-line","chart-pie","chart-radar"]},image:{draggable:null,showPreview:!0,showPrintButton:!0},imageGroup:{showPreview:!0,showPrintButton:!0},imagePreview:{showPrintButton:!0,maskClosable:!0},input:{startDate:new Date(1900,0,1),endDate:new Date(2100,0,1),startDay:1,selectDay:1,digits:2,controls:!0},layoutAside:{},layoutBody:{backtopConfig:{}},layoutContainer:{},layoutFooter:{},layoutHeader:{},link:{underline:!0},listDesign:{height:400,showPc:!0},listView:{},list:{virtualYConfig:{enabled:!0,gt:60}},loading:{showIcon:!0,showText:!0},menu:{},modal:{top:16,showHeader:!0,minWidth:340,minHeight:140,lockView:!0,mask:!0,duration:3e3,marginSize:0,dblclickZoom:!0,showTitleOverflow:!0,animat:!0,showClose:!0,padding:!0,draggable:!0,showConfirmButton:null,cancelClosable:!0,confirmClosable:!0,zoomConfig:{minimizeMaxSize:10,minimizeVerticalOffset:{top:-24,left:0},minimizeHorizontalOffset:{top:0,left:32}},storageKey:"VXE_MODAL_POSITION"},noticeBar:{},numberInput:{digits:2,autoFill:!0,controlConfig:{enabled:!0,layout:"right",showButton:!0,isWheel:!0,isArrow:!0}},optgroup:{},option:{},pager:{pageSizePlacement:"top"},print:{pageStyle:{}},passwordInput:{controls:!0},printPageBreak:{},pulldown:{},radio:{strict:!0},radioButton:{strict:!0},radioGroup:{strict:!0},rate:{},result:{},row:{},segmented:{},select:{multiCharOverflow:8,remoteConfig:{enabled:!0,autoLoad:!0},virtualYConfig:{enabled:!0,gt:50,oSize:2}},splitter:{resize:!0,itemConfig:{minWidth:40,minHeight:40},resizeConfig:{showTip:!0}},splitterPanel:{},slider:{max:100,min:0},steps:{},switch:{},tabPane:{},tableSelect:{gridConfig:{showOverflow:!0,showHeaderOverflow:!0,showFooterOverflow:!0,rowConfig:{isHover:!0},virtualXConfig:{enabled:!0,gt:0},virtualYConfig:{enabled:!0,gt:0}}},tabs:{},tag:{},textEllipsis:{underline:!0},text:{copyConfig:{showMessage:!0}},textarea:{resize:"none"},timeline:{},timelineItem:{},tip:{},tooltip:{trigger:"hover",theme:"dark",enterDelay:500,leaveDelay:300,isArrow:!0},tree:{indent:20,minHeight:60,radioConfig:{strict:!0},dragConfig:{showIcon:!0,animation:!0,showGuidesStatus:!0,showDragTip:!0},virtualYConfig:{enabled:!0,gt:50,oSize:2}},treeSelect:{autoClose:!0,virtualYConfig:{enabled:!0,gt:0,oSize:2},treeConfig:{maxHeight:300,radioConfig:{},checkboxConfig:{},filterConfig:{autoExpandAll:!0}}},upload:{mode:"all",imageTypes:["jpg","jpeg","png","gif"],showList:!0,showUploadButton:!0,showButtonText:!0,showRemoveButton:!0,showButtonIcon:!0,showPreview:!0,dragToUpload:!0,showLimitSize:!0,showLimitCount:!0,autoSubmit:!0,maxSimultaneousUploads:5,previewImageConfig:{}},watermark:{rotate:-30,gap:[100,100]},table:{},colgroup:{},column:{},toolbar:{},grid:{},gantt:{}});var iconPrefix="vxe-icon-",_default=((0,_core.setIcon)({LOADING:iconPrefix+"spinner roll vxe-loading--default-icon",BUTTON_DROPDOWN:iconPrefix+"arrow-down",BUTTON_LOADING:iconPrefix+"spinner roll",BUTTON_TOOLTIP_ICON:iconPrefix+"question-circle-fill",MENU_ITEM_EXPAND_OPEN:iconPrefix+"arrow-down rotate180",MENU_ITEM_EXPAND_CLOSE:iconPrefix+"arrow-down",SELECT_LOADED:iconPrefix+"spinner roll",SELECT_OPEN:iconPrefix+"caret-down rotate180",SELECT_CLOSE:iconPrefix+"caret-down",SELECT_ADD_OPTION:iconPrefix+"add",ICON_PICKER_OPEN:iconPrefix+"caret-down rotate180",ICON_PICKER_CLOSE:iconPrefix+"caret-down",PAGER_HOME:iconPrefix+"home-page",PAGER_END:iconPrefix+"end-page",PAGER_JUMP_PREV:iconPrefix+"arrow-double-left",PAGER_JUMP_NEXT:iconPrefix+"arrow-double-right",PAGER_PREV_PAGE:iconPrefix+"arrow-left",PAGER_NEXT_PAGE:iconPrefix+"arrow-right",PAGER_JUMP_MORE:iconPrefix+"ellipsis-h",RADIO_CHECKED:iconPrefix+"radio-checked-fill",RADIO_UNCHECKED:iconPrefix+"radio-unchecked",RADIO_DISABLED_UNCHECKED:iconPrefix+"radio-unchecked-fill",CHECKBOX_INDETERMINATE:iconPrefix+"checkbox-indeterminate-fill",CHECKBOX_CHECKED:iconPrefix+"checkbox-checked-fill",CHECKBOX_UNCHECKED:iconPrefix+"checkbox-unchecked",CHECKBOX_DISABLED_UNCHECKED:iconPrefix+"checkbox-unchecked-fill",INPUT_CLEAR:iconPrefix+"error-circle-fill",INPUT_SEARCH:iconPrefix+"search",INPUT_PLUS_NUM:iconPrefix+"caret-up",INPUT_MINUS_NUM:iconPrefix+"caret-down",NUMBER_INPUT_MINUS_NUM:iconPrefix+"minus",NUMBER_INPUT_PLUS_NUM:iconPrefix+"add",DATE_PICKER_DATE:iconPrefix+"calendar",PASSWORD_INPUT_SHOW_PWD:iconPrefix+"eye-fill-close",PASSWORD_INPUT_HIDE_PWD:iconPrefix+"eye-fill",MODAL_ZOOM_MIN:iconPrefix+"minus",MODAL_ZOOM_REVERT:iconPrefix+"recover",MODAL_ZOOM_IN:iconPrefix+"square",MODAL_ZOOM_OUT:iconPrefix+"maximize",MODAL_CLOSE:iconPrefix+"close",MODAL_INFO:iconPrefix+"info-circle-fill",MODAL_SUCCESS:iconPrefix+"success-circle-fill",MODAL_WARNING:iconPrefix+"warning-circle-fill",MODAL_ERROR:iconPrefix+"error-circle-fill",MODAL_QUESTION:iconPrefix+"question-circle-fill",MODAL_LOADING:iconPrefix+"spinner roll",DRAWER_CLOSE:iconPrefix+"close",FORM_PREFIX:iconPrefix+"question-circle-fill",FORM_SUFFIX:iconPrefix+"question-circle-fill",FORM_FOLDING:iconPrefix+"arrow-up rotate180",FORM_UNFOLDING:iconPrefix+"arrow-up",FORM_VALID_ERROR_ICON:iconPrefix+"warning-circle-fill",FORM_DESIGN_STYLE_SETTING:iconPrefix+"layout",FORM_DESIGN_PROPS_PC:iconPrefix+"pc",FORM_DESIGN_PROPS_MOBILE:iconPrefix+"mobile",FORM_DESIGN_PROPS_ADD:iconPrefix+"add",FORM_DESIGN_PROPS_EDIT:iconPrefix+"edit",FORM_DESIGN_WIDGET_ADD:iconPrefix+"square-plus-fill",FORM_DESIGN_WIDGET_COPY:iconPrefix+"copy",FORM_DESIGN_WIDGET_DELETE:iconPrefix+"delete",FORM_DESIGN_WIDGET_SWAP_LR:iconPrefix+"swap",FORM_DESIGN_WIDGET_OPTION_DELETE:iconPrefix+"delete",FORM_DESIGN_WIDGET_OPTION_EXPAND_OPEN:iconPrefix+"square-plus",FORM_DESIGN_WIDGET_OPTION_EXPAND_CLOSE:iconPrefix+"square-minus",LIST_DESIGN_FIELD_SETTING:iconPrefix+"custom-column",LIST_DESIGN_LIST_SETTING:iconPrefix+"menu",LIST_DESIGN_LIST_SETTING_SEARCH_DELETE:iconPrefix+"delete",LIST_DESIGN_LIST_SETTING_ACTIVE_DELETE:iconPrefix+"delete",UPLOAD_FILE_ERROR:iconPrefix+"warning-circle-fill",UPLOAD_FILE_ADD:iconPrefix+"upload",UPLOAD_FILE_REMOVE:iconPrefix+"delete",UPLOAD_FILE_DOWNLOAD:iconPrefix+"download",UPLOAD_IMAGE_UPLOAD:iconPrefix+"upload",UPLOAD_IMAGE_RE_UPLOAD:iconPrefix+"repeat",UPLOAD_IMAGE_ADD:iconPrefix+"add",UPLOAD_IMAGE_REMOVE:iconPrefix+"close",UPLOAD_LOADING:iconPrefix+"spinner roll vxe-loading--default-icon",UPLOAD_FILE_TYPE_DEFAULT:iconPrefix+"file",UPLOAD_FILE_TYPE_XLSX:iconPrefix+"file-excel",UPLOAD_FILE_TYPE_XLS:iconPrefix+"file-excel",UPLOAD_FILE_TYPE_PDF:iconPrefix+"file-pdf",UPLOAD_FILE_TYPE_PNG:iconPrefix+"file-image",UPLOAD_FILE_TYPE_GIF:iconPrefix+"file-image",UPLOAD_FILE_TYPE_JPG:iconPrefix+"file-image",UPLOAD_FILE_TYPE_JPEG:iconPrefix+"file-image",UPLOAD_FILE_TYPE_MD:iconPrefix+"file-markdown",UPLOAD_FILE_TYPE_PPD:iconPrefix+"file-ppt",UPLOAD_FILE_TYPE_DOCX:iconPrefix+"file-word",UPLOAD_FILE_TYPE_DOC:iconPrefix+"file-word",UPLOAD_FILE_TYPE_ZIP:iconPrefix+"file-zip",UPLOAD_FILE_TYPE_TXT:iconPrefix+"file-txt",IMAGE_PREVIEW_CLOSE:iconPrefix+"close",IMAGE_PREVIEW_PREVIOUS:iconPrefix+"arrow-left",IMAGE_PREVIEW_NEXT:iconPrefix+"arrow-right",IMAGE_PREVIEW_PCT_FULL:iconPrefix+"pct-full",IMAGE_PREVIEW_PCT_1_1:iconPrefix+"pct-1-1",IMAGE_PREVIEW_ZOOM_OUT:iconPrefix+"search-zoom-out",IMAGE_PREVIEW_ZOOM_IN:iconPrefix+"search-zoom-in",IMAGE_PREVIEW_ROTATE_LEFT:iconPrefix+"rotate-left",IMAGE_PREVIEW_ROTATE_RIGHT:iconPrefix+"rotate-right",IMAGE_PREVIEW_PRINT:iconPrefix+"print",IMAGE_PREVIEW_DOWNLOAD:iconPrefix+"download",ALERT_CLOSE:iconPrefix+"close",ALERT_INFO:iconPrefix+"info-circle-fill",ALERT_SUCCESS:iconPrefix+"success-circle-fill",ALERT_WARNING:iconPrefix+"warning-circle-fill",ALERT_ERROR:iconPrefix+"error-circle-fill",TREE_NODE_OPEN:iconPrefix+"caret-right rotate90",TREE_NODE_CLOSE:iconPrefix+"caret-right",TREE_NODE_LOADED:iconPrefix+"spinner roll",TREE_DRAG:iconPrefix+"drag-handle",TREE_DRAG_STATUS_NODE:iconPrefix+"sort",TREE_DRAG_STATUS_SUB_NODE:iconPrefix+"add-sub",TREE_DRAG_DISABLED:iconPrefix+"no-drop",TREE_SELECT_LOADED:iconPrefix+"spinner roll",TREE_SELECT_OPEN:iconPrefix+"caret-down rotate180",TREE_SELECT_CLOSE:iconPrefix+"caret-down",TABLE_SELECT_LOADED:iconPrefix+"spinner roll",TABLE_SELECT_OPEN:iconPrefix+"caret-down rotate180",TABLE_SELECT_CLOSE:iconPrefix+"caret-down",TABS_TAB_BUTTON_TOP:iconPrefix+"arrow-up",TABS_TAB_BUTTON_BOTTOM:iconPrefix+"arrow-down",TABS_TAB_BUTTON_LEFT:iconPrefix+"arrow-left",TABS_TAB_BUTTON_RIGHT:iconPrefix+"arrow-right",TABS_TAB_CLOSE:iconPrefix+"close",TABS_TAB_REFRESH:iconPrefix+"refresh",TABS_TAB_REFRESH_LOADING:iconPrefix+"refresh roll",TEXT_COPY:iconPrefix+"copy",TEXT_LOADING:iconPrefix+"spinner roll",TAG_CLOSE:iconPrefix+"close",TAG_LOADING:iconPrefix+"spinner roll",CAROUSEL_HORIZONTAL_PREVIOUS:iconPrefix+"arrow-left",CAROUSEL_HORIZONTAL_NEXT:iconPrefix+"arrow-right",CAROUSEL_VERTICAL_PREVIOUS:iconPrefix+"arrow-up",CAROUSEL_VERTICAL_NEXT:iconPrefix+"arrow-down",COLLAPSE_OPEN:iconPrefix+"arrow-right rotate90",COLLAPSE_CLOSE:iconPrefix+"arrow-right",EMPTY_DEFAULT:iconPrefix+"empty",RESULT_INFO:iconPrefix+"info-circle-fill",RESULT_SUCCESS:iconPrefix+"success-circle-fill",RESULT_WARNING:iconPrefix+"warning-circle-fill",RESULT_ERROR:iconPrefix+"error-circle-fill",RESULT_QUESTION:iconPrefix+"question-circle-fill",RESULT_LOADING:iconPrefix+"spinner roll",RATE_CHECKED:iconPrefix+"star-fill",RATE_UNCHECKED:iconPrefix+"star",COLOR_PICKER_COLOR_COPY:iconPrefix+"copy",COLOR_PICKER_EYE_DROPPER:iconPrefix+"dropper",COLOR_PICKER_TPTY_OPEN:iconPrefix+"arrow-down rotate180",COLOR_PICKER_TPTY_CLOSE:iconPrefix+"arrow-down",SPLIT_TOP_ACTION:iconPrefix+"arrow-up",SPLIT_BOTTOM_ACTION:iconPrefix+"arrow-down",SPLIT_LEFT_ACTION:iconPrefix+"arrow-left",SPLIT_RIGHT_ACTION:iconPrefix+"arrow-right",BACKTOP_TOP:iconPrefix+"top",CONTEXT_MENU_OPTION_LOADING:iconPrefix+"spinner roll",CONTEXT_MENU_CHILDREN:iconPrefix+"arrow-right"}),exports.default=_core.VxeUI);
|
package/lib/ui/src/log.js
CHANGED
|
@@ -5,6 +5,6 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports.warnLog = exports.errLog = void 0;
|
|
7
7
|
var _core = require("@vxe-ui/core");
|
|
8
|
-
var version = "ui v".concat("3.14.
|
|
8
|
+
var version = "ui v".concat("3.14.11");
|
|
9
9
|
var warnLog = exports.warnLog = _core.log.create('warn', version);
|
|
10
10
|
var errLog = exports.errLog = _core.log.create('error', version);
|
package/lib/ui/src/log.min.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
Object.defineProperty(exports,"__esModule",{value:!0}),exports.warnLog=exports.errLog=void 0;var _core=require("@vxe-ui/core"),version="ui v".concat("3.14.
|
|
1
|
+
Object.defineProperty(exports,"__esModule",{value:!0}),exports.warnLog=exports.errLog=void 0;var _core=require("@vxe-ui/core"),version="ui v".concat("3.14.11"),warnLog=exports.warnLog=_core.log.create("warn",version),errLog=exports.errLog=_core.log.create("error",version);
|
package/package.json
CHANGED
|
@@ -597,7 +597,7 @@ export default /* define-vxe-component start */ defineVxeComponent({
|
|
|
597
597
|
renderTooltipIcon (h: CreateElement, tipOpts: VxeButtonPropTypes.PrefixTooltip | VxeButtonPropTypes.SuffixTooltip, type: 'prefix' | 'suffix') {
|
|
598
598
|
return h(VxeTooltipComponent, {
|
|
599
599
|
props: {
|
|
600
|
-
|
|
600
|
+
useHtml: XEUtils.isBoolean(tipOpts.useHtml) ? tipOpts.useHtml : tipOpts.useHTML,
|
|
601
601
|
content: tipOpts.content,
|
|
602
602
|
enterable: tipOpts.enterable,
|
|
603
603
|
theme: tipOpts.theme
|
|
@@ -70,6 +70,10 @@ export default /* define-vxe-component start */ defineVxeComponent({
|
|
|
70
70
|
default: () => getConfig().drawer.showClose
|
|
71
71
|
},
|
|
72
72
|
content: [Number, String] as PropType<VxeDrawerPropTypes.Content>,
|
|
73
|
+
useHtml: {
|
|
74
|
+
type: Boolean as PropType<VxeDrawerPropTypes.UseHtml>,
|
|
75
|
+
default: () => getConfig().drawer.useHtml
|
|
76
|
+
},
|
|
73
77
|
showCancelButton: {
|
|
74
78
|
type: Boolean as PropType<VxeDrawerPropTypes.ShowCancelButton>,
|
|
75
79
|
default: null
|
|
@@ -549,7 +553,7 @@ export default /* define-vxe-component start */ defineVxeComponent({
|
|
|
549
553
|
const props = $xeDrawer
|
|
550
554
|
const slots = $xeDrawer.$scopedSlots
|
|
551
555
|
|
|
552
|
-
const { slots: propSlots = {}, content } = props
|
|
556
|
+
const { slots: propSlots = {}, content, useHtml } = props
|
|
553
557
|
const defaultSlot = slots.default || propSlots.default
|
|
554
558
|
const leftSlot = slots.left || propSlots.left
|
|
555
559
|
const rightSlot = slots.right || propSlots.right
|
|
@@ -564,9 +568,17 @@ export default /* define-vxe-component start */ defineVxeComponent({
|
|
|
564
568
|
h('div', {
|
|
565
569
|
class: 'vxe-drawer--body-default'
|
|
566
570
|
}, [
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
571
|
+
useHtml && !defaultSlot
|
|
572
|
+
? h('div', {
|
|
573
|
+
key: 'hc',
|
|
574
|
+
class: 'vxe-drawer--content',
|
|
575
|
+
domProps: {
|
|
576
|
+
innerHTML: getFuncText(content)
|
|
577
|
+
}
|
|
578
|
+
})
|
|
579
|
+
: h('div', {
|
|
580
|
+
class: 'vxe-drawer--content'
|
|
581
|
+
}, defaultSlot ? $xeDrawer.callSlot(defaultSlot, { $drawer: $xeDrawer }, h) : getFuncText(content))
|
|
570
582
|
]),
|
|
571
583
|
rightSlot
|
|
572
584
|
? h('div', {
|
|
@@ -50,6 +50,10 @@ export default /* define-vxe-component start */ defineVxeComponent({
|
|
|
50
50
|
default: () => getConfig().modal.duration
|
|
51
51
|
},
|
|
52
52
|
content: [Number, String] as PropType<VxeModalPropTypes.Content>,
|
|
53
|
+
useHtml: {
|
|
54
|
+
type: Boolean as PropType<VxeModalPropTypes.UseHtml>,
|
|
55
|
+
default: () => getConfig().modal.useHtml
|
|
56
|
+
},
|
|
53
57
|
showCancelButton: {
|
|
54
58
|
type: Boolean as PropType<VxeModalPropTypes.ShowCancelButton>,
|
|
55
59
|
default: null
|
|
@@ -1418,7 +1422,7 @@ export default /* define-vxe-component start */ defineVxeComponent({
|
|
|
1418
1422
|
const props = $xeModal
|
|
1419
1423
|
const slots = $xeModal.$scopedSlots
|
|
1420
1424
|
|
|
1421
|
-
const { slots: propSlots = {}, status, message, iconStatus } = props
|
|
1425
|
+
const { slots: propSlots = {}, status, message, iconStatus, useHtml } = props
|
|
1422
1426
|
const content = props.content || message
|
|
1423
1427
|
const isMsg = $xeModal.computeIsMsg
|
|
1424
1428
|
const defaultSlot = slots.default || propSlots.default
|
|
@@ -1437,9 +1441,18 @@ export default /* define-vxe-component start */ defineVxeComponent({
|
|
|
1437
1441
|
)
|
|
1438
1442
|
}
|
|
1439
1443
|
contVNs.push(
|
|
1440
|
-
|
|
1441
|
-
|
|
1442
|
-
|
|
1444
|
+
useHtml && !defaultSlot
|
|
1445
|
+
? h('div', {
|
|
1446
|
+
key: 'hc',
|
|
1447
|
+
class: 'vxe-modal--content',
|
|
1448
|
+
domProps: {
|
|
1449
|
+
innerHTML: getFuncText(content)
|
|
1450
|
+
}
|
|
1451
|
+
})
|
|
1452
|
+
: h('div', {
|
|
1453
|
+
key: 'dc',
|
|
1454
|
+
class: 'vxe-modal--content'
|
|
1455
|
+
}, defaultSlot ? $xeModal.callSlot(defaultSlot, { $modal: $xeModal }, h) : getFuncText(content))
|
|
1443
1456
|
)
|
|
1444
1457
|
return h('div', {
|
|
1445
1458
|
class: 'vxe-modal--body'
|
|
@@ -32,7 +32,15 @@ export default /* define-vxe-component start */ defineVxeComponent({
|
|
|
32
32
|
type: [String, Number] as PropType<VxeTooltipPropTypes.Content>,
|
|
33
33
|
default: null
|
|
34
34
|
},
|
|
35
|
-
|
|
35
|
+
useHtml: {
|
|
36
|
+
type: Boolean as PropType<VxeTooltipPropTypes.UseHtml>,
|
|
37
|
+
default: () => XEUtils.isBoolean(getConfig().tooltip.useHtml) ? getConfig().tooltip.useHtml : null
|
|
38
|
+
},
|
|
39
|
+
// 已废弃,请使用 useHtml
|
|
40
|
+
useHTML: {
|
|
41
|
+
type: Boolean as PropType<VxeTooltipPropTypes.UseHTML>,
|
|
42
|
+
default: () => getConfig().tooltip.useHTML
|
|
43
|
+
},
|
|
36
44
|
zIndex: [String, Number] as PropType<VxeTooltipPropTypes.ZIndex>,
|
|
37
45
|
popupClassName: [String, Function] as PropType<VxeTooltipPropTypes.PopupClassName>,
|
|
38
46
|
width: {
|
|
@@ -491,7 +499,7 @@ export default /* define-vxe-component start */ defineVxeComponent({
|
|
|
491
499
|
const slots = $xeTooltip.$scopedSlots
|
|
492
500
|
const reactData = $xeTooltip.reactData
|
|
493
501
|
|
|
494
|
-
const { useHTML } = props
|
|
502
|
+
const { useHtml, useHTML } = props
|
|
495
503
|
const { tipContent } = reactData
|
|
496
504
|
const wrapperStyle = $xeTooltip.computeWrapperStyle
|
|
497
505
|
const contentSlot = slots.content
|
|
@@ -499,21 +507,21 @@ export default /* define-vxe-component start */ defineVxeComponent({
|
|
|
499
507
|
if (contentSlot) {
|
|
500
508
|
contVNs.push(
|
|
501
509
|
h('div', {
|
|
502
|
-
key:
|
|
510
|
+
key: 'ct'
|
|
503
511
|
}, getSlotVNs(contentSlot({})))
|
|
504
512
|
)
|
|
505
|
-
} else if (useHTML) {
|
|
513
|
+
} else if (XEUtils.isBoolean(useHtml) ? useHtml : useHTML) {
|
|
506
514
|
contVNs.push(
|
|
507
515
|
h('div', {
|
|
508
|
-
key:
|
|
509
|
-
|
|
516
|
+
key: 'ch',
|
|
517
|
+
domProps: {
|
|
510
518
|
innerHTML: tipContent
|
|
511
519
|
}
|
|
512
520
|
})
|
|
513
521
|
)
|
|
514
522
|
} else {
|
|
515
523
|
contVNs.push(h('span', {
|
|
516
|
-
key:
|
|
524
|
+
key: 'cd'
|
|
517
525
|
}, `${tipContent}`))
|
|
518
526
|
}
|
|
519
527
|
return h('div', {
|
package/packages/ui/index.ts
CHANGED
|
@@ -137,6 +137,7 @@ setConfig({
|
|
|
137
137
|
},
|
|
138
138
|
drawer: {
|
|
139
139
|
// size: null,
|
|
140
|
+
// useHtml: false,
|
|
140
141
|
position: 'right',
|
|
141
142
|
showHeader: true,
|
|
142
143
|
lockView: true,
|
|
@@ -237,6 +238,7 @@ setConfig({
|
|
|
237
238
|
// size: null,
|
|
238
239
|
top: 16,
|
|
239
240
|
showHeader: true,
|
|
241
|
+
// useHtml: false,
|
|
240
242
|
// width: null,
|
|
241
243
|
// height: null,
|
|
242
244
|
minWidth: 340,
|
|
@@ -35,6 +35,7 @@ export namespace VxeDrawerPropTypes {
|
|
|
35
35
|
export type Position = DrawerPosition
|
|
36
36
|
export type Title = string | number
|
|
37
37
|
export type Content = number | string | null
|
|
38
|
+
export type UseHtml = boolean
|
|
38
39
|
export type ShowCancelButton = boolean | null
|
|
39
40
|
export type CancelButtonText = string
|
|
40
41
|
export type ShowConfirmButton = boolean | null
|
|
@@ -70,6 +71,7 @@ export interface VxeDrawerProps {
|
|
|
70
71
|
position?: VxeDrawerPropTypes.Position
|
|
71
72
|
title?: VxeDrawerPropTypes.Title
|
|
72
73
|
content?: VxeDrawerPropTypes.Content
|
|
74
|
+
useHtml?: VxeDrawerPropTypes.UseHtml
|
|
73
75
|
showCancelButton?: VxeDrawerPropTypes.ShowCancelButton
|
|
74
76
|
cancelButtonText?: VxeDrawerPropTypes.CancelButtonText
|
|
75
77
|
showConfirmButton?: VxeDrawerPropTypes.ShowConfirmButton
|
|
@@ -436,7 +436,7 @@ export namespace VxeGanttPropTypes {
|
|
|
436
436
|
minHeight?: VxeTooltipPropTypes.MinHeight
|
|
437
437
|
maxWidth?: VxeTooltipPropTypes.MaxWidth
|
|
438
438
|
maxHeight?: VxeTooltipPropTypes.MaxHeight
|
|
439
|
-
|
|
439
|
+
useHtml?: VxeTooltipPropTypes.UseHtml
|
|
440
440
|
contentMethod?(params: {
|
|
441
441
|
$gantt: VxeGanttConstructor<D>
|
|
442
442
|
scaleType: VxeGanttDefines.ColumnScaleType
|
|
@@ -445,6 +445,11 @@ export namespace VxeGanttPropTypes {
|
|
|
445
445
|
$rowIndex: number
|
|
446
446
|
_rowIndex: number
|
|
447
447
|
}): string | null | void
|
|
448
|
+
/**
|
|
449
|
+
* 已废弃,请使用 useHtml
|
|
450
|
+
* @deprecated
|
|
451
|
+
*/
|
|
452
|
+
useHTML?: VxeTooltipPropTypes.UseHTML
|
|
448
453
|
}
|
|
449
454
|
|
|
450
455
|
export interface TaskBarResizeConfig<D = any> {
|