vxe-pc-ui 3.15.1 → 3.15.2
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/date-panel/src/util.js +12 -0
- package/es/date-picker/src/date-picker.js +81 -10
- package/es/date-range-picker/src/date-range-picker.js +20 -8
- package/es/number-input/src/number-input.js +2 -3
- package/es/splitter/src/splitter.js +6 -1
- package/es/ui/index.js +1 -1
- package/es/ui/src/log.js +1 -1
- package/lib/date-panel/src/util.js +13 -0
- package/lib/date-panel/src/util.min.js +1 -1
- package/lib/date-picker/src/date-picker.js +79 -9
- package/lib/date-picker/src/date-picker.min.js +1 -1
- package/lib/date-range-picker/src/date-range-picker.js +18 -8
- package/lib/date-range-picker/src/date-range-picker.min.js +1 -1
- package/lib/index.umd.js +119 -23
- package/lib/index.umd.min.js +1 -1
- package/lib/number-input/src/number-input.js +2 -3
- package/lib/splitter/src/splitter.js +6 -1
- package/lib/splitter/src/splitter.min.js +1 -1
- package/lib/ui/index.js +1 -1
- package/lib/ui/index.min.js +1 -1
- package/lib/ui/src/log.js +1 -1
- package/lib/ui/src/log.min.js +1 -1
- package/package.json +1 -1
- package/packages/date-panel/src/util.ts +13 -0
- package/packages/date-picker/src/date-picker.ts +82 -10
- package/packages/date-range-picker/src/date-range-picker.ts +18 -8
- package/packages/number-input/src/number-input.ts +2 -6
- package/packages/splitter/src/splitter.ts +6 -1
- package/types/components/date-picker.d.ts +18 -0
- package/types/components/date-range-picker.d.ts +4 -0
- package/types/components/splitter.d.ts +1 -0
- package/types/components/table.d.ts +33 -4
- /package/es/icon/{iconfont.1781675403709.ttf → iconfont.1781753586592.ttf} +0 -0
- /package/es/icon/{iconfont.1781675403709.woff → iconfont.1781753586592.woff} +0 -0
- /package/es/icon/{iconfont.1781675403709.woff2 → iconfont.1781753586592.woff2} +0 -0
- /package/es/{iconfont.1781675403709.ttf → iconfont.1781753586592.ttf} +0 -0
- /package/es/{iconfont.1781675403709.woff → iconfont.1781753586592.woff} +0 -0
- /package/es/{iconfont.1781675403709.woff2 → iconfont.1781753586592.woff2} +0 -0
- /package/lib/icon/style/{iconfont.1781675403709.ttf → iconfont.1781753586592.ttf} +0 -0
- /package/lib/icon/style/{iconfont.1781675403709.woff → iconfont.1781753586592.woff} +0 -0
- /package/lib/icon/style/{iconfont.1781675403709.woff2 → iconfont.1781753586592.woff2} +0 -0
- /package/lib/{iconfont.1781675403709.ttf → iconfont.1781753586592.ttf} +0 -0
- /package/lib/{iconfont.1781675403709.woff → iconfont.1781753586592.woff} +0 -0
- /package/lib/{iconfont.1781675403709.woff2 → iconfont.1781753586592.woff2} +0 -0
|
@@ -80,7 +80,6 @@ var _default2 = exports.default = /* define-vxe-component start */(0, _comp.defi
|
|
|
80
80
|
return (0, _ui.getConfig)().numberInput.size || (0, _ui.getConfig)().size;
|
|
81
81
|
}
|
|
82
82
|
},
|
|
83
|
-
// number、integer、float
|
|
84
83
|
min: {
|
|
85
84
|
type: [String, Number],
|
|
86
85
|
default: null
|
|
@@ -109,14 +108,14 @@ var _default2 = exports.default = /* define-vxe-component start */(0, _comp.defi
|
|
|
109
108
|
}
|
|
110
109
|
},
|
|
111
110
|
controlConfig: Object,
|
|
112
|
-
// float
|
|
111
|
+
// number、float、amount
|
|
113
112
|
roundingMode: {
|
|
114
113
|
type: String,
|
|
115
114
|
default: function _default() {
|
|
116
115
|
return (0, _ui.getConfig)().numberInput.roundingMode;
|
|
117
116
|
}
|
|
118
117
|
},
|
|
119
|
-
// float
|
|
118
|
+
// float、amount
|
|
120
119
|
digits: {
|
|
121
120
|
type: [String, Number],
|
|
122
121
|
default: null
|
|
@@ -64,7 +64,8 @@ var _default2 = exports.default = /* define-vxe-component start */(0, _comp.defi
|
|
|
64
64
|
staticItems: [],
|
|
65
65
|
itemList: [],
|
|
66
66
|
barWidth: 0,
|
|
67
|
-
barHeight: 0
|
|
67
|
+
barHeight: 0,
|
|
68
|
+
resizeFlag: 0
|
|
68
69
|
};
|
|
69
70
|
var internalData = {
|
|
70
71
|
wrapperWidth: 0,
|
|
@@ -595,6 +596,7 @@ var _default2 = exports.default = /* define-vxe-component start */(0, _comp.defi
|
|
|
595
596
|
document.onmousemove = function (evnt) {
|
|
596
597
|
evnt.preventDefault();
|
|
597
598
|
handleDrag(evnt);
|
|
599
|
+
reactData.resizeFlag++;
|
|
598
600
|
};
|
|
599
601
|
document.onmouseup = function (evnt) {
|
|
600
602
|
document.onmousemove = null;
|
|
@@ -611,6 +613,7 @@ var _default2 = exports.default = /* define-vxe-component start */(0, _comp.defi
|
|
|
611
613
|
offsetWidth: targetOffsetWidth
|
|
612
614
|
}, evnt);
|
|
613
615
|
$xeSplitter.recalculate();
|
|
616
|
+
reactData.resizeFlag++;
|
|
614
617
|
};
|
|
615
618
|
if (rsSplitterLineEl) {
|
|
616
619
|
rsSplitterLineEl.style.display = 'block';
|
|
@@ -626,6 +629,7 @@ var _default2 = exports.default = /* define-vxe-component start */(0, _comp.defi
|
|
|
626
629
|
handleItemActionEvent: function handleItemActionEvent(evnt, prevItem, nextItem, isNext) {
|
|
627
630
|
var $xeSplitter = this;
|
|
628
631
|
var props = $xeSplitter;
|
|
632
|
+
var reactData = $xeSplitter.reactData;
|
|
629
633
|
var vertical = props.vertical;
|
|
630
634
|
var expanded = false;
|
|
631
635
|
var item = prevItem;
|
|
@@ -669,6 +673,7 @@ var _default2 = exports.default = /* define-vxe-component start */(0, _comp.defi
|
|
|
669
673
|
}, evnt);
|
|
670
674
|
}
|
|
671
675
|
$xeSplitter.recalculate();
|
|
676
|
+
reactData.resizeFlag++;
|
|
672
677
|
},
|
|
673
678
|
handlePrevActionDblclickEvent: function handlePrevActionDblclickEvent(evnt) {
|
|
674
679
|
var $xeSplitter = this;
|
|
@@ -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"),_vn=require("../../ui/src/vn"),_dom=require("../../ui/src/dom"),_utils=require("../../ui/src/utils"),_log=require("../../ui/src/log");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 _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:"VxeSplitter",mixins:[_ui.globalMixins.sizeMixin],props:{width:[Number,String],height:[Number,String],vertical:{type:Boolean,default:function(){return(0,_ui.getConfig)().splitter.vertical}},border:{type:Boolean,default:function(){return(0,_ui.getConfig)().splitter.border}},padding:{type:Boolean,default:function(){return(0,_ui.getConfig)().splitter.padding}},resize:{type:Boolean,default:function(){return(0,_ui.getConfig)().splitter.resize}},items:Array,itemConfig:Object,barConfig:Object,resizeConfig:Object,actionConfig:Object,size:{type:String,default:function(){return(0,_ui.getConfig)().splitter.size||(0,_ui.getConfig)().size}}},data:function(){return{xID:_xeUtils.default.uniqueId(),reactData:{staticItems:[],itemList:[],barWidth:0,barHeight:0},internalData:{wrapperWidth:0,wrapperHeight:0},reFlag:0}},provide:function(){return{$xeSplitter:this}},computed:Object.assign(Object.assign({},{}),{computeItemOpts:function(){return Object.assign({},(0,_ui.getConfig)().splitter.itemConfig,this.itemConfig)},computeBarOpts:function(){return Object.assign({},(0,_ui.getConfig)().splitter.barConfig,this.barConfig)},computeResizeOpts:function(){return Object.assign({},(0,_ui.getConfig)().splitter.resizeConfig,this.resizeConfig)},computeActionOpts:function(){return Object.assign({},(0,_ui.getConfig)().splitter.actionConfig,this.actionConfig)},computeIsFoldNext:function(){return"next"===this.computeActionOpts.direction},computeVisibleItems:function(){return this.reactData.itemList.filter(function(t){return t.isExpand})},computeAutoItems:function(){var t=this.reactData,e=this.vertical,i=[];return t.itemList.forEach(e?function(t){t.height||i.push(t)}:function(t){t.width||i.push(t)}),{autoItems:i}},computeBarStyle:function(){var t=this.computeBarOpts,e=t.width,t=t.height,i={};return t&&(i.height=(0,_dom.toCssUnit)(t)),e&&(i.width=(0,_dom.toCssUnit)(e)),i},computeSItemSize:function(){return this.reactData.staticItems.length}}),watch:{items:function(t){this.loadItem(t||[])},computeSItemSize:function(){var t=this.reactData,e=this.computeActionOpts,i=e.showPrevButton,e=e.showNextButton;this.items&&this.items.length&&(0,_log.errLog)("vxe.error.errConflicts",["<vxe-splitter-panel ...>","items"]),t.itemList=t.staticItems||[],(i||e)&&2<t.itemList.length&&(0,_log.errLog)("vxe.error.modelConflicts",["[splitter] action-config.showPrevButton | action-config.showNextButton","<vxe-splitter-panel ...> Only supports 2 panel"]),t.itemList.forEach(function(t){t.showAction&&(0,_log.warnLog)("vxe.error.removeProp",["[splitter] show-action"])}),this.recalculate()}},methods:{dispatchEvent:function(t,e,i){this.$emit(t,(0,_ui.createEvent)(i,{$splitter:this},e))},callSlot:function(t,e){var i=this.$scopedSlots;return t&&(_xeUtils.default.isString(t)&&(t=i[t]||null),_xeUtils.default.isFunction(t))?(0,_vn.getSlotVNs)(t(e)):[]},reset:function(){return this.reactData.itemList.forEach(function(t){t.isExpand=!0,t.foldHeight=0,t.foldWidth=0,t.resizeHeight=0,t.resizeWidth=0}),this.$nextTick()},handleLoadItem:function(t,e){var i=this.$scopedSlots,n=this.reactData,r=n.staticItems,s={isExpand:!0,renderWidth:0,resizeWidth:0,foldWidth:0,renderHeight:0,resizeHeight:0,foldHeight:0};return n.itemList=t.map(function(t){return t.slots&&_xeUtils.default.each(t.slots,function(t){_xeUtils.default.isFunction(t)||i[t]||(0,_log.errLog)("vxe.error.notSlot",["[splitter] ".concat(t)])}),Object.assign({},e?null:s,t,e?s:null,{id:_xeUtils.default.uniqueId()})}),r.length&&(0,_log.errLog)("vxe.error.errConflicts",["<vxe-splitter-panel ...>","items"]),this.recalculate()},loadItem:function(t){return this.handleLoadItem(t||[],!1)},reloadItem:function(t){return this.handleLoadItem(t||[],!0)},handleItemByName:function(t){for(var e=this.reactData.itemList,i=-1,n=null,r=null,s=null,o=0;o<e.length;o++){var l=e[o];if(l.name===t){n=l,r=e[(i=o)-1]||null,s=e[o+1]||null;break}}return{index:i,currItem:n,prevItem:r,nextItem:s}},setItemExpand:function(t,e){var i,n,t=this.handleItemByName(t);return t&&(i=t.currItem,n=t.prevItem,t=t.nextItem,i)&&(e?!i.isExpand:i.isExpand)&&(t?t.isExpand&&this.handleItemActionEvent(null,i,t,!1):n&&n.isExpand&&this.handleItemActionEvent(null,n,i,!0)),this.$nextTick()},toggleItemExpand:function(t){var e=this.handleItemByName(t);if(e){e=e.currItem;if(e)return this.setItemExpand(t,!e.isExpand)}return this.$nextTick()},getItemVisible:function(t){var e=this.handleItemByName(t);if(e){e=e.currItem;if(e)return this.setItemExpand(t,!e.isExpand)}return!1},recalculate:function(){var p=this,m=p,g=p.reactData,v=p.internalData;return p.$nextTick().then(function(){var t,n,r,e,i,s,o,l,a,c,d=m.vertical,u=g.itemList,f=p.$refs.refElem,h=p.$refs.refBarInfoElem;f&&(t=f.clientWidth,f=f.clientHeight,t)&&f&&(h&&(g.barWidth=h.offsetWidth,g.barHeight=h.offsetHeight),n=t-(d?0:g.barWidth*(u.length-1)),r=f-(d?g.barHeight*(u.length-1):0),h=p.computeItemOpts,e=_xeUtils.default.toNumber(h.minWidth),i=_xeUtils.default.toNumber(h.minHeight),s=[],d?(o=0,u.forEach(function(t){var e=t.height,i=0;e?(i=(0,_dom.isScale)(e)?r*_xeUtils.default.toNumber(e)/100:_xeUtils.default.toNumber(e),t.renderHeight=i):s.push(t),o+=i}),s.length&&(l=(r-o)/s.length,s.forEach(function(t){t.renderHeight=Math.max(_xeUtils.default.toNumber((0,_utils.getGlobalDefaultConfig)(t.minHeight,i)),l)}))):(a=0,u.forEach(function(t){var e=t.width,i=0;e?(i=(0,_dom.isScale)(e)?n*_xeUtils.default.toNumber(e)/100:_xeUtils.default.toNumber(e),t.renderWidth=i):s.push(t),a+=i}),s.length&&(c=(n-a)/s.length,s.forEach(function(t){t.renderWidth=Math.max(_xeUtils.default.toNumber((0,_utils.getGlobalDefaultConfig)(t.minWidth,e)),c)}))),v.wrapperWidth=n,v.wrapperHeight=r)})},dragEvent:function(t){var e,i,n,r,s,o,l,a,c,d,u,f,h,p,U,m,g,v,x,b,_,E,k,B,y,I,z,C,H,A,S,W,w,O,N=this,P=N.reactData,D=N.resize,L=N.vertical,P=P.itemList;D&&(t.preventDefault(),h=(D=t.currentTarget).parentElement,e=N.$refs.refElem)&&(i=h.previousElementSibling,n=h.nextElementSibling,i)&&n&&(r=i.getAttribute("itemid"),s=n.getAttribute("itemid"),o=P.find(function(t){return t.id===r}),l=P.find(function(t){return t.id===s}),o)&&l&&(a=e.getBoundingClientRect(),h=D.getBoundingClientRect(),c=N.$refs.refResizableSplitterTip,d=c?c.children[0]:null,P=N.computeItemOpts,u=N.computeResizeOpts.immediate,D=_xeUtils.default.toNumber(P.minWidth),P=_xeUtils.default.toNumber(P.minHeight),f=Math.ceil(h.width-(t.clientX-h.left)),h=Math.ceil(t.clientY-h.top),p=i.offsetWidth,U=n.offsetWidth,y=_xeUtils.default.toNumber(o?(0,_utils.getGlobalDefaultConfig)(o.minWidth,D):D),D=_xeUtils.default.toNumber(l?(0,_utils.getGlobalDefaultConfig)(l.minWidth,D):D),m=i.offsetLeft+y-f,g=n.offsetLeft+n.offsetWidth-D-f,v=t.clientX-a.left,x=-1,_=b=0,E=v,k=i.offsetHeight,B=n.offsetHeight,y=_xeUtils.default.toNumber(o?(0,_utils.getGlobalDefaultConfig)(o.minHeight,P):P),D=_xeUtils.default.toNumber(l?(0,_utils.getGlobalDefaultConfig)(l.minHeight,P):P),I=i.offsetTop+y+h,z=n.offsetTop+n.offsetHeight-D+h,C=t.clientY-a.top,H=-1,S=A=0,W=C,w=function(t){var e,i,n,r;c&&(e=d?d.children[0]:null,i=d?d.children[1]:null,L?(n=0,e&&(H<0?e.style.display="none":(e.textContent="".concat(Math.floor(A),"px"),e.style.display="block",n=e.offsetWidth)),i&&(H<0?(i.textContent="".concat(Math.floor(S),"px"),i.style.display="block",n=i.offsetWidth):i.style.display="none"),(r=Math.max(1,t.clientX-a.left-n/2))>a.width-n-1&&(r=a.width-n-1),c.style.left="0",c.style.top="".concat(W,"px"),d&&(d.style.left="".concat(r,"px"))):(n=0,e&&(x<0?e.style.display="none":(e.textContent="".concat(Math.floor(b),"px"),e.style.display="block",n=e.offsetHeight)),i&&(x<0?(i.textContent="".concat(Math.floor(_),"px"),i.style.display="block",n=i.offsetHeight):i.style.display="none"),(r=Math.max(1,t.clientY-a.top-n/2))>a.height-n-1&&(r=a.height-n-1),c.style.top="0",c.style.left="".concat(E,"px"),d&&(d.style.top="".concat(r,"px"))))},O=function(t){L?(W=t.clientY-a.top,A=k+(H=(W=z<(W=W<I?I:W)?z:W)-C),S=B-H):(E=t.clientX-a.left,b=p+(x=(E=g<(E=E<m?m:E)?g:E)-v),_=U-x),u&&(L?(i.style.height=(0,_dom.toCssUnit)(A),n.style.height=(0,_dom.toCssUnit)(S)):(i.style.width=(0,_dom.toCssUnit)(b),n.style.width=(0,_dom.toCssUnit)(_))),c&&w(t),N.dispatchEvent("resize-drag",{prevItem:o,nextItem:l,offsetHeight:H,offsetWidth:x},t)},document.onmousemove=function(t){t.preventDefault(),O(t)},document.onmouseup=function(t){document.onmousemove=null,document.onmouseup=null,c&&(c.style.display=""),L?(o.resizeHeight=A,l.resizeHeight=S):(o.resizeWidth=b,l.resizeWidth=_),(0,_dom.removeClass)(e,"is--drag"),N.dispatchEvent("resize-end",{prevItem:o,nextItem:l,offsetHeight:H,offsetWidth:x},t),N.recalculate()},c&&(c.style.display="block",w(t)),O(t),(0,_dom.addClass)(e,"is--drag"),N.dispatchEvent("resize-start",{prevItem:o,nextItem:l},t))},handleItemActionEvent:function(t,e,i,n){var r=this.vertical,s=!1,o=e;n?(s=!(o=i).isExpand,i.isExpand=s):(s=!e.isExpand,e.isExpand=s),r?e.isExpand&&i.isExpand?(e.foldHeight=0,i.foldHeight=0):e.isExpand?(i.foldHeight=0,e.foldHeight=(e.resizeHeight||e.renderHeight)+(i.resizeHeight||i.renderHeight)):(e.foldHeight=0,i.foldHeight=(e.resizeHeight||e.renderHeight)+(i.resizeHeight||i.renderHeight)):e.isExpand&&i.isExpand?(e.foldWidth=0,i.foldWidth=0):e.isExpand?(i.foldWidth=0,e.foldWidth=(e.resizeWidth||e.renderWidth)+(i.resizeWidth||i.renderWidth)):(e.foldWidth=0,i.foldWidth=(e.resizeWidth||e.renderWidth)+(i.resizeWidth||i.renderWidth)),t&&this.dispatchEvent("toggle-expand",{prevItem:e,nextItem:i,expanded:s,item:o},t),this.recalculate()},handlePrevActionDblclickEvent:function(t){var e=this.reactData.itemList,i=this.computeActionOpts,n=t.currentTarget.parentElement.parentElement,r=n.previousElementSibling.getAttribute("itemid"),s=e.find(function(t){return t.id===r}),o=n.nextElementSibling.getAttribute("itemid"),n=e.find(function(t){return t.id===o});"dblclick"===i.trigger&&s&&n&&n.isExpand&&this.handleItemActionEvent(t,s,n,!1),this.dispatchEvent("action-dblclick",{prevItem:s,nextItem:n},t)},handlePrevActionClickEvent:function(t){var e=this.reactData.itemList,i=this.computeActionOpts,n=t.currentTarget.parentElement.parentElement,r=n.previousElementSibling.getAttribute("itemid"),s=e.find(function(t){return t.id===r}),o=n.nextElementSibling.getAttribute("itemid"),n=e.find(function(t){return t.id===o});"dblclick"!==i.trigger&&s&&n&&n.isExpand&&this.handleItemActionEvent(t,s,n,!1),this.dispatchEvent("action-click",{prevItem:s,nextItem:n},t)},handleNextActionDblclickEvent:function(t){var e=this.reactData.itemList,i=this.computeActionOpts,n=t.currentTarget.parentElement.parentElement,r=n.previousElementSibling.getAttribute("itemid"),s=e.find(function(t){return t.id===r}),o=n.nextElementSibling.getAttribute("itemid"),n=e.find(function(t){return t.id===o});"dblclick"===i.trigger&&s&&n&&s.isExpand&&this.handleItemActionEvent(t,s,n,!0),this.dispatchEvent("action-dblclick",{prevItem:s,nextItem:n},t)},handleNextActionClickEvent:function(t){var e=this.reactData.itemList,i=this.computeActionOpts,n=t.currentTarget.parentElement.parentElement,r=n.previousElementSibling.getAttribute("itemid"),s=e.find(function(t){return t.id===r}),o=n.nextElementSibling.getAttribute("itemid"),n=e.find(function(t){return t.id===o});"dblclick"!==i.trigger&&s&&n&&s.isExpand&&this.handleItemActionEvent(t,s,n,!0),this.dispatchEvent("action-click",{prevItem:s,nextItem:n},t)},handleGlobalResizeEvent:function(){this.recalculate()},getActionIcon:function(t,e,i){var n="SPLIT_TOP_ACTION",r="SPLIT_BOTTOM_ACTION",s="SPLIT_LEFT_ACTION",o="SPLIT_RIGHT_ACTION",l="";return(l=this.vertical?i?e.isExpand?r:n:t.isExpand?n:r:i?e.isExpand?o:s:t.isExpand?s:o)?(0,_ui.getIcon)()[l]:""},renderHandleBar:function(t,e,i){var n=this,r=n.reactData,s=n.border,o=n.resize,l=n.vertical,r=r.itemList,a=n.computeBarStyle,c=n.computeActionOpts,d=c.direction,u=_xeUtils.default.isBoolean(c.showPrevButton)?c.showPrevButton:r.some(function(t){return t.showAction}),c=_xeUtils.default.isBoolean(c.showNextButton)?c.showNextButton:"next"===d&&r.some(function(t){return t.showAction});return t("div",{class:["vxe-splitter-panel-handle",l?"is--vertical":"is--horizontal",n.computeResizeOpts.immediate?"is-resize--immediate":"is-resize--lazy",{"is--resize":o,"is--border":s}]},[t("div",{class:"vxe-splitter-panel-handle-bar",style:a,on:{mousedown:n.dragEvent}}),2===r.length?t("div",{class:"vxe-splitter-panel-action-btn-wrapper"},[u&&i.isExpand?t("div",{class:"vxe-splitter-panel-action-btn",on:{dblclick:n.handlePrevActionDblclickEvent,click:n.handlePrevActionClickEvent}},[t("i",{class:n.getActionIcon(e,i,!1)})]):(0,_ui.renderEmptyElement)(n),c&&e.isExpand?t("div",{class:"vxe-splitter-panel-action-btn",on:{dblclick:n.handleNextActionDblclickEvent,click:n.handleNextActionClickEvent}},[t("i",{class:n.getActionIcon(e,i,!0)})]):(0,_ui.renderEmptyElement)(n)]):(0,_ui.renderEmptyElement)(n)])},renderItems:function(d){var u=this,t=u.reactData,f=u.border,h=u.padding,p=u.resize,m=u.vertical,g=t.itemList,v=u.computeSize,x=u.computeResizeOpts.immediate,b=u.computeVisibleItems,_=u.computeAutoItems.autoItems,E=[];return g.forEach(function(t,e){var i=t.id,n=t.name,r=t.slots,s=t.isExpand,e=g[e+1],r=r?r.default:null,o={},l=s?t.foldWidth||t.resizeWidth||t.renderWidth:0,a=s?t.foldHeight||t.resizeHeight||t.renderHeight:0,c=(1===_.length&&(m?t.height||(a=0):t.width||(l=0)),!0);m?a&&1<b.length&&(o.height=(c=!1,_dom.toCssUnit)(a)):l&&1<b.length&&(o.width=(c=!1,_dom.toCssUnit)(l)),E.push(d("div",{attrs:{itemid:i},class:["vxe-splitter-panel",m?"is--vertical":"is--horizontal",x?"is-resize--immediate":"is-resize--lazy",_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty({},"size--".concat(v),v),"is--resize",p),"is--padding",h),"is--border",f),"is--height",a),"is--width",l),"is--visible",s),"is--hidden",!s),"is--fill",s&&c)],style:o},[d("div",{attrs:{itemid:i},class:"vxe-splitter-panel--wrapper"},[d("div",{class:"vxe-splitter-panel--inner"},r?u.callSlot(r,{name:n,isExpand:s}):[])])])),e&&E.push(u.renderHandleBar(d,t,e))}),d("div",{class:"vxe-splitter-wrapper"},E)},renderVN:function(t){var e=this,i=e.$scopedSlots,n=e.vertical,r=e.width,s=e.height,o=e.computeSize,l=e.computeResizeOpts,a=l.immediate,l=l.showTip,i=i.default,c={};return s&&(c.height=(0,_dom.toCssUnit)(s)),r&&(c.width=(0,_dom.toCssUnit)(r)),t("div",{ref:"refElem",class:["vxe-splitter",n?"is--vertical":"is--horizontal",a?"is-resize--immediate":"is-resize--lazy",_defineProperty({},"size--".concat(o),o)],style:c},[t("div",{class:"vxe-splitter-slots"},i?i({}):[]),e.renderItems(t),t("div",{ref:"refResizableSplitterTip",class:["vxe-splitter--resizable-splitter-tip",n?"is--vertical":"is--horizontal",a?"is-resize--immediate":"is-resize--lazy"]},l?[t("div",{class:"vxe-splitter--resizable-splitter-tip-number"},[t("div",{class:"vxe-splitter--resizable-splitter-number-prev"}),t("div",{class:"vxe-splitter--resizable-splitter-number-next"})])]:[]),t("div",{class:"vxe-splitter--render-vars"},[t("div",{ref:"refBarInfoElem",class:"vxe-splitter--handle-bar-info"})])])}},created:function(){_ui.globalEvents.on(this,"resize",this.handleGlobalResizeEvent)},mounted:function(){var t,e=this,i=e,n=e.$refs.refElem;n&&((t=_ui.globalResize.create(function(){e.recalculate()})).observe(n),this.$resize=t),i.items&&e.loadItem(i.items),e.computeActionOpts.direction&&(0,_log.errLog)("vxe.error.delProp",["[splitter] action-config.direction","action-config.showPrevButton | action-config.showNextButton"]),e.$nextTick(function(){e.recalculate()})},beforeDestroy:function(){this.$resize&&this.$resize.disconnect(),_ui.globalEvents.off(this,"resize")},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"),_vn=require("../../ui/src/vn"),_dom=require("../../ui/src/dom"),_utils=require("../../ui/src/utils"),_log=require("../../ui/src/log");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 _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:"VxeSplitter",mixins:[_ui.globalMixins.sizeMixin],props:{width:[Number,String],height:[Number,String],vertical:{type:Boolean,default:function(){return(0,_ui.getConfig)().splitter.vertical}},border:{type:Boolean,default:function(){return(0,_ui.getConfig)().splitter.border}},padding:{type:Boolean,default:function(){return(0,_ui.getConfig)().splitter.padding}},resize:{type:Boolean,default:function(){return(0,_ui.getConfig)().splitter.resize}},items:Array,itemConfig:Object,barConfig:Object,resizeConfig:Object,actionConfig:Object,size:{type:String,default:function(){return(0,_ui.getConfig)().splitter.size||(0,_ui.getConfig)().size}}},data:function(){return{xID:_xeUtils.default.uniqueId(),reactData:{staticItems:[],itemList:[],barWidth:0,barHeight:0,resizeFlag:0},internalData:{wrapperWidth:0,wrapperHeight:0},reFlag:0}},provide:function(){return{$xeSplitter:this}},computed:Object.assign(Object.assign({},{}),{computeItemOpts:function(){return Object.assign({},(0,_ui.getConfig)().splitter.itemConfig,this.itemConfig)},computeBarOpts:function(){return Object.assign({},(0,_ui.getConfig)().splitter.barConfig,this.barConfig)},computeResizeOpts:function(){return Object.assign({},(0,_ui.getConfig)().splitter.resizeConfig,this.resizeConfig)},computeActionOpts:function(){return Object.assign({},(0,_ui.getConfig)().splitter.actionConfig,this.actionConfig)},computeIsFoldNext:function(){return"next"===this.computeActionOpts.direction},computeVisibleItems:function(){return this.reactData.itemList.filter(function(t){return t.isExpand})},computeAutoItems:function(){var t=this.reactData,e=this.vertical,i=[];return t.itemList.forEach(e?function(t){t.height||i.push(t)}:function(t){t.width||i.push(t)}),{autoItems:i}},computeBarStyle:function(){var t=this.computeBarOpts,e=t.width,t=t.height,i={};return t&&(i.height=(0,_dom.toCssUnit)(t)),e&&(i.width=(0,_dom.toCssUnit)(e)),i},computeSItemSize:function(){return this.reactData.staticItems.length}}),watch:{items:function(t){this.loadItem(t||[])},computeSItemSize:function(){var t=this.reactData,e=this.computeActionOpts,i=e.showPrevButton,e=e.showNextButton;this.items&&this.items.length&&(0,_log.errLog)("vxe.error.errConflicts",["<vxe-splitter-panel ...>","items"]),t.itemList=t.staticItems||[],(i||e)&&2<t.itemList.length&&(0,_log.errLog)("vxe.error.modelConflicts",["[splitter] action-config.showPrevButton | action-config.showNextButton","<vxe-splitter-panel ...> Only supports 2 panel"]),t.itemList.forEach(function(t){t.showAction&&(0,_log.warnLog)("vxe.error.removeProp",["[splitter] show-action"])}),this.recalculate()}},methods:{dispatchEvent:function(t,e,i){this.$emit(t,(0,_ui.createEvent)(i,{$splitter:this},e))},callSlot:function(t,e){var i=this.$scopedSlots;return t&&(_xeUtils.default.isString(t)&&(t=i[t]||null),_xeUtils.default.isFunction(t))?(0,_vn.getSlotVNs)(t(e)):[]},reset:function(){return this.reactData.itemList.forEach(function(t){t.isExpand=!0,t.foldHeight=0,t.foldWidth=0,t.resizeHeight=0,t.resizeWidth=0}),this.$nextTick()},handleLoadItem:function(t,e){var i=this.$scopedSlots,n=this.reactData,r=n.staticItems,s={isExpand:!0,renderWidth:0,resizeWidth:0,foldWidth:0,renderHeight:0,resizeHeight:0,foldHeight:0};return n.itemList=t.map(function(t){return t.slots&&_xeUtils.default.each(t.slots,function(t){_xeUtils.default.isFunction(t)||i[t]||(0,_log.errLog)("vxe.error.notSlot",["[splitter] ".concat(t)])}),Object.assign({},e?null:s,t,e?s:null,{id:_xeUtils.default.uniqueId()})}),r.length&&(0,_log.errLog)("vxe.error.errConflicts",["<vxe-splitter-panel ...>","items"]),this.recalculate()},loadItem:function(t){return this.handleLoadItem(t||[],!1)},reloadItem:function(t){return this.handleLoadItem(t||[],!0)},handleItemByName:function(t){for(var e=this.reactData.itemList,i=-1,n=null,r=null,s=null,o=0;o<e.length;o++){var l=e[o];if(l.name===t){n=l,r=e[(i=o)-1]||null,s=e[o+1]||null;break}}return{index:i,currItem:n,prevItem:r,nextItem:s}},setItemExpand:function(t,e){var i,n,t=this.handleItemByName(t);return t&&(i=t.currItem,n=t.prevItem,t=t.nextItem,i)&&(e?!i.isExpand:i.isExpand)&&(t?t.isExpand&&this.handleItemActionEvent(null,i,t,!1):n&&n.isExpand&&this.handleItemActionEvent(null,n,i,!0)),this.$nextTick()},toggleItemExpand:function(t){var e=this.handleItemByName(t);if(e){e=e.currItem;if(e)return this.setItemExpand(t,!e.isExpand)}return this.$nextTick()},getItemVisible:function(t){var e=this.handleItemByName(t);if(e){e=e.currItem;if(e)return this.setItemExpand(t,!e.isExpand)}return!1},recalculate:function(){var p=this,m=p,g=p.reactData,v=p.internalData;return p.$nextTick().then(function(){var t,n,r,e,i,s,o,l,a,c,d=m.vertical,u=g.itemList,f=p.$refs.refElem,h=p.$refs.refBarInfoElem;f&&(t=f.clientWidth,f=f.clientHeight,t)&&f&&(h&&(g.barWidth=h.offsetWidth,g.barHeight=h.offsetHeight),n=t-(d?0:g.barWidth*(u.length-1)),r=f-(d?g.barHeight*(u.length-1):0),h=p.computeItemOpts,e=_xeUtils.default.toNumber(h.minWidth),i=_xeUtils.default.toNumber(h.minHeight),s=[],d?(o=0,u.forEach(function(t){var e=t.height,i=0;e?(i=(0,_dom.isScale)(e)?r*_xeUtils.default.toNumber(e)/100:_xeUtils.default.toNumber(e),t.renderHeight=i):s.push(t),o+=i}),s.length&&(l=(r-o)/s.length,s.forEach(function(t){t.renderHeight=Math.max(_xeUtils.default.toNumber((0,_utils.getGlobalDefaultConfig)(t.minHeight,i)),l)}))):(a=0,u.forEach(function(t){var e=t.width,i=0;e?(i=(0,_dom.isScale)(e)?n*_xeUtils.default.toNumber(e)/100:_xeUtils.default.toNumber(e),t.renderWidth=i):s.push(t),a+=i}),s.length&&(c=(n-a)/s.length,s.forEach(function(t){t.renderWidth=Math.max(_xeUtils.default.toNumber((0,_utils.getGlobalDefaultConfig)(t.minWidth,e)),c)}))),v.wrapperWidth=n,v.wrapperHeight=r)})},dragEvent:function(t){var e,i,n,r,s,o,l,a,c,d,u,f,h,U,k,p,m,g,v,x,b,_,B,T,E,y,I,z,C,H,A,S,W,w,O=this,N=O.reactData,D=O.resize,P=O.vertical,L=N.itemList;D&&(t.preventDefault(),h=(D=t.currentTarget).parentElement,e=O.$refs.refElem)&&(i=h.previousElementSibling,n=h.nextElementSibling,i)&&n&&(r=i.getAttribute("itemid"),s=n.getAttribute("itemid"),o=L.find(function(t){return t.id===r}),l=L.find(function(t){return t.id===s}),o)&&l&&(a=e.getBoundingClientRect(),h=D.getBoundingClientRect(),c=O.$refs.refResizableSplitterTip,d=c?c.children[0]:null,L=O.computeItemOpts,u=O.computeResizeOpts.immediate,D=_xeUtils.default.toNumber(L.minWidth),L=_xeUtils.default.toNumber(L.minHeight),f=Math.ceil(h.width-(t.clientX-h.left)),h=Math.ceil(t.clientY-h.top),U=i.offsetWidth,k=n.offsetWidth,E=_xeUtils.default.toNumber(o?(0,_utils.getGlobalDefaultConfig)(o.minWidth,D):D),D=_xeUtils.default.toNumber(l?(0,_utils.getGlobalDefaultConfig)(l.minWidth,D):D),p=i.offsetLeft+E-f,m=n.offsetLeft+n.offsetWidth-D-f,g=t.clientX-a.left,v=-1,b=x=0,_=g,B=i.offsetHeight,T=n.offsetHeight,E=_xeUtils.default.toNumber(o?(0,_utils.getGlobalDefaultConfig)(o.minHeight,L):L),D=_xeUtils.default.toNumber(l?(0,_utils.getGlobalDefaultConfig)(l.minHeight,L):L),y=i.offsetTop+E+h,I=n.offsetTop+n.offsetHeight-D+h,z=t.clientY-a.top,C=-1,A=H=0,S=z,W=function(t){var e,i,n,r;c&&(e=d?d.children[0]:null,i=d?d.children[1]:null,P?(n=0,e&&(C<0?e.style.display="none":(e.textContent="".concat(Math.floor(H),"px"),e.style.display="block",n=e.offsetWidth)),i&&(C<0?(i.textContent="".concat(Math.floor(A),"px"),i.style.display="block",n=i.offsetWidth):i.style.display="none"),(r=Math.max(1,t.clientX-a.left-n/2))>a.width-n-1&&(r=a.width-n-1),c.style.left="0",c.style.top="".concat(S,"px"),d&&(d.style.left="".concat(r,"px"))):(n=0,e&&(v<0?e.style.display="none":(e.textContent="".concat(Math.floor(x),"px"),e.style.display="block",n=e.offsetHeight)),i&&(v<0?(i.textContent="".concat(Math.floor(b),"px"),i.style.display="block",n=i.offsetHeight):i.style.display="none"),(r=Math.max(1,t.clientY-a.top-n/2))>a.height-n-1&&(r=a.height-n-1),c.style.top="0",c.style.left="".concat(_,"px"),d&&(d.style.top="".concat(r,"px"))))},w=function(t){P?(S=t.clientY-a.top,H=B+(C=(S=I<(S=S<y?y:S)?I:S)-z),A=T-C):(_=t.clientX-a.left,x=U+(v=(_=m<(_=_<p?p:_)?m:_)-g),b=k-v),u&&(P?(i.style.height=(0,_dom.toCssUnit)(H),n.style.height=(0,_dom.toCssUnit)(A)):(i.style.width=(0,_dom.toCssUnit)(x),n.style.width=(0,_dom.toCssUnit)(b))),c&&W(t),O.dispatchEvent("resize-drag",{prevItem:o,nextItem:l,offsetHeight:C,offsetWidth:v},t)},document.onmousemove=function(t){t.preventDefault(),w(t),N.resizeFlag++},document.onmouseup=function(t){document.onmousemove=null,document.onmouseup=null,c&&(c.style.display=""),P?(o.resizeHeight=H,l.resizeHeight=A):(o.resizeWidth=x,l.resizeWidth=b),(0,_dom.removeClass)(e,"is--drag"),O.dispatchEvent("resize-end",{prevItem:o,nextItem:l,offsetHeight:C,offsetWidth:v},t),O.recalculate(),N.resizeFlag++},c&&(c.style.display="block",W(t)),w(t),(0,_dom.addClass)(e,"is--drag"),O.dispatchEvent("resize-start",{prevItem:o,nextItem:l},t))},handleItemActionEvent:function(t,e,i,n){var r=this.reactData,s=this.vertical,o=!1,l=e;n?(o=!(l=i).isExpand,i.isExpand=o):(o=!e.isExpand,e.isExpand=o),s?e.isExpand&&i.isExpand?(e.foldHeight=0,i.foldHeight=0):e.isExpand?(i.foldHeight=0,e.foldHeight=(e.resizeHeight||e.renderHeight)+(i.resizeHeight||i.renderHeight)):(e.foldHeight=0,i.foldHeight=(e.resizeHeight||e.renderHeight)+(i.resizeHeight||i.renderHeight)):e.isExpand&&i.isExpand?(e.foldWidth=0,i.foldWidth=0):e.isExpand?(i.foldWidth=0,e.foldWidth=(e.resizeWidth||e.renderWidth)+(i.resizeWidth||i.renderWidth)):(e.foldWidth=0,i.foldWidth=(e.resizeWidth||e.renderWidth)+(i.resizeWidth||i.renderWidth)),t&&this.dispatchEvent("toggle-expand",{prevItem:e,nextItem:i,expanded:o,item:l},t),this.recalculate(),r.resizeFlag++},handlePrevActionDblclickEvent:function(t){var e=this.reactData.itemList,i=this.computeActionOpts,n=t.currentTarget.parentElement.parentElement,r=n.previousElementSibling.getAttribute("itemid"),s=e.find(function(t){return t.id===r}),o=n.nextElementSibling.getAttribute("itemid"),n=e.find(function(t){return t.id===o});"dblclick"===i.trigger&&s&&n&&n.isExpand&&this.handleItemActionEvent(t,s,n,!1),this.dispatchEvent("action-dblclick",{prevItem:s,nextItem:n},t)},handlePrevActionClickEvent:function(t){var e=this.reactData.itemList,i=this.computeActionOpts,n=t.currentTarget.parentElement.parentElement,r=n.previousElementSibling.getAttribute("itemid"),s=e.find(function(t){return t.id===r}),o=n.nextElementSibling.getAttribute("itemid"),n=e.find(function(t){return t.id===o});"dblclick"!==i.trigger&&s&&n&&n.isExpand&&this.handleItemActionEvent(t,s,n,!1),this.dispatchEvent("action-click",{prevItem:s,nextItem:n},t)},handleNextActionDblclickEvent:function(t){var e=this.reactData.itemList,i=this.computeActionOpts,n=t.currentTarget.parentElement.parentElement,r=n.previousElementSibling.getAttribute("itemid"),s=e.find(function(t){return t.id===r}),o=n.nextElementSibling.getAttribute("itemid"),n=e.find(function(t){return t.id===o});"dblclick"===i.trigger&&s&&n&&s.isExpand&&this.handleItemActionEvent(t,s,n,!0),this.dispatchEvent("action-dblclick",{prevItem:s,nextItem:n},t)},handleNextActionClickEvent:function(t){var e=this.reactData.itemList,i=this.computeActionOpts,n=t.currentTarget.parentElement.parentElement,r=n.previousElementSibling.getAttribute("itemid"),s=e.find(function(t){return t.id===r}),o=n.nextElementSibling.getAttribute("itemid"),n=e.find(function(t){return t.id===o});"dblclick"!==i.trigger&&s&&n&&s.isExpand&&this.handleItemActionEvent(t,s,n,!0),this.dispatchEvent("action-click",{prevItem:s,nextItem:n},t)},handleGlobalResizeEvent:function(){this.recalculate()},getActionIcon:function(t,e,i){var n="SPLIT_TOP_ACTION",r="SPLIT_BOTTOM_ACTION",s="SPLIT_LEFT_ACTION",o="SPLIT_RIGHT_ACTION",l="";return(l=this.vertical?i?e.isExpand?r:n:t.isExpand?n:r:i?e.isExpand?o:s:t.isExpand?s:o)?(0,_ui.getIcon)()[l]:""},renderHandleBar:function(t,e,i){var n=this,r=n.reactData,s=n.border,o=n.resize,l=n.vertical,r=r.itemList,a=n.computeBarStyle,c=n.computeActionOpts,d=c.direction,u=_xeUtils.default.isBoolean(c.showPrevButton)?c.showPrevButton:r.some(function(t){return t.showAction}),c=_xeUtils.default.isBoolean(c.showNextButton)?c.showNextButton:"next"===d&&r.some(function(t){return t.showAction});return t("div",{class:["vxe-splitter-panel-handle",l?"is--vertical":"is--horizontal",n.computeResizeOpts.immediate?"is-resize--immediate":"is-resize--lazy",{"is--resize":o,"is--border":s}]},[t("div",{class:"vxe-splitter-panel-handle-bar",style:a,on:{mousedown:n.dragEvent}}),2===r.length?t("div",{class:"vxe-splitter-panel-action-btn-wrapper"},[u&&i.isExpand?t("div",{class:"vxe-splitter-panel-action-btn",on:{dblclick:n.handlePrevActionDblclickEvent,click:n.handlePrevActionClickEvent}},[t("i",{class:n.getActionIcon(e,i,!1)})]):(0,_ui.renderEmptyElement)(n),c&&e.isExpand?t("div",{class:"vxe-splitter-panel-action-btn",on:{dblclick:n.handleNextActionDblclickEvent,click:n.handleNextActionClickEvent}},[t("i",{class:n.getActionIcon(e,i,!0)})]):(0,_ui.renderEmptyElement)(n)]):(0,_ui.renderEmptyElement)(n)])},renderItems:function(d){var u=this,t=u.reactData,f=u.border,h=u.padding,p=u.resize,m=u.vertical,g=t.itemList,v=u.computeSize,x=u.computeResizeOpts.immediate,b=u.computeVisibleItems,_=u.computeAutoItems.autoItems,E=[];return g.forEach(function(t,e){var i=t.id,n=t.name,r=t.slots,s=t.isExpand,e=g[e+1],r=r?r.default:null,o={},l=s?t.foldWidth||t.resizeWidth||t.renderWidth:0,a=s?t.foldHeight||t.resizeHeight||t.renderHeight:0,c=(1===_.length&&(m?t.height||(a=0):t.width||(l=0)),!0);m?a&&1<b.length&&(o.height=(c=!1,_dom.toCssUnit)(a)):l&&1<b.length&&(o.width=(c=!1,_dom.toCssUnit)(l)),E.push(d("div",{attrs:{itemid:i},class:["vxe-splitter-panel",m?"is--vertical":"is--horizontal",x?"is-resize--immediate":"is-resize--lazy",_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty({},"size--".concat(v),v),"is--resize",p),"is--padding",h),"is--border",f),"is--height",a),"is--width",l),"is--visible",s),"is--hidden",!s),"is--fill",s&&c)],style:o},[d("div",{attrs:{itemid:i},class:"vxe-splitter-panel--wrapper"},[d("div",{class:"vxe-splitter-panel--inner"},r?u.callSlot(r,{name:n,isExpand:s}):[])])])),e&&E.push(u.renderHandleBar(d,t,e))}),d("div",{class:"vxe-splitter-wrapper"},E)},renderVN:function(t){var e=this,i=e.$scopedSlots,n=e.vertical,r=e.width,s=e.height,o=e.computeSize,l=e.computeResizeOpts,a=l.immediate,l=l.showTip,i=i.default,c={};return s&&(c.height=(0,_dom.toCssUnit)(s)),r&&(c.width=(0,_dom.toCssUnit)(r)),t("div",{ref:"refElem",class:["vxe-splitter",n?"is--vertical":"is--horizontal",a?"is-resize--immediate":"is-resize--lazy",_defineProperty({},"size--".concat(o),o)],style:c},[t("div",{class:"vxe-splitter-slots"},i?i({}):[]),e.renderItems(t),t("div",{ref:"refResizableSplitterTip",class:["vxe-splitter--resizable-splitter-tip",n?"is--vertical":"is--horizontal",a?"is-resize--immediate":"is-resize--lazy"]},l?[t("div",{class:"vxe-splitter--resizable-splitter-tip-number"},[t("div",{class:"vxe-splitter--resizable-splitter-number-prev"}),t("div",{class:"vxe-splitter--resizable-splitter-number-next"})])]:[]),t("div",{class:"vxe-splitter--render-vars"},[t("div",{ref:"refBarInfoElem",class:"vxe-splitter--handle-bar-info"})])])}},created:function(){_ui.globalEvents.on(this,"resize",this.handleGlobalResizeEvent)},mounted:function(){var t,e=this,i=e,n=e.$refs.refElem;n&&((t=_ui.globalResize.create(function(){e.recalculate()})).observe(n),this.$resize=t),i.items&&e.loadItem(i.items),e.computeActionOpts.direction&&(0,_log.errLog)("vxe.error.delProp",["[splitter] action-config.direction","action-config.showPrevButton | action-config.showNextButton"]),e.$nextTick(function(){e.recalculate()})},beforeDestroy:function(){this.$resize&&this.$resize.disconnect(),_ui.globalEvents.off(this,"resize")},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.15.
|
|
29
|
+
var version = exports.version = "3.15.2";
|
|
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.15.1";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}},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,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}},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:{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",CASCADER_NODE_OPEN:iconPrefix+"arrow-right",CASCADER_NODE_CLOSE:iconPrefix+"arrow-right",CASCADER_NODE_LOADED:iconPrefix+"spinner roll"}),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.15.2";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}},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,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}},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:{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",CASCADER_NODE_OPEN:iconPrefix+"arrow-right",CASCADER_NODE_CLOSE:iconPrefix+"arrow-right",CASCADER_NODE_LOADED:iconPrefix+"spinner roll"}),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.15.
|
|
8
|
+
var version = "ui v".concat("3.15.2");
|
|
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.15.
|
|
1
|
+
Object.defineProperty(exports,"__esModule",{value:!0}),exports.warnLog=exports.errLog=void 0;var _core=require("@vxe-ui/core"),version="ui v".concat("3.15.2"),warnLog=exports.warnLog=_core.log.create("warn",version),errLog=exports.errLog=_core.log.create("error",version);
|
package/package.json
CHANGED
|
@@ -25,6 +25,19 @@ export function handleValueFormat (type: string, valueFormat?: string) {
|
|
|
25
25
|
return 'yyyy-MM-dd'
|
|
26
26
|
}
|
|
27
27
|
|
|
28
|
+
export function handleInputFormat (type: string, inputFormat?: string) {
|
|
29
|
+
if (inputFormat) {
|
|
30
|
+
return inputFormat
|
|
31
|
+
}
|
|
32
|
+
if (type === 'time') {
|
|
33
|
+
return 'HH:mm:ss'
|
|
34
|
+
}
|
|
35
|
+
if (type === 'datetime') {
|
|
36
|
+
return 'yyyy-MM-dd HH:mm:ss'
|
|
37
|
+
}
|
|
38
|
+
return 'yyyy-MM-dd'
|
|
39
|
+
}
|
|
40
|
+
|
|
28
41
|
export function toStringTimeDate (str: string | number | Date | null | undefined) {
|
|
29
42
|
const rest = new Date(2e3, 0, 1)
|
|
30
43
|
if (str) {
|
|
@@ -5,7 +5,7 @@ import { getConfig, getIcon, getI18n, commands, createEvent, globalEvents, GLOBA
|
|
|
5
5
|
import { getFuncText, getLastZIndex, nextZIndex, isEnableConf } from '../../ui/src/utils'
|
|
6
6
|
import { updatePanelPlacement, getEventTargetNode } from '../../ui/src/dom'
|
|
7
7
|
import { getSlotVNs } from '../../ui/src/vn'
|
|
8
|
-
import { parseDateObj, parseDateValue, getDateByCode, handleValueFormat, hasDateValueType, hasTimestampValueType } from '../../date-panel/src/util'
|
|
8
|
+
import { parseDateObj, parseDateValue, getDateByCode, handleValueFormat, handleInputFormat, hasDateValueType, hasTimestampValueType } from '../../date-panel/src/util'
|
|
9
9
|
import { errLog } from '../../ui/src/log'
|
|
10
10
|
import VxeDatePanelComponent from '../../date-panel/src/date-panel'
|
|
11
11
|
import VxeButtonComponent from '../../button/src/button'
|
|
@@ -84,6 +84,7 @@ export default /* define-vxe-component start */ defineVxeComponent({
|
|
|
84
84
|
labelFormat: String as PropType<VxeDatePickerPropTypes.LabelFormat>,
|
|
85
85
|
valueFormat: String as PropType<VxeDatePickerPropTypes.ValueFormat>,
|
|
86
86
|
timeFormat: String as PropType<VxeDatePickerPropTypes.TimeFormat>,
|
|
87
|
+
inputFormat: String as PropType<VxeDatePickerPropTypes.InputFormat>,
|
|
87
88
|
editable: {
|
|
88
89
|
type: Boolean as PropType<VxeDatePickerPropTypes.Editable>,
|
|
89
90
|
default: true
|
|
@@ -114,6 +115,7 @@ export default /* define-vxe-component start */ defineVxeComponent({
|
|
|
114
115
|
type: Boolean as PropType<VxeDatePickerPropTypes.AutoClose>,
|
|
115
116
|
default: () => getConfig().datePicker.autoClose
|
|
116
117
|
},
|
|
118
|
+
controlConfig: Object as PropType<VxeDatePickerPropTypes.ControlConfig>,
|
|
117
119
|
|
|
118
120
|
prefixIcon: String as PropType<VxeDatePickerPropTypes.PrefixIcon>,
|
|
119
121
|
suffixIcon: String as PropType<VxeDatePickerPropTypes.SuffixIcon>,
|
|
@@ -171,7 +173,8 @@ export default /* define-vxe-component start */ defineVxeComponent({
|
|
|
171
173
|
}
|
|
172
174
|
|
|
173
175
|
const internalData: DatePickerInternalData = {
|
|
174
|
-
hpTimeout: undefined
|
|
176
|
+
// hpTimeout: undefined,
|
|
177
|
+
parseInputKayMaps: {}
|
|
175
178
|
}
|
|
176
179
|
|
|
177
180
|
return {
|
|
@@ -336,6 +339,13 @@ export default /* define-vxe-component start */ defineVxeComponent({
|
|
|
336
339
|
const { type, valueFormat } = props
|
|
337
340
|
return handleValueFormat(type, valueFormat)
|
|
338
341
|
},
|
|
342
|
+
computeDateInputFormat () {
|
|
343
|
+
const $xeDatePicker = this
|
|
344
|
+
const props = $xeDatePicker
|
|
345
|
+
|
|
346
|
+
const { type, inputFormat } = props
|
|
347
|
+
return handleInputFormat(type, inputFormat)
|
|
348
|
+
},
|
|
339
349
|
computeFirstDayOfWeek () {
|
|
340
350
|
const $xeDatePicker = this
|
|
341
351
|
const props = $xeDatePicker
|
|
@@ -362,6 +372,12 @@ export default /* define-vxe-component start */ defineVxeComponent({
|
|
|
362
372
|
})
|
|
363
373
|
return dateObj.label
|
|
364
374
|
}).join(', ')
|
|
375
|
+
},
|
|
376
|
+
computeControlOpts () {
|
|
377
|
+
const $xeDatePicker = this
|
|
378
|
+
const props = $xeDatePicker
|
|
379
|
+
|
|
380
|
+
return Object.assign({}, getConfig().datePicker.controlConfig, props.controlConfig)
|
|
365
381
|
}
|
|
366
382
|
},
|
|
367
383
|
methods: {
|
|
@@ -474,6 +490,8 @@ export default /* define-vxe-component start */ defineVxeComponent({
|
|
|
474
490
|
reactData.isActivated = true
|
|
475
491
|
if (!trigger || trigger === 'default') {
|
|
476
492
|
$xeDatePicker.datePickerOpenEvent(evnt)
|
|
493
|
+
} else if (trigger === 'icon') {
|
|
494
|
+
$xeDatePicker.hidePanel()
|
|
477
495
|
}
|
|
478
496
|
$xeDatePicker.triggerEvent(evnt)
|
|
479
497
|
},
|
|
@@ -520,6 +538,36 @@ export default /* define-vxe-component start */ defineVxeComponent({
|
|
|
520
538
|
$xeDatePicker.dispatchEvent('suffix-click', { value: inputValue }, evnt)
|
|
521
539
|
}
|
|
522
540
|
},
|
|
541
|
+
handleArrowInputDate (evnt: KeyboardEvent, isUpArrow: boolean) {
|
|
542
|
+
const $xeDatePicker = this
|
|
543
|
+
const props = $xeDatePicker
|
|
544
|
+
const reactData = $xeDatePicker.reactData
|
|
545
|
+
const internalData = $xeDatePicker.internalData
|
|
546
|
+
|
|
547
|
+
const { multiple } = props
|
|
548
|
+
if (multiple) {
|
|
549
|
+
return
|
|
550
|
+
}
|
|
551
|
+
const { inputValue } = reactData
|
|
552
|
+
if (!inputValue) {
|
|
553
|
+
return
|
|
554
|
+
}
|
|
555
|
+
const targetElem = $xeDatePicker.$refs.refInputTarget as HTMLInputElement
|
|
556
|
+
if (!targetElem) {
|
|
557
|
+
return
|
|
558
|
+
}
|
|
559
|
+
const { parseInputKayMaps } = internalData
|
|
560
|
+
const inputFormat = $xeDatePicker.computeDateInputFormat
|
|
561
|
+
const selectionStart = targetElem.selectionStart || 0
|
|
562
|
+
let selectKey = inputFormat[selectionStart]
|
|
563
|
+
if (!parseInputKayMaps[selectKey]) {
|
|
564
|
+
selectKey = inputFormat[selectionStart - 1]
|
|
565
|
+
}
|
|
566
|
+
const inputPaesrFn = parseInputKayMaps[selectKey]
|
|
567
|
+
if (inputPaesrFn) {
|
|
568
|
+
inputPaesrFn(evnt, targetElem, isUpArrow)
|
|
569
|
+
}
|
|
570
|
+
},
|
|
523
571
|
blurEvent (evnt: Event & { type: 'blur' }) {
|
|
524
572
|
const $xeDatePicker = this
|
|
525
573
|
const reactData = $xeDatePicker.reactData
|
|
@@ -548,7 +596,15 @@ export default /* define-vxe-component start */ defineVxeComponent({
|
|
|
548
596
|
},
|
|
549
597
|
keydownEvent (evnt: KeyboardEvent & { type: 'keydown' }) {
|
|
550
598
|
const $xeDatePicker = this
|
|
599
|
+
const props = $xeDatePicker
|
|
551
600
|
|
|
601
|
+
const { controlConfig } = props
|
|
602
|
+
const controlOpts = $xeDatePicker.computeControlOpts
|
|
603
|
+
const isUpArrow = globalEvents.hasKey(evnt, GLOBAL_EVENT_KEYS.ARROW_UP)
|
|
604
|
+
const isDwArrow = globalEvents.hasKey(evnt, GLOBAL_EVENT_KEYS.ARROW_DOWN)
|
|
605
|
+
if ((isUpArrow || isDwArrow) && controlOpts.isArrow && (controlConfig || controlOpts.enabled)) {
|
|
606
|
+
$xeDatePicker.handleArrowInputDate(evnt, isUpArrow)
|
|
607
|
+
}
|
|
552
608
|
$xeDatePicker.triggerEvent(evnt)
|
|
553
609
|
},
|
|
554
610
|
keyupEvent (evnt: KeyboardEvent & { type: 'keyup' }) {
|
|
@@ -702,6 +758,9 @@ export default /* define-vxe-component start */ defineVxeComponent({
|
|
|
702
758
|
const { panelIndex } = reactData
|
|
703
759
|
const targetElem = $xeDatePicker.$refs.refInputTarget as HTMLInputElement
|
|
704
760
|
const panelElem = $xeDatePicker.$refs.refInputPanel as HTMLDivElement
|
|
761
|
+
if (!panelElem) {
|
|
762
|
+
return $xeDatePicker.$nextTick()
|
|
763
|
+
}
|
|
705
764
|
const btnTransfer = $xeDatePicker.computeBtnTransfer
|
|
706
765
|
const popupOpts = $xeDatePicker.computePopupOpts
|
|
707
766
|
const handleStyle = () => {
|
|
@@ -729,13 +788,9 @@ export default /* define-vxe-component start */ defineVxeComponent({
|
|
|
729
788
|
const btnTransfer = $xeDatePicker.computeBtnTransfer
|
|
730
789
|
const panelElem = $xeDatePicker.$refs.refInputPanel as HTMLElement
|
|
731
790
|
if (!isDisabled && !visiblePanel) {
|
|
732
|
-
if (!reactData.initialized) {
|
|
791
|
+
if (!reactData.initialized && btnTransfer && panelElem) {
|
|
733
792
|
reactData.initialized = true
|
|
734
|
-
|
|
735
|
-
if (panelElem) {
|
|
736
|
-
document.body.appendChild(panelElem)
|
|
737
|
-
}
|
|
738
|
-
}
|
|
793
|
+
document.body.appendChild(panelElem)
|
|
739
794
|
}
|
|
740
795
|
if (internalData.hpTimeout) {
|
|
741
796
|
clearTimeout(internalData.hpTimeout)
|
|
@@ -763,11 +818,17 @@ export default /* define-vxe-component start */ defineVxeComponent({
|
|
|
763
818
|
},
|
|
764
819
|
clickIconEvent (evnt: MouseEvent) {
|
|
765
820
|
const $xeDatePicker = this
|
|
821
|
+
const reactData = $xeDatePicker.reactData
|
|
766
822
|
|
|
823
|
+
const { visiblePanel } = reactData
|
|
767
824
|
const popupOpts = $xeDatePicker.computePopupOpts
|
|
768
825
|
const { trigger } = popupOpts
|
|
769
826
|
if (!trigger || trigger === 'default' || trigger === 'icon') {
|
|
770
|
-
|
|
827
|
+
if (visiblePanel) {
|
|
828
|
+
$xeDatePicker.hidePanel()
|
|
829
|
+
} else {
|
|
830
|
+
$xeDatePicker.datePickerOpenEvent(evnt)
|
|
831
|
+
}
|
|
771
832
|
}
|
|
772
833
|
},
|
|
773
834
|
clickEvent (evnt: Event & { type: 'click' }) {
|
|
@@ -906,6 +967,10 @@ export default /* define-vxe-component start */ defineVxeComponent({
|
|
|
906
967
|
const slots = $xeDatePicker.$scopedSlots
|
|
907
968
|
const reactData = $xeDatePicker.reactData
|
|
908
969
|
|
|
970
|
+
const popupOpts = $xeDatePicker.computePopupOpts
|
|
971
|
+
if (popupOpts.enabled === false) {
|
|
972
|
+
return renderEmptyElement($xeDatePicker)
|
|
973
|
+
}
|
|
909
974
|
const { type, multiple, showClearButton, showConfirmButton } = props
|
|
910
975
|
const { initialized, isAniVisible, visiblePanel, panelPlacement, panelStyle, inputValue } = reactData
|
|
911
976
|
const vSize = $xeDatePicker.computeSize
|
|
@@ -915,7 +980,6 @@ export default /* define-vxe-component start */ defineVxeComponent({
|
|
|
915
980
|
const isDateTimeType = $xeDatePicker.computeIsDateTimeType
|
|
916
981
|
const shortcutList = $xeDatePicker.computeShortcutList
|
|
917
982
|
const timeOpts = $xeDatePicker.computeTimeOpts
|
|
918
|
-
const popupOpts = $xeDatePicker.computePopupOpts
|
|
919
983
|
const { position } = shortcutOpts
|
|
920
984
|
const headerSlot = slots.header
|
|
921
985
|
const footerSlot = slots.footer
|
|
@@ -1230,7 +1294,15 @@ export default /* define-vxe-component start */ defineVxeComponent({
|
|
|
1230
1294
|
},
|
|
1231
1295
|
created () {
|
|
1232
1296
|
const $xeDatePicker = this
|
|
1297
|
+
const internalData = $xeDatePicker.internalData
|
|
1233
1298
|
|
|
1299
|
+
const { parseInputKayMaps } = internalData
|
|
1300
|
+
const inputKeys = ['y', 'M', 'd', 'H', 'm', 'n']
|
|
1301
|
+
inputKeys.forEach(key => {
|
|
1302
|
+
parseInputKayMaps[key] = (evnt: KeyboardEvent) => {
|
|
1303
|
+
evnt.preventDefault()
|
|
1304
|
+
}
|
|
1305
|
+
})
|
|
1234
1306
|
$xeDatePicker.updateModelValue()
|
|
1235
1307
|
globalEvents.on($xeDatePicker, 'mousewheel', $xeDatePicker.handleGlobalMousewheelEvent)
|
|
1236
1308
|
globalEvents.on($xeDatePicker, 'mousedown', $xeDatePicker.handleGlobalMousedownEvent)
|
|
@@ -591,6 +591,8 @@ export default /* define-vxe-component start */ defineVxeComponent({
|
|
|
591
591
|
reactData.isActivated = true
|
|
592
592
|
if (!trigger || trigger === 'default') {
|
|
593
593
|
$xeDateRangePicker.dateRangePickerOpenEvent(evnt)
|
|
594
|
+
} else if (trigger === 'icon') {
|
|
595
|
+
$xeDateRangePicker.hidePanel()
|
|
594
596
|
}
|
|
595
597
|
$xeDateRangePicker.triggerEvent(evnt)
|
|
596
598
|
},
|
|
@@ -966,6 +968,9 @@ export default /* define-vxe-component start */ defineVxeComponent({
|
|
|
966
968
|
const { panelIndex } = reactData
|
|
967
969
|
const targetElem = $xeDateRangePicker.$refs.refInputTarget as HTMLInputElement
|
|
968
970
|
const panelElem = $xeDateRangePicker.$refs.refInputPanel as HTMLDivElement
|
|
971
|
+
if (!panelElem) {
|
|
972
|
+
return $xeDateRangePicker.$nextTick()
|
|
973
|
+
}
|
|
969
974
|
const btnTransfer = $xeDateRangePicker.computeBtnTransfer
|
|
970
975
|
const popupOpts = $xeDateRangePicker.computePopupOpts
|
|
971
976
|
const handleStyle = () => {
|
|
@@ -993,13 +998,9 @@ export default /* define-vxe-component start */ defineVxeComponent({
|
|
|
993
998
|
const btnTransfer = $xeDateRangePicker.computeBtnTransfer
|
|
994
999
|
const panelElem = $xeDateRangePicker.$refs.refInputPanel as HTMLElement
|
|
995
1000
|
if (!isDisabled && !visiblePanel) {
|
|
996
|
-
if (!reactData.initialized) {
|
|
1001
|
+
if (!reactData.initialized && btnTransfer && panelElem) {
|
|
997
1002
|
reactData.initialized = true
|
|
998
|
-
|
|
999
|
-
if (panelElem) {
|
|
1000
|
-
document.body.appendChild(panelElem)
|
|
1001
|
-
}
|
|
1002
|
-
}
|
|
1003
|
+
document.body.appendChild(panelElem)
|
|
1003
1004
|
}
|
|
1004
1005
|
if (internalData.hpTimeout) {
|
|
1005
1006
|
clearTimeout(internalData.hpTimeout)
|
|
@@ -1028,11 +1029,17 @@ export default /* define-vxe-component start */ defineVxeComponent({
|
|
|
1028
1029
|
},
|
|
1029
1030
|
clickIconEvent (evnt: MouseEvent) {
|
|
1030
1031
|
const $xeDateRangePicker = this
|
|
1032
|
+
const reactData = $xeDateRangePicker.reactData
|
|
1031
1033
|
|
|
1034
|
+
const { visiblePanel } = reactData
|
|
1032
1035
|
const popupOpts = $xeDateRangePicker.computePopupOpts
|
|
1033
1036
|
const { trigger } = popupOpts
|
|
1034
1037
|
if (!trigger || trigger === 'default' || trigger === 'icon') {
|
|
1035
|
-
|
|
1038
|
+
if (visiblePanel) {
|
|
1039
|
+
$xeDateRangePicker.hidePanel()
|
|
1040
|
+
} else {
|
|
1041
|
+
$xeDateRangePicker.dateRangePickerOpenEvent(evnt)
|
|
1042
|
+
}
|
|
1036
1043
|
}
|
|
1037
1044
|
},
|
|
1038
1045
|
clickEvent (evnt: Event & { type: 'click' }) {
|
|
@@ -1182,6 +1189,10 @@ export default /* define-vxe-component start */ defineVxeComponent({
|
|
|
1182
1189
|
const slots = $xeDateRangePicker.$scopedSlots
|
|
1183
1190
|
const reactData = $xeDateRangePicker.reactData
|
|
1184
1191
|
|
|
1192
|
+
const popupOpts = $xeDateRangePicker.computePopupOpts
|
|
1193
|
+
if (popupOpts.enabled === false) {
|
|
1194
|
+
return renderEmptyElement($xeDateRangePicker)
|
|
1195
|
+
}
|
|
1185
1196
|
const { type, separator, autoClose, showConfirmButton, showClearButton } = props
|
|
1186
1197
|
const { initialized, isAniVisible, visiblePanel, panelPlacement, panelStyle, startValue, endValue } = reactData
|
|
1187
1198
|
const vSize = $xeDateRangePicker.computeSize
|
|
@@ -1194,7 +1205,6 @@ export default /* define-vxe-component start */ defineVxeComponent({
|
|
|
1194
1205
|
const defaultDates = $xeDateRangePicker.computeDefaultDates
|
|
1195
1206
|
const defaultTimes = $xeDateRangePicker.computeDefaultTimes
|
|
1196
1207
|
const timeOpts = $xeDateRangePicker.computeTimeOpts
|
|
1197
|
-
const popupOpts = $xeDateRangePicker.computePopupOpts
|
|
1198
1208
|
const { startLabel, endLabel } = panelLabelObj
|
|
1199
1209
|
const { position } = shortcutOpts
|
|
1200
1210
|
const headerSlot = slots.header
|
|
@@ -64,8 +64,6 @@ export default /* define-vxe-component start */ defineVxeComponent({
|
|
|
64
64
|
type: String as PropType<VxeNumberInputPropTypes.Size>,
|
|
65
65
|
default: () => getConfig().numberInput.size || getConfig().size
|
|
66
66
|
},
|
|
67
|
-
|
|
68
|
-
// number、integer、float
|
|
69
67
|
min: {
|
|
70
68
|
type: [String, Number] as PropType<VxeNumberInputPropTypes.Min>,
|
|
71
69
|
default: null
|
|
@@ -88,13 +86,12 @@ export default /* define-vxe-component start */ defineVxeComponent({
|
|
|
88
86
|
default: () => getConfig().numberInput.currencySymbol
|
|
89
87
|
},
|
|
90
88
|
controlConfig: Object as PropType<VxeNumberInputPropTypes.ControlConfig>,
|
|
91
|
-
|
|
92
|
-
// float
|
|
89
|
+
// number、float、amount
|
|
93
90
|
roundingMode: {
|
|
94
91
|
type: String as PropType<VxeNumberInputPropTypes.RoundingMode>,
|
|
95
92
|
default: () => getConfig().numberInput.roundingMode
|
|
96
93
|
},
|
|
97
|
-
// float
|
|
94
|
+
// float、amount
|
|
98
95
|
digits: {
|
|
99
96
|
type: [String, Number] as PropType<VxeNumberInputPropTypes.Digits>,
|
|
100
97
|
default: null
|
|
@@ -107,7 +104,6 @@ export default /* define-vxe-component start */ defineVxeComponent({
|
|
|
107
104
|
type: Boolean as PropType<VxeNumberInputPropTypes.Editable>,
|
|
108
105
|
default: true
|
|
109
106
|
},
|
|
110
|
-
|
|
111
107
|
plusIcon: String as PropType<VxeNumberInputPropTypes.PlusIcon>,
|
|
112
108
|
minusIcon: String as PropType<VxeNumberInputPropTypes.MinusIcon>,
|
|
113
109
|
prefixIcon: String as PropType<VxeNumberInputPropTypes.PrefixIcon>,
|
|
@@ -49,7 +49,8 @@ export default /* define-vxe-component start */ defineVxeComponent({
|
|
|
49
49
|
staticItems: [],
|
|
50
50
|
itemList: [],
|
|
51
51
|
barWidth: 0,
|
|
52
|
-
barHeight: 0
|
|
52
|
+
barHeight: 0,
|
|
53
|
+
resizeFlag: 0
|
|
53
54
|
}
|
|
54
55
|
const internalData: SplitterInternalData = {
|
|
55
56
|
wrapperWidth: 0,
|
|
@@ -596,6 +597,7 @@ export default /* define-vxe-component start */ defineVxeComponent({
|
|
|
596
597
|
document.onmousemove = (evnt) => {
|
|
597
598
|
evnt.preventDefault()
|
|
598
599
|
handleDrag(evnt)
|
|
600
|
+
reactData.resizeFlag++
|
|
599
601
|
}
|
|
600
602
|
document.onmouseup = (evnt) => {
|
|
601
603
|
document.onmousemove = null
|
|
@@ -607,6 +609,7 @@ export default /* define-vxe-component start */ defineVxeComponent({
|
|
|
607
609
|
removeClass(el, 'is--drag')
|
|
608
610
|
$xeSplitter.dispatchEvent('resize-end', { prevItem, nextItem, offsetHeight: targetOffsetHeight, offsetWidth: targetOffsetWidth }, evnt)
|
|
609
611
|
$xeSplitter.recalculate()
|
|
612
|
+
reactData.resizeFlag++
|
|
610
613
|
}
|
|
611
614
|
|
|
612
615
|
if (rsSplitterLineEl) {
|
|
@@ -620,6 +623,7 @@ export default /* define-vxe-component start */ defineVxeComponent({
|
|
|
620
623
|
handleItemActionEvent (evnt: MouseEvent | null, prevItem: VxeSplitterDefines.PaneConfig, nextItem: VxeSplitterDefines.PaneConfig, isNext: boolean) {
|
|
621
624
|
const $xeSplitter = this
|
|
622
625
|
const props = $xeSplitter
|
|
626
|
+
const reactData = $xeSplitter.reactData
|
|
623
627
|
|
|
624
628
|
const { vertical } = props
|
|
625
629
|
let expanded = false
|
|
@@ -659,6 +663,7 @@ export default /* define-vxe-component start */ defineVxeComponent({
|
|
|
659
663
|
$xeSplitter.dispatchEvent('toggle-expand', { prevItem, nextItem, expanded, item }, evnt)
|
|
660
664
|
}
|
|
661
665
|
$xeSplitter.recalculate()
|
|
666
|
+
reactData.resizeFlag++
|
|
662
667
|
},
|
|
663
668
|
handlePrevActionDblclickEvent (evnt: MouseEvent) {
|
|
664
669
|
const $xeSplitter = this
|