vxe-pc-ui 3.17.9 → 3.17.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/icon/style.css +1 -1
- package/es/style.css +1 -1
- package/es/style.min.css +1 -1
- package/es/tooltip/src/tooltip.js +4 -5
- package/es/ui/index.js +1 -1
- package/es/ui/src/dom.js +8 -5
- package/es/ui/src/log.js +1 -1
- package/lib/icon/style/style.css +1 -1
- package/lib/icon/style/style.min.css +1 -1
- package/lib/index.umd.js +14 -11
- package/lib/index.umd.min.js +1 -1
- package/lib/style.css +1 -1
- package/lib/style.min.css +1 -1
- package/lib/tooltip/src/tooltip.js +4 -4
- package/lib/tooltip/src/tooltip.min.js +1 -1
- package/lib/ui/index.js +1 -1
- package/lib/ui/index.min.js +1 -1
- package/lib/ui/src/dom.js +8 -5
- package/lib/ui/src/dom.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/tooltip/src/tooltip.ts +4 -4
- package/packages/ui/src/dom.ts +9 -6
- /package/es/icon/{iconfont.1787220441610.ttf → iconfont.1787226508082.ttf} +0 -0
- /package/es/icon/{iconfont.1787220441610.woff → iconfont.1787226508082.woff} +0 -0
- /package/es/icon/{iconfont.1787220441610.woff2 → iconfont.1787226508082.woff2} +0 -0
- /package/es/{iconfont.1787220441610.ttf → iconfont.1787226508082.ttf} +0 -0
- /package/es/{iconfont.1787220441610.woff → iconfont.1787226508082.woff} +0 -0
- /package/es/{iconfont.1787220441610.woff2 → iconfont.1787226508082.woff2} +0 -0
- /package/lib/icon/style/{iconfont.1787220441610.ttf → iconfont.1787226508082.ttf} +0 -0
- /package/lib/icon/style/{iconfont.1787220441610.woff → iconfont.1787226508082.woff} +0 -0
- /package/lib/icon/style/{iconfont.1787220441610.woff2 → iconfont.1787226508082.woff2} +0 -0
- /package/lib/{iconfont.1787220441610.ttf → iconfont.1787226508082.ttf} +0 -0
- /package/lib/{iconfont.1787220441610.woff → iconfont.1787226508082.woff} +0 -0
- /package/lib/{iconfont.1787220441610.woff2 → iconfont.1787226508082.woff2} +0 -0
|
@@ -289,17 +289,17 @@ var _default2 = exports.default = /* define-vxe-component start */(0, _comp.defi
|
|
|
289
289
|
var targetLeft = targetRect.left;
|
|
290
290
|
var targetTop = targetRect.top;
|
|
291
291
|
// 支持特殊定位逻辑
|
|
292
|
-
var left =
|
|
293
|
-
var top =
|
|
292
|
+
var left = 0;
|
|
293
|
+
var top = 0;
|
|
294
294
|
if (tipPos && (tipPos.oLeft || tipPos.oTop)) {
|
|
295
|
+
left = targetLeft;
|
|
296
|
+
top = targetTop + targetHeight;
|
|
295
297
|
if (isArrow) {
|
|
296
298
|
left = left + Math.max(8, Math.min(targetWidth - 8, tipPos.oLeft)) - panelWidth / 2;
|
|
297
299
|
} else {
|
|
298
300
|
left = tipPos.x + 1;
|
|
299
301
|
top = tipPos.y + 1;
|
|
300
302
|
}
|
|
301
|
-
} else {
|
|
302
|
-
left = targetLeft + (targetWidth - panelWidth) / 2;
|
|
303
303
|
}
|
|
304
304
|
var ppObj = (0, _dom.updatePanelPlacement)(targetElem, panelElem, {
|
|
305
305
|
defaultTop: top,
|
|
@@ -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.")}function createReactData(){return{target:null,isUpdate:!1,visible:!1,tipPos:null,tipContent:"",tipActive:!1,tipTarget:null,tipZindex:0,tipStore:{style:{},placement:"",arrowStyle:{}}}}function createInternalData(){return{}}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}},appendTo:{type:[String,Function],default:function(){return(0,_ui.getConfig)().tooltip.appendTo}}},data:function(){var t=_xeUtils.default.uniqueId(),e=createReactData();return Object.assign(Object.assign({},{}),{xID:t,reactData:e})},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)},updateTipStyle:function(){var t,e,i,n,r,o,a=this.reactData,l=this.placement,u=this.defaultPlacement,s=this.isArrow,c=a.tipTarget,p=a.tipStore,f=a.tipPos,a=a.tipZindex,d=this.$refs.refElem;c&&d&&(r=c.getBoundingClientRect(),t=c.offsetWidth,o=c.offsetHeight,e=d.offsetWidth,n=i=r.left,r=r.top+o,f&&(f.oLeft||f.oTop)?s?n=i+Math.max(8,Math.min(t-8,f.oLeft))-e/2:(n=f.x+1,r=f.y+1):n=i+(t-e)/2,o=(0,_dom.updatePanelPlacement)(c,d,{defaultTop:r,defaultLeft:n,placement:l,defaultPlacement:u,teleportTo:!0}),s=Object.assign(o.style,{zIndex:a}),p.placement=o.placement,p.style=s,p.arrowStyle.left="".concat(o.arrowLeft,"px"))},updatePlacement:function(){var t=this;return t.updateTipStyle(),t.$nextTick().then(function(){return t.updateTipStyle()})},isActived:function(){return this.reactData.tipActive},setActived:function(t){this.reactData.tipActive=!!t},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,e=this.zIndex;e?t.tipZindex=_xeUtils.default.toNumber(e):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=e.appendTo,r=i.tipStore,o=t.$refs.refElem;return o&&!o.parentNode&&(0,_dom.getPopupAppendElement)(n).appendChild(o),t.updateValue(!0),t.updateZIndex(),r.placement="top",r.style={width:"auto",left:0,top:0,zIndex:e.zIndex||i.tipZindex},r.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.internalData=createInternalData(),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)},destroyed:function(){var t=this.reactData,e=this.internalData;_xeUtils.default.assign(t,createReactData()),_xeUtils.default.assign(e,createInternalData())},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.")}function createReactData(){return{target:null,isUpdate:!1,visible:!1,tipPos:null,tipContent:"",tipActive:!1,tipTarget:null,tipZindex:0,tipStore:{style:{},placement:"",arrowStyle:{}}}}function createInternalData(){return{}}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}},appendTo:{type:[String,Function],default:function(){return(0,_ui.getConfig)().tooltip.appendTo}}},data:function(){var t=_xeUtils.default.uniqueId(),e=createReactData();return Object.assign(Object.assign({},{}),{xID:t,reactData:e})},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)},updateTipStyle:function(){var t,e,i,n,r,o,a,l=this.reactData,u=this.placement,s=this.defaultPlacement,c=this.isArrow,p=l.tipTarget,f=l.tipStore,d=l.tipPos,l=l.tipZindex,h=this.$refs.refElem;p&&h&&(o=p.getBoundingClientRect(),t=p.offsetWidth,a=p.offsetHeight,e=h.offsetWidth,i=o.left,r=n=0,d&&(d.oLeft||d.oTop)&&(n=i,r=o.top+a,c?n=i+Math.max(8,Math.min(t-8,d.oLeft))-e/2:(n=d.x+1,r=d.y+1)),o=(0,_dom.updatePanelPlacement)(p,h,{defaultTop:r,defaultLeft:n,placement:u,defaultPlacement:s,teleportTo:!0}),a=Object.assign(o.style,{zIndex:l}),f.placement=o.placement,f.style=a,f.arrowStyle.left="".concat(o.arrowLeft,"px"))},updatePlacement:function(){var t=this;return t.updateTipStyle(),t.$nextTick().then(function(){return t.updateTipStyle()})},isActived:function(){return this.reactData.tipActive},setActived:function(t){this.reactData.tipActive=!!t},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,e=this.zIndex;e?t.tipZindex=_xeUtils.default.toNumber(e):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=e.appendTo,r=i.tipStore,o=t.$refs.refElem;return o&&!o.parentNode&&(0,_dom.getPopupAppendElement)(n).appendChild(o),t.updateValue(!0),t.updateZIndex(),r.placement="top",r.style={width:"auto",left:0,top:0,zIndex:e.zIndex||i.tipZindex},r.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.internalData=createInternalData(),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)},destroyed:function(){var t=this.reactData,e=this.internalData;_xeUtils.default.assign(t,createReactData()),_xeUtils.default.assign(e,createInternalData())},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.17.
|
|
29
|
+
var version = exports.version = "3.17.11";
|
|
30
30
|
_core.VxeUI.uiVersion = version;
|
|
31
31
|
_core.VxeUI.dynamicApp = _dynamics.dynamicApp;
|
|
32
32
|
function config(options) {
|
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.17.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:{showFullLabel:!0,treeConfig:{showIcon:!0},filterConfig:{autoExpandMode:"first"}},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:{startDate:new Date(1900,0,1),endDate:new Date(2100,0,1),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"],popupConfig:{}},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:{rowConfig:{contentField:"label"},dragConfig:{showIcon:!0,animation:!0,showGuidesStatus:!0,showDragTip:!0},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:{emptyValue:null,multiCharOverflow:8,radioConfig:{showIcon:!0,trigger:"option"},checkboxConfig:{showIcon:!0,trigger:"option"},remoteConfig:{enabled:!0,autoLoad:!0},virtualYConfig:{enabled:!0,gt:50,oSize:2}},splitter:{resize:!0,itemConfig:{minWidth:40,minHeight:40},resizeConfig:{showTip:!0},actionConfig:{autoHideButton:!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}}},tableTransfer:{},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,defaultPlacement:"top"},transfer:{},tree:{indent:20,minHeight:60,showOverflow:!0,radioConfig:{strict:!0},tooltipConfig:{mode:"tooltip",enterable:!0,leaveDelay:300},dragConfig:{showIcon:!0,animation:!0,showGuidesStatus:!0,showDragTip:!0},virtualYConfig:{enabled:!0,gt:50,oSize:2}},treeSelect:{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-right rotate90",MENU_ITEM_EXPAND_CLOSE:iconPrefix+"arrow-right",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",CASCADER_NODE_OPEN:iconPrefix+"arrow-right",CASCADER_NODE_CLOSE:iconPrefix+"arrow-right",CASCADER_NODE_LOADED:iconPrefix+"spinner roll",LIST_DRAG:iconPrefix+"drag-handle",LIST_DRAG_STATUS_NODE:iconPrefix+"sort",LIST_DRAG_DISABLED:iconPrefix+"no-drop"}),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.17.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:{showFullLabel:!0,treeConfig:{showIcon:!0},filterConfig:{autoExpandMode:"first"}},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:{startDate:new Date(1900,0,1),endDate:new Date(2100,0,1),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"],popupConfig:{}},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:{rowConfig:{contentField:"label"},dragConfig:{showIcon:!0,animation:!0,showGuidesStatus:!0,showDragTip:!0},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:{emptyValue:null,multiCharOverflow:8,radioConfig:{showIcon:!0,trigger:"option"},checkboxConfig:{showIcon:!0,trigger:"option"},remoteConfig:{enabled:!0,autoLoad:!0},virtualYConfig:{enabled:!0,gt:50,oSize:2}},splitter:{resize:!0,itemConfig:{minWidth:40,minHeight:40},resizeConfig:{showTip:!0},actionConfig:{autoHideButton:!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}}},tableTransfer:{},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,defaultPlacement:"top"},transfer:{},tree:{indent:20,minHeight:60,showOverflow:!0,radioConfig:{strict:!0},tooltipConfig:{mode:"tooltip",enterable:!0,leaveDelay:300},dragConfig:{showIcon:!0,animation:!0,showGuidesStatus:!0,showDragTip:!0},virtualYConfig:{enabled:!0,gt:50,oSize:2}},treeSelect:{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-right rotate90",MENU_ITEM_EXPAND_CLOSE:iconPrefix+"arrow-right",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",CASCADER_NODE_OPEN:iconPrefix+"arrow-right",CASCADER_NODE_CLOSE:iconPrefix+"arrow-right",CASCADER_NODE_LOADED:iconPrefix+"spinner roll",LIST_DRAG:iconPrefix+"drag-handle",LIST_DRAG_STATUS_NODE:iconPrefix+"sort",LIST_DRAG_DISABLED:iconPrefix+"no-drop"}),exports.default=_core.VxeUI);
|
package/lib/ui/src/dom.js
CHANGED
|
@@ -218,18 +218,19 @@ function updatePanelPlacement(targetElem, panelElem, options) {
|
|
|
218
218
|
var arrowLeft = '';
|
|
219
219
|
var stys = {};
|
|
220
220
|
if (panelElem && targetElem) {
|
|
221
|
+
var bodyEl = document.body;
|
|
221
222
|
var parentEl = panelElem.parentElement;
|
|
222
|
-
var parentWrapperEl = parentEl ===
|
|
223
|
+
var parentWrapperEl = parentEl === bodyEl ? document.documentElement : parentEl;
|
|
223
224
|
if (parentWrapperEl) {
|
|
224
225
|
var targetWidth = targetElem.offsetWidth;
|
|
225
226
|
var targetHeight = targetElem.offsetHeight;
|
|
226
|
-
var panelHeight = panelElem.offsetHeight;
|
|
227
227
|
var panelWidth = panelElem.offsetWidth;
|
|
228
|
+
var panelHeight = panelElem.offsetHeight;
|
|
228
229
|
var parentWrapperRect = parentWrapperEl.getBoundingClientRect();
|
|
229
230
|
var panelRect = panelElem.getBoundingClientRect();
|
|
230
231
|
var targetRect = targetElem.getBoundingClientRect();
|
|
231
|
-
var visibleHeight =
|
|
232
|
-
var visibleWidth =
|
|
232
|
+
var visibleHeight = bodyEl.clientHeight;
|
|
233
|
+
var visibleWidth = bodyEl.clientWidth;
|
|
233
234
|
var offsetLeft = parentWrapperRect.left;
|
|
234
235
|
var offsetTop = parentWrapperRect.top;
|
|
235
236
|
var targetLeft = targetRect.left;
|
|
@@ -244,7 +245,9 @@ function updatePanelPlacement(targetElem, panelElem, options) {
|
|
|
244
245
|
} else if (!placement) {
|
|
245
246
|
if (defaultPlacement === 'top') {
|
|
246
247
|
panelPlacement = 'top';
|
|
247
|
-
|
|
248
|
+
if (!defaultTop) {
|
|
249
|
+
top = targetTop - panelHeight;
|
|
250
|
+
}
|
|
248
251
|
// 如果上面不够放,则向下
|
|
249
252
|
if (top < marginSize) {
|
|
250
253
|
panelPlacement = 'bottom';
|
package/lib/ui/src/dom.min.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
Object.defineProperty(exports,"__esModule",{value:!0}),exports.addClass=addClass,exports.getAbsolutePos=getAbsolutePos,exports.getDomNode=getDomNode,exports.getEventTargetNode=getEventTargetNode,exports.getOffsetPos=getOffsetPos,exports.getPaddingLeftRightSize=getPaddingLeftRightSize,exports.getPaddingTopBottomSize=getPaddingTopBottomSize,exports.getPopupAppendElement=getPopupAppendElement,exports.getPopupContainer=getPopupContainer,exports.getTpImg=getTpImg,exports.hasClass=hasClass,exports.hasControlKey=hasControlKey,exports.initTpImg=initTpImg,exports.isNodeElement=isNodeElement,exports.isPx=isPx,exports.isScale=isScale,exports.removeClass=removeClass,exports.scrollToView=scrollToView,exports.toCssUnit=toCssUnit,exports.triggerEvent=triggerEvent,exports.updatePanelPlacement=updatePanelPlacement;var tpImgEl,_xeUtils=_interopRequireDefault(require("xe-utils"));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function initTpImg(){return tpImgEl||((tpImgEl=new Image).src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAQAAAC1HAwCAAAAC0lEQVR42mNkYAAAAAYAAjCB0C8AAAAASUVORK5CYII="),tpImgEl}function getTpImg(){return tpImgEl||initTpImg()}var reClsMap={};function getClsRE(e){return reClsMap[e]||(reClsMap[e]=new RegExp("(?:^|\\s)".concat(e,"(?!\\S)"),"g")),reClsMap[e]}function getNodeOffset(e,t,o){if(e){var n=e.parentNode;if(o.top+=e.offsetTop,o.left+=e.offsetLeft,n&&n!==document.documentElement&&n!==document.body&&(o.top-=n.scrollTop,o.left-=n.scrollLeft),(!t||e!==t&&e.offsetParent!==t)&&e.offsetParent)return getNodeOffset(e.offsetParent,t,o)}return o}function isPx(e){return e&&/^\d+(\.\d+)?(px)?$/.test(e)}function isScale(e){return e&&/^\d+(\.\d+)?%$/.test(e)}function hasClass(e,t){return!!e&&(e.classList?e.classList.contains(t):!!(e.className&&e.className.match&&e.className.match(getClsRE(t))))}function removeClass(e,t){e&&hasClass(e,t)&&(e.className=e.className.replace(getClsRE(t),""))}function addClass(e,t){e&&!hasClass(e,t)&&(removeClass(e,t),e.className="".concat(e.className," ").concat(t))}function hasControlKey(e){return e.ctrlKey||e.metaKey}function toCssUnit(e){var t=1<arguments.length&&void 0!==arguments[1]?arguments[1]:"px";return _xeUtils.default.isNumber(e)||/^\d+$/.test("".concat(e))?"".concat(e).concat(t):"".concat(e||"")}function getDomNode(){var e=document.documentElement,t=document.body;return{scrollTop:e.scrollTop||t.scrollTop,scrollLeft:e.scrollLeft||t.scrollLeft,visibleHeight:e.clientHeight||t.clientHeight,visibleWidth:e.clientWidth||t.clientWidth}}function getEventTargetNode(e,t,o,n){for(var s,i=e.target.shadowRoot&&e.composed&&e.composedPath()[0]||e.target;i&&i.nodeType&&i!==document;){if(o&&hasClass(i,o)&&(!n||n(i)))s=i;else if(i===t)return{flag:!o||!!s,container:t,targetElem:s};i=i.parentNode}return{flag:!1}}function getOffsetPos(e,t){return getNodeOffset(e,t,{left:0,top:0})}function getAbsolutePos(e){var e=e.getBoundingClientRect(),t=e.top,e=e.left,o=getDomNode();return{boundingTop:t,top:o.scrollTop+t,boundingLeft:e,left:o.scrollLeft+e,visibleHeight:o.visibleHeight,visibleWidth:o.visibleWidth}}function getPaddingTopBottomSize(e){return e?(e=getComputedStyle(e),_xeUtils.default.toNumber(e.paddingTop)+_xeUtils.default.toNumber(e.paddingBottom)):0}function getPaddingLeftRightSize(e){return e?(e=getComputedStyle(e),_xeUtils.default.toNumber(e.paddingLeft)+_xeUtils.default.toNumber(e.paddingRight)):0}var scrollIntoViewIfNeeded="scrollIntoViewIfNeeded",scrollIntoView="scrollIntoView";function scrollToView(e){e&&(e[scrollIntoViewIfNeeded]?e[scrollIntoViewIfNeeded]():e[scrollIntoView]&&e[scrollIntoView]())}function triggerEvent(e,t){e&&e.dispatchEvent(new Event(t))}function isNodeElement(e){return e&&1===e.nodeType}function updatePanelPlacement(e,t,o){var n,s,i,l,r,a,d,p,u,c,o=Object.assign({teleportTo:!1,marginSize:18,isMinWidth:!0},o),f=o.defaultTop,g=o.defaultLeft,m=o.placement,C=o.defaultPlacement,h=o.teleportTo,x=o.marginSize,o=o.isMinWidth,A="bottom",N="",P="",b=0,E="",v="",T={};return t&&e&&(a=(
|
|
1
|
+
Object.defineProperty(exports,"__esModule",{value:!0}),exports.addClass=addClass,exports.getAbsolutePos=getAbsolutePos,exports.getDomNode=getDomNode,exports.getEventTargetNode=getEventTargetNode,exports.getOffsetPos=getOffsetPos,exports.getPaddingLeftRightSize=getPaddingLeftRightSize,exports.getPaddingTopBottomSize=getPaddingTopBottomSize,exports.getPopupAppendElement=getPopupAppendElement,exports.getPopupContainer=getPopupContainer,exports.getTpImg=getTpImg,exports.hasClass=hasClass,exports.hasControlKey=hasControlKey,exports.initTpImg=initTpImg,exports.isNodeElement=isNodeElement,exports.isPx=isPx,exports.isScale=isScale,exports.removeClass=removeClass,exports.scrollToView=scrollToView,exports.toCssUnit=toCssUnit,exports.triggerEvent=triggerEvent,exports.updatePanelPlacement=updatePanelPlacement;var tpImgEl,_xeUtils=_interopRequireDefault(require("xe-utils"));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function initTpImg(){return tpImgEl||((tpImgEl=new Image).src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAQAAAC1HAwCAAAAC0lEQVR42mNkYAAAAAYAAjCB0C8AAAAASUVORK5CYII="),tpImgEl}function getTpImg(){return tpImgEl||initTpImg()}var reClsMap={};function getClsRE(e){return reClsMap[e]||(reClsMap[e]=new RegExp("(?:^|\\s)".concat(e,"(?!\\S)"),"g")),reClsMap[e]}function getNodeOffset(e,t,o){if(e){var n=e.parentNode;if(o.top+=e.offsetTop,o.left+=e.offsetLeft,n&&n!==document.documentElement&&n!==document.body&&(o.top-=n.scrollTop,o.left-=n.scrollLeft),(!t||e!==t&&e.offsetParent!==t)&&e.offsetParent)return getNodeOffset(e.offsetParent,t,o)}return o}function isPx(e){return e&&/^\d+(\.\d+)?(px)?$/.test(e)}function isScale(e){return e&&/^\d+(\.\d+)?%$/.test(e)}function hasClass(e,t){return!!e&&(e.classList?e.classList.contains(t):!!(e.className&&e.className.match&&e.className.match(getClsRE(t))))}function removeClass(e,t){e&&hasClass(e,t)&&(e.className=e.className.replace(getClsRE(t),""))}function addClass(e,t){e&&!hasClass(e,t)&&(removeClass(e,t),e.className="".concat(e.className," ").concat(t))}function hasControlKey(e){return e.ctrlKey||e.metaKey}function toCssUnit(e){var t=1<arguments.length&&void 0!==arguments[1]?arguments[1]:"px";return _xeUtils.default.isNumber(e)||/^\d+$/.test("".concat(e))?"".concat(e).concat(t):"".concat(e||"")}function getDomNode(){var e=document.documentElement,t=document.body;return{scrollTop:e.scrollTop||t.scrollTop,scrollLeft:e.scrollLeft||t.scrollLeft,visibleHeight:e.clientHeight||t.clientHeight,visibleWidth:e.clientWidth||t.clientWidth}}function getEventTargetNode(e,t,o,n){for(var s,i=e.target.shadowRoot&&e.composed&&e.composedPath()[0]||e.target;i&&i.nodeType&&i!==document;){if(o&&hasClass(i,o)&&(!n||n(i)))s=i;else if(i===t)return{flag:!o||!!s,container:t,targetElem:s};i=i.parentNode}return{flag:!1}}function getOffsetPos(e,t){return getNodeOffset(e,t,{left:0,top:0})}function getAbsolutePos(e){var e=e.getBoundingClientRect(),t=e.top,e=e.left,o=getDomNode();return{boundingTop:t,top:o.scrollTop+t,boundingLeft:e,left:o.scrollLeft+e,visibleHeight:o.visibleHeight,visibleWidth:o.visibleWidth}}function getPaddingTopBottomSize(e){return e?(e=getComputedStyle(e),_xeUtils.default.toNumber(e.paddingTop)+_xeUtils.default.toNumber(e.paddingBottom)):0}function getPaddingLeftRightSize(e){return e?(e=getComputedStyle(e),_xeUtils.default.toNumber(e.paddingLeft)+_xeUtils.default.toNumber(e.paddingRight)):0}var scrollIntoViewIfNeeded="scrollIntoViewIfNeeded",scrollIntoView="scrollIntoView";function scrollToView(e){e&&(e[scrollIntoViewIfNeeded]?e[scrollIntoViewIfNeeded]():e[scrollIntoView]&&e[scrollIntoView]())}function triggerEvent(e,t){e&&e.dispatchEvent(new Event(t))}function isNodeElement(e){return e&&1===e.nodeType}function updatePanelPlacement(e,t,o){var n,s,i,l,r,a,d,p,u,c,o=Object.assign({teleportTo:!1,marginSize:18,isMinWidth:!0},o),f=o.defaultTop,g=o.defaultLeft,m=o.placement,C=o.defaultPlacement,h=o.teleportTo,x=o.marginSize,o=o.isMinWidth,A="bottom",N="",P="",b=0,E="",v="",T={};return t&&e&&(a=document.body,p=(p=t.parentElement)===a?document.documentElement:p)&&(n=e.offsetWidth,s=e.offsetHeight,i=t.offsetWidth,l=t.offsetHeight,p=p.getBoundingClientRect(),t=t.getBoundingClientRect(),c=e.getBoundingClientRect(),r=a.clientHeight,a=a.clientWidth,d=p.left,p=p.top,u=c.left,c=c.top,E=e.offsetWidth,h?(N=f||c+s,"top"===m?(A="top",N=c-l):m||("top"===C?(A="top",(N=f?N:c-l)<x&&(A="bottom",N=c+s),r<N+l+x&&(A="top",N=c-l)):(r<N+l+x&&(A="top",N=c-l),N<x&&(A="bottom",N=c+s))),a<(b=g||u)+i+x&&(b-=b+i+x-a),b<x&&(b=x),N-=p,b-=d):("top"===m?(A="top",P=s):m||r<c+(N=s)+l+x&&x<c-s-l&&(A="top",N="",P=s),t.left+t.width+x>a&&(b=-(t.left+t.width+x-a))),_xeUtils.default.isNumber(N)&&(T.top=toCssUnit(N)),_xeUtils.default.isNumber(P)&&(T.bottom=toCssUnit(P)),_xeUtils.default.isNumber(b)&&(T.left=toCssUnit(b)),o&&_xeUtils.default.isNumber(E)&&(T.minWidth=toCssUnit(E)),b===u?n<=i&&(v=n/2):b<u&&(v=u+n<b+i?u-b+n/2:u-b+(i-(u-b))/2)),{top:N||0,bottom:P||0,left:b||0,arrowLeft:v||0,style:T,placement:A}}function getPopupContainer(e){return(e&&_xeUtils.default.isFunction(e)?e({}):e)||"body"}function getPopupAppendElement(e){e=getPopupContainer(e);return _xeUtils.default.isString(e)?document.querySelector(e)||document.body:e}
|
package/lib/ui/src/log.js
CHANGED
|
@@ -7,7 +7,7 @@ exports.createComponentLog = createComponentLog;
|
|
|
7
7
|
exports.warnLog = exports.errLog = void 0;
|
|
8
8
|
var _core = require("@vxe-ui/core");
|
|
9
9
|
var log = _core.VxeUI.log;
|
|
10
|
-
var uiVersion = "ui v".concat("3.17.
|
|
10
|
+
var uiVersion = "ui v".concat("3.17.11");
|
|
11
11
|
function createComponentLog(name) {
|
|
12
12
|
var tableVersion = _core.VxeUI.tableVersion ? "table v".concat(_core.VxeUI.tableVersion) : '';
|
|
13
13
|
var ganttVersion = _core.VxeUI.ganttVersion ? "gantt v".concat(_core.VxeUI.ganttVersion) : '';
|
package/lib/ui/src/log.min.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
Object.defineProperty(exports,"__esModule",{value:!0}),exports.createComponentLog=createComponentLog,exports.warnLog=exports.errLog=void 0;var _core=require("@vxe-ui/core"),log=_core.VxeUI.log,uiVersion="ui v".concat("3.17.
|
|
1
|
+
Object.defineProperty(exports,"__esModule",{value:!0}),exports.createComponentLog=createComponentLog,exports.warnLog=exports.errLog=void 0;var _core=require("@vxe-ui/core"),log=_core.VxeUI.log,uiVersion="ui v".concat("3.17.11");function createComponentLog(e){var r=_core.VxeUI.tableVersion?"table v".concat(_core.VxeUI.tableVersion):"",o=_core.VxeUI.ganttVersion?"gantt v".concat(_core.VxeUI.ganttVersion):"",n=_core.VxeUI.designVersion?"design v".concat(_core.VxeUI.designVersion):"",r=[uiVersion,r,o,n].filter(function(e){return e}).join(" ");return{warnLog:log.create("warn",r+"] ["+e),errLog:log.create("error",r+"] ["+e)}}var warnLog=exports.warnLog=log.create("warn",uiVersion),errLog=exports.errLog=log.create("error",uiVersion);
|
package/package.json
CHANGED
|
@@ -249,17 +249,17 @@ export default /* define-vxe-component start */ defineVxeComponent({
|
|
|
249
249
|
const targetTop = targetRect.top
|
|
250
250
|
|
|
251
251
|
// 支持特殊定位逻辑
|
|
252
|
-
let left =
|
|
253
|
-
let top =
|
|
252
|
+
let left = 0
|
|
253
|
+
let top = 0
|
|
254
254
|
if (tipPos && (tipPos.oLeft || tipPos.oTop)) {
|
|
255
|
+
left = targetLeft
|
|
256
|
+
top = targetTop + targetHeight
|
|
255
257
|
if (isArrow) {
|
|
256
258
|
left = left + Math.max(8, Math.min(targetWidth - 8, tipPos.oLeft)) - panelWidth / 2
|
|
257
259
|
} else {
|
|
258
260
|
left = tipPos.x + 1
|
|
259
261
|
top = tipPos.y + 1
|
|
260
262
|
}
|
|
261
|
-
} else {
|
|
262
|
-
left = targetLeft + (targetWidth - panelWidth) / 2
|
|
263
263
|
}
|
|
264
264
|
|
|
265
265
|
const ppObj = updatePanelPlacement(targetElem, panelElem, {
|
package/packages/ui/src/dom.ts
CHANGED
|
@@ -192,24 +192,25 @@ export function updatePanelPlacement (targetElem: HTMLElement | null | undefined
|
|
|
192
192
|
let panelPlacement: 'top' | 'bottom' = 'bottom'
|
|
193
193
|
let top: number | '' = ''
|
|
194
194
|
let bottom: number | '' = ''
|
|
195
|
-
let left
|
|
195
|
+
let left = 0
|
|
196
196
|
let minWidth: number | '' = ''
|
|
197
197
|
let arrowLeft: number | '' = ''
|
|
198
198
|
const stys: Record<string, string> = {}
|
|
199
199
|
if (panelElem && targetElem) {
|
|
200
|
+
const bodyEl = document.body
|
|
200
201
|
const parentEl = panelElem.parentElement
|
|
201
|
-
const parentWrapperEl = parentEl ===
|
|
202
|
+
const parentWrapperEl = parentEl === bodyEl ? document.documentElement : parentEl
|
|
202
203
|
if (parentWrapperEl) {
|
|
203
204
|
const targetWidth = targetElem.offsetWidth
|
|
204
205
|
const targetHeight = targetElem.offsetHeight
|
|
205
|
-
const panelHeight = panelElem.offsetHeight
|
|
206
206
|
const panelWidth = panelElem.offsetWidth
|
|
207
|
+
const panelHeight = panelElem.offsetHeight
|
|
207
208
|
|
|
208
209
|
const parentWrapperRect = parentWrapperEl.getBoundingClientRect()
|
|
209
210
|
const panelRect = panelElem.getBoundingClientRect()
|
|
210
211
|
const targetRect = targetElem.getBoundingClientRect()
|
|
211
|
-
const visibleHeight =
|
|
212
|
-
const visibleWidth =
|
|
212
|
+
const visibleHeight = bodyEl.clientHeight
|
|
213
|
+
const visibleWidth = bodyEl.clientWidth
|
|
213
214
|
|
|
214
215
|
const offsetLeft = parentWrapperRect.left
|
|
215
216
|
const offsetTop = parentWrapperRect.top
|
|
@@ -227,7 +228,9 @@ export function updatePanelPlacement (targetElem: HTMLElement | null | undefined
|
|
|
227
228
|
} else if (!placement) {
|
|
228
229
|
if (defaultPlacement === 'top') {
|
|
229
230
|
panelPlacement = 'top'
|
|
230
|
-
|
|
231
|
+
if (!defaultTop) {
|
|
232
|
+
top = targetTop - panelHeight
|
|
233
|
+
}
|
|
231
234
|
// 如果上面不够放,则向下
|
|
232
235
|
if (top < marginSize) {
|
|
233
236
|
panelPlacement = 'bottom'
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|