vxe-pc-ui 4.15.1 → 4.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/dist/all.esm.js +107 -11
- package/es/date-panel/src/util.js +12 -0
- package/es/date-picker/src/date-picker.js +71 -5
- package/es/date-range-picker/src/date-range-picker.js +17 -2
- package/es/number-input/src/number-input.js +2 -3
- package/es/splitter/src/splitter.js +5 -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 +82 -3
- package/lib/date-picker/src/date-picker.min.js +1 -1
- package/lib/date-range-picker/src/date-range-picker.js +17 -2
- package/lib/date-range-picker/src/date-range-picker.min.js +1 -1
- package/lib/index.umd.js +120 -11
- package/lib/index.umd.min.js +1 -1
- package/lib/number-input/src/number-input.js +2 -3
- package/lib/splitter/src/splitter.js +5 -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 +73 -5
- package/packages/date-range-picker/src/date-range-picker.ts +15 -2
- package/packages/number-input/src/number-input.ts +2 -6
- package/packages/splitter/src/splitter.ts +5 -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 +29 -3
- /package/es/icon/{iconfont.1781675429363.ttf → iconfont.1781753592499.ttf} +0 -0
- /package/es/icon/{iconfont.1781675429363.woff → iconfont.1781753592499.woff} +0 -0
- /package/es/icon/{iconfont.1781675429363.woff2 → iconfont.1781753592499.woff2} +0 -0
- /package/es/{iconfont.1781675429363.ttf → iconfont.1781753592499.ttf} +0 -0
- /package/es/{iconfont.1781675429363.woff → iconfont.1781753592499.woff} +0 -0
- /package/es/{iconfont.1781675429363.woff2 → iconfont.1781753592499.woff2} +0 -0
- /package/lib/icon/style/{iconfont.1781675429363.ttf → iconfont.1781753592499.ttf} +0 -0
- /package/lib/icon/style/{iconfont.1781675429363.woff → iconfont.1781753592499.woff} +0 -0
- /package/lib/icon/style/{iconfont.1781675429363.woff2 → iconfont.1781753592499.woff2} +0 -0
- /package/lib/{iconfont.1781675429363.ttf → iconfont.1781753592499.ttf} +0 -0
- /package/lib/{iconfont.1781675429363.woff → iconfont.1781753592499.woff} +0 -0
- /package/lib/{iconfont.1781675429363.woff2 → iconfont.1781753592499.woff2} +0 -0
|
@@ -54,7 +54,6 @@ var _default = exports.default = (0, _comp.defineVxeComponent)({
|
|
|
54
54
|
type: String,
|
|
55
55
|
default: () => (0, _ui.getConfig)().numberInput.size || (0, _ui.getConfig)().size
|
|
56
56
|
},
|
|
57
|
-
// number、integer、float
|
|
58
57
|
min: {
|
|
59
58
|
type: [String, Number],
|
|
60
59
|
default: null
|
|
@@ -77,12 +76,12 @@ var _default = exports.default = (0, _comp.defineVxeComponent)({
|
|
|
77
76
|
default: () => (0, _ui.getConfig)().numberInput.currencySymbol
|
|
78
77
|
},
|
|
79
78
|
controlConfig: Object,
|
|
80
|
-
// float
|
|
79
|
+
// number、float、amount
|
|
81
80
|
roundingMode: {
|
|
82
81
|
type: String,
|
|
83
82
|
default: () => (0, _ui.getConfig)().numberInput.roundingMode
|
|
84
83
|
},
|
|
85
|
-
// float
|
|
84
|
+
// float、amount
|
|
86
85
|
digits: {
|
|
87
86
|
type: [String, Number],
|
|
88
87
|
default: null
|
|
@@ -61,7 +61,8 @@ var _default = exports.default = (0, _comp.defineVxeComponent)({
|
|
|
61
61
|
staticItems: [],
|
|
62
62
|
itemList: [],
|
|
63
63
|
barWidth: 0,
|
|
64
|
-
barHeight: 0
|
|
64
|
+
barHeight: 0,
|
|
65
|
+
resizeFlag: 0
|
|
65
66
|
});
|
|
66
67
|
const internalData = {
|
|
67
68
|
wrapperWidth: 0,
|
|
@@ -603,6 +604,7 @@ var _default = exports.default = (0, _comp.defineVxeComponent)({
|
|
|
603
604
|
document.onmousemove = evnt => {
|
|
604
605
|
evnt.preventDefault();
|
|
605
606
|
handleDrag(evnt);
|
|
607
|
+
reactData.resizeFlag++;
|
|
606
608
|
};
|
|
607
609
|
document.onmouseup = evnt => {
|
|
608
610
|
document.onmousemove = null;
|
|
@@ -619,6 +621,7 @@ var _default = exports.default = (0, _comp.defineVxeComponent)({
|
|
|
619
621
|
offsetWidth: targetOffsetWidth
|
|
620
622
|
}, evnt);
|
|
621
623
|
recalculate();
|
|
624
|
+
reactData.resizeFlag++;
|
|
622
625
|
};
|
|
623
626
|
if (rsSplitterLineEl) {
|
|
624
627
|
rsSplitterLineEl.style.display = 'block';
|
|
@@ -677,6 +680,7 @@ var _default = exports.default = (0, _comp.defineVxeComponent)({
|
|
|
677
680
|
}, evnt);
|
|
678
681
|
}
|
|
679
682
|
recalculate();
|
|
683
|
+
reactData.resizeFlag++;
|
|
680
684
|
};
|
|
681
685
|
const handlePrevActionDblclickEvent = evnt => {
|
|
682
686
|
const {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var _vue=require("vue"),_comp=require("../../ui/src/comp"),_ui=require("../../ui"),_vn=require("../../ui/src/vn"),_dom=require("../../ui/src/dom"),_utils=require("../../ui/src/utils"),_log=require("../../ui/src/log"),_xeUtils=_interopRequireDefault(require("xe-utils"));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}var _default=exports.default=(0,_comp.defineVxeComponent)({name:"VxeSplitter",props:{width:[Number,String],height:[Number,String],vertical:{type:Boolean,default:()=>(0,_ui.getConfig)().splitter.vertical},border:{type:Boolean,default:()=>(0,_ui.getConfig)().splitter.border},padding:{type:Boolean,default:()=>(0,_ui.getConfig)().splitter.padding},resize:{type:Boolean,default:()=>(0,_ui.getConfig)().splitter.resize},items:Array,itemConfig:Object,barConfig:Object,resizeConfig:Object,actionConfig:Object,size:{type:String,default:()=>(0,_ui.getConfig)().splitter.size||(0,_ui.getConfig)().size}},emits:["action-dblclick","action-click","toggle-expand","resize-start","resize-drag","resize-end"],setup(u,e){let{emit:l,slots:a}=e;var t=_xeUtils.default.uniqueId();let h=(0,_vue.ref)(),p=(0,_vue.ref)(),O=(0,_vue.ref)(),d=(0,_ui.useSize)(u).computeSize,g=(0,_vue.reactive)({staticItems:[],itemList:[],barWidth:0,barHeight:0}),v={wrapperWidth:0,wrapperHeight:0},A=(0,_vue.computed)(()=>Object.assign({},(0,_ui.getConfig)().splitter.itemConfig,u.itemConfig)),r=(0,_vue.computed)(()=>Object.assign({},(0,_ui.getConfig)().splitter.barConfig,u.barConfig)),M=(0,_vue.computed)(()=>Object.assign({},(0,_ui.getConfig)().splitter.resizeConfig,u.resizeConfig)),m=(0,_vue.computed)(()=>Object.assign({},(0,_ui.getConfig)().splitter.actionConfig,u.actionConfig)),H=(0,_vue.computed)(()=>g.itemList.filter(e=>e.isExpand)),I=(0,_vue.computed)(()=>{var e=u.vertical;let n=[],o=0,a=0;return g.itemList.forEach(e?e=>{var{renderHeight:t,resizeHeight:i,foldHeight:l,isExpand:r,height:s}=e,r=r?l||i||t:0;s||n.push(e),o+=r}:e=>{var{renderWidth:t,resizeWidth:i,foldWidth:l,isExpand:r,width:s}=e,r=r?l||i||t:0;s||n.push(e),a+=r}),{autoItems:n,heightCount:o,heightRatio:o/100,widthCount:a,widthRatio:a/100}}),f=(0,_vue.computed)(()=>{var{width:e,height:t}=r.value,i={};return t&&(i.height=(0,_dom.toCssUnit)(t)),e&&(i.width=(0,_dom.toCssUnit)(e)),i}),i={computeItemOpts:A,computeBarOpts:r,computeActionOpts:m},s={refElem:h},c={xID:t,props:u,context:e,reactData:g,internalData:v,getRefMaps:()=>s,getComputeMaps:()=>i},P=(e,t,i)=>{l(e,(0,_ui.createEvent)(i,{$splitter:c},t))},W=(e,t)=>e&&(_xeUtils.default.isString(e)&&(e=a[e]||null),_xeUtils.default.isFunction(e))?(0,_vn.getSlotVNs)(e(t)):[],x=(e,t,i)=>{var l=u.vertical,r="SPLIT_TOP_ACTION",s="SPLIT_BOTTOM_ACTION",n="SPLIT_LEFT_ACTION",o="SPLIT_RIGHT_ACTION";let a="";return(a=l?i?t.isExpand?s:r:e.isExpand?r:s:i?t.isExpand?o:n:e.isExpand?n:o)?(0,_ui.getIcon)()[a]:""};let n=(e,t)=>{var i=g.staticItems,{showPrevButton:l,showNextButton:r}=m.value;let s={isExpand:!0,renderWidth:0,resizeWidth:0,foldWidth:0,renderHeight:0,resizeHeight:0,foldHeight:0};return g.itemList=e.map(e=>(e.showAction&&(0,_log.warnLog)("vxe.error.removeProp",["[splitter] show-action"]),e.slots&&_xeUtils.default.each(e.slots,e=>{_xeUtils.default.isFunction(e)||a[e]||(0,_log.errLog)("vxe.error.notSlot",["[splitter] "+e])}),Object.assign({},t?null:s,e,t?s:null,{id:_xeUtils.default.uniqueId()}))),i.length&&(0,_log.errLog)("vxe.error.errConflicts",["<vxe-splitter-panel ...>","items"]),(l||r)&&2<g.itemList.length&&(0,_log.errLog)("vxe.error.errConflicts",["action-config.showPrevButton | action-config.showNextButton","Only supports 2 item"]),D()},o=e=>n(e||[],!1);let _=t=>{var i=g.itemList;let l=-1,r=null,s=null,n=null;for(let e=0;e<i.length;e++){var o=i[e];if(o.name===t){l=e,r=o,s=i[e-1]||null,n=i[e+1]||null;break}}return{index:l,currItem:r,prevItem:s,nextItem:n}},b=(e,t)=>{var i,l,e=_(e);return e&&({currItem:e,prevItem:i,nextItem:l}=e,e)&&(t?!e.isExpand:e.isExpand)&&(l?l.isExpand&&z(null,e,l,!1):i&&i.isExpand&&z(null,i,e,!0)),(0,_vue.nextTick)()};let D=()=>(0,_vue.nextTick)().then(()=>{var e=u.vertical,t=g.itemList,l=h.value,a=p.value;if(l){var d=l.clientWidth,l=l.clientHeight;if(d&&l){a&&(g.barWidth=a.offsetWidth,g.barHeight=a.offsetHeight);let r=d-(e?0:g.barWidth*(t.length-1)),s=l-(e?g.barHeight*(t.length-1):0);a=A.value;let i=_xeUtils.default.toNumber(a.minWidth),n=_xeUtils.default.toNumber(a.minHeight),o=[];if(e){let l=0;if(t.forEach(e=>{var t=e.height;let i=0;t?(i=(0,_dom.isScale)(t)?s*_xeUtils.default.toNumber(t)/100:_xeUtils.default.toNumber(t),e.renderHeight=i):o.push(e),l+=i}),o.length){let t=(s-l)/o.length;o.forEach(e=>{e.renderHeight=Math.max(_xeUtils.default.toNumber((0,_utils.getGlobalDefaultConfig)(e.minHeight,n)),t)})}}else{let l=0;if(t.forEach(e=>{var t=e.width;let i=0;t?(i=(0,_dom.isScale)(t)?r*_xeUtils.default.toNumber(t)/100:_xeUtils.default.toNumber(t),e.renderWidth=i):o.push(e),l+=i}),o.length){let t=(r-l)/o.length;o.forEach(e=>{e.renderWidth=Math.max(_xeUtils.default.toNumber((0,_utils.getGlobalDefaultConfig)(e.minWidth,i)),t)})}}v.wrapperWidth=r,v.wrapperHeight=s}}}),E=e=>{let{resize:t,vertical:L}=u;var N=g.itemList;if(t){e.preventDefault();var S=e.currentTarget,T=S.parentElement;let U=h.value;if(U){let I=T.previousElementSibling,W=T.nextElementSibling;if(I&&W){let t=I.getAttribute("itemid"),i=W.getAttribute("itemid"),y=N.find(e=>e.id===t),H=N.find(e=>e.id===i);if(y&&H){let s=U.getBoundingClientRect();T=S.getBoundingClientRect();let n=O.value,o=n?n.children[0]:null;N=A.value;let t=M.value.immediate;var S=_xeUtils.default.toNumber(N.minWidth),N=_xeUtils.default.toNumber(N.minHeight),k=Math.ceil(T.width-(e.clientX-T.left)),T=Math.ceil(e.clientY-T.top);let i=I.offsetWidth,l=W.offsetWidth;var B=_xeUtils.default.toNumber(y?(0,_utils.getGlobalDefaultConfig)(y.minWidth,S):S),S=_xeUtils.default.toNumber(H?(0,_utils.getGlobalDefaultConfig)(H.minWidth,S):S);let r=I.offsetLeft+B-k,a=W.offsetLeft+W.offsetWidth-S-k,d=e.clientX-s.left,u=-1,h=0,p=0,g=d,v=I.offsetHeight,m=W.offsetHeight;B=_xeUtils.default.toNumber(y?(0,_utils.getGlobalDefaultConfig)(y.minHeight,N):N),S=_xeUtils.default.toNumber(H?(0,_utils.getGlobalDefaultConfig)(H.minHeight,N):N);let f=I.offsetTop+B+T,c=W.offsetTop+W.offsetHeight-S+T,x=e.clientY-s.top,_=-1,b=0,E=0,z=x,C=i=>{if(n){var l=o?o.children[0]:null,r=o?o.children[1]:null;if(L){let e=0,t=(l&&(_<0?l.style.display="none":(l.textContent=Math.floor(b)+"px",l.style.display="block",e=l.offsetWidth)),r&&(_<0?(r.textContent=Math.floor(E)+"px",r.style.display="block",e=r.offsetWidth):r.style.display="none"),Math.max(1,i.clientX-s.left-e/2));t>s.width-e-1&&(t=s.width-e-1),n.style.left="0",n.style.top=z+"px",o&&(o.style.left=t+"px")}else{let e=0,t=(l&&(u<0?l.style.display="none":(l.textContent=Math.floor(h)+"px",l.style.display="block",e=l.offsetHeight)),r&&(u<0?(r.textContent=Math.floor(p)+"px",r.style.display="block",e=r.offsetHeight):r.style.display="none"),Math.max(1,i.clientY-s.top-e/2));t>s.height-e-1&&(t=s.height-e-1),n.style.top="0",n.style.left=g+"px",o&&(o.style.top=t+"px")}}},w=e=>{L?((z=(z=e.clientY-s.top)<f?f:z)>c&&(z=c),_=z-x,b=v+_,E=m-_):((g=(g=e.clientX-s.left)<r?r:g)>a&&(g=a),u=g-d,h=i+u,p=l-u),t&&(L?(I.style.height=(0,_dom.toCssUnit)(b),W.style.height=(0,_dom.toCssUnit)(E)):(I.style.width=(0,_dom.toCssUnit)(h),W.style.width=(0,_dom.toCssUnit)(p))),n&&C(e),P("resize-drag",{prevItem:y,nextItem:H,offsetHeight:_,offsetWidth:u},e)};document.onmousemove=e=>{e.preventDefault(),w(e)},document.onmouseup=e=>{document.onmousemove=null,document.onmouseup=null,n&&(n.style.display=""),L?(y.resizeHeight=b,H.resizeHeight=E):(y.resizeWidth=h,H.resizeWidth=p),(0,_dom.removeClass)(U,"is--drag"),P("resize-end",{prevItem:y,nextItem:H,offsetHeight:_,offsetWidth:u},e),D()},n&&(n.style.display="block",C(e)),w(e),(0,_dom.addClass)(U,"is--drag"),P("resize-start",{prevItem:y,nextItem:H},e)}}}}},z=(e,t,i,l)=>{var r=u.vertical;let s=!1,n=t;l?(n=i,s=!i.isExpand,i.isExpand=s):(s=!t.isExpand,t.isExpand=s),r?t.isExpand&&i.isExpand?(t.foldHeight=0,i.foldHeight=0):t.isExpand?(i.foldHeight=0,t.foldHeight=(t.resizeHeight||t.renderHeight)+(i.resizeHeight||i.renderHeight)):(t.foldHeight=0,i.foldHeight=(t.resizeHeight||t.renderHeight)+(i.resizeHeight||i.renderHeight)):t.isExpand&&i.isExpand?(t.foldWidth=0,i.foldWidth=0):t.isExpand?(i.foldWidth=0,t.foldWidth=(t.resizeWidth||t.renderWidth)+(i.resizeWidth||i.renderWidth)):(t.foldWidth=0,i.foldWidth=(t.resizeWidth||t.renderWidth)+(i.resizeWidth||i.renderWidth)),e&&P("toggle-expand",{prevItem:t,nextItem:i,expanded:s,item:n},e),D()},C=e=>{var t=g.itemList,i=m.value,l=e.currentTarget.parentElement.parentElement;let r=l.previousElementSibling.getAttribute("itemid");var s=t.find(e=>e.id===r);let n=l.nextElementSibling.getAttribute("itemid");l=t.find(e=>e.id===n);"dblclick"===i.trigger&&s&&l&&l.isExpand&&z(e,s,l,!1),P("action-dblclick",{prevItem:s,nextItem:l},e)},w=e=>{var t=g.itemList,i=m.value,l=e.currentTarget.parentElement.parentElement;let r=l.previousElementSibling.getAttribute("itemid");var s=t.find(e=>e.id===r);let n=l.nextElementSibling.getAttribute("itemid");l=t.find(e=>e.id===n);"dblclick"!==i.trigger&&s&&l&&l.isExpand&&z(e,s,l,!1),P("action-click",{prevItem:s,nextItem:l},e)},y=e=>{var t=g.itemList,i=m.value,l=e.currentTarget.parentElement.parentElement;let r=l.previousElementSibling.getAttribute("itemid");var s=t.find(e=>e.id===r);let n=l.nextElementSibling.getAttribute("itemid");l=t.find(e=>e.id===n);"dblclick"===i.trigger&&s&&l&&s.isExpand&&z(e,s,l,!0),P("action-dblclick",{prevItem:s,nextItem:l},e)},N=e=>{var t=g.itemList,i=m.value,l=e.currentTarget.parentElement.parentElement;let r=l.previousElementSibling.getAttribute("itemid");var s=t.find(e=>e.id===r);let n=l.nextElementSibling.getAttribute("itemid");l=t.find(e=>e.id===n);"dblclick"!==i.trigger&&s&&l&&s.isExpand&&z(e,s,l,!0),P("action-click",{prevItem:s,nextItem:l},e)},S=()=>{D()};t={dispatchEvent:P,setItemExpand:b,toggleItemExpand:e=>{var t=_(e);if(t){t=t.currItem;if(t)return b(e,!t.isExpand)}return(0,_vue.nextTick)()},getItemExpand:e=>{e=_(e);if(e){e=e.currItem;if(e)return e.isExpand}return!1},recalculate:D,reset:()=>{var e=g.itemList;return e.forEach(e=>{e.isExpand=!0,e.foldHeight=0,e.foldWidth=0,e.resizeHeight=0,e.resizeWidth=0}),(0,_vue.nextTick)()},loadItem:o,reloadItem:e=>n(e||[],!0)};Object.assign(c,t,{});let T=(e,t)=>{var{border:i,resize:l,vertical:r}=u,s=g.itemList,n=f.value,o=m.value,a=o.direction,d=_xeUtils.default.isBoolean(o.showPrevButton)?o.showPrevButton:s.some(e=>e.showAction),o=_xeUtils.default.isBoolean(o.showNextButton)?o.showNextButton:"next"===a&&s.some(e=>e.showAction),a=M.value.immediate;return(0,_vue.h)("div",{class:["vxe-splitter-panel-handle",r?"is--vertical":"is--horizontal",a?"is-resize--immediate":"is-resize--lazy",{"is--resize":l,"is--border":i}]},[(0,_vue.h)("div",{class:"vxe-splitter-panel-handle-bar",style:n,onMousedown:E}),2===s.length?(0,_vue.h)("div",{class:"vxe-splitter-panel-action-btn-wrapper"},[d&&t.isExpand?(0,_vue.h)("div",{class:"vxe-splitter-panel-action-btn",onDblclick:C,onClick:w},[(0,_vue.h)("i",{class:x(e,t,!1)})]):(0,_ui.renderEmptyElement)(c),o&&e.isExpand?(0,_vue.h)("div",{class:"vxe-splitter-panel-action-btn",onDblclick:y,onClick:N},[(0,_vue.h)("i",{class:x(e,t,!0)})]):(0,_ui.renderEmptyElement)(c)]):(0,_ui.renderEmptyElement)(c)])};let U=(0,_vue.ref)(0);(0,_vue.watch)(()=>u.items?u.items.length:-1,()=>{U.value++}),(0,_vue.watch)(()=>u.items,()=>{U.value++}),(0,_vue.watch)(U,()=>{o(u.items||[])}),(0,_vue.watch)(()=>g.staticItems,e=>{var{showPrevButton:t,showNextButton:i}=m.value;u.items&&u.items.length&&(0,_log.errLog)("vxe.error.errConflicts",["<vxe-splitter-panel ...>","items"]),g.itemList=e||[],(t||i)&&2<g.itemList.length&&(0,_log.errLog)("vxe.error.modelConflicts",["[splitter] action-config.showPrevButton | action-config.showNextButton","<vxe-splitter-panel ...> Only supports 2 panel"]),g.itemList.forEach(e=>{e.showAction&&(0,_log.warnLog)("vxe.error.removeProp",["[splitter] showAction"])}),D()});let L;return(0,_vue.onMounted)(()=>{(0,_vue.nextTick)(()=>{D()});var e=h.value,e=(e&&(L=_ui.globalResize.create(()=>{D()})).observe(e),m.value);e.direction&&(0,_log.errLog)("vxe.error.delProp",["[splitter] action-config.direction","action-config.showPrevButton | action-config.showNextButton"]),_ui.globalEvents.on(c,"resize",S)}),(0,_vue.onUnmounted)(()=>{L&&L.disconnect(),_ui.globalEvents.off(c,"resize")}),(0,_vue.onActivated)(()=>{D()}),u.items&&o(u.items),(0,_vue.provide)("$xeSplitter",c),c.renderVN=()=>{var{vertical:e,width:t,height:i}=u,l=d.value,{immediate:r,showTip:s}=M.value,n=a.default,o={};return i&&(o.height=(0,_dom.toCssUnit)(i)),t&&(o.width=(0,_dom.toCssUnit)(t)),(0,_vue.h)("div",{ref:h,class:["vxe-splitter",e?"is--vertical":"is--horizontal",r?"is-resize--immediate":"is-resize--lazy",{["size--"+l]:l}],style:o},[(0,_vue.h)("div",{class:"vxe-splitter-slots"},n?n({}):[]),(()=>{let{border:f,padding:c,resize:x,vertical:_}=u,b=g.itemList,E=d.value;let z=M.value.immediate,C=H.value,w=I.value.autoItems,y=[];return b.forEach((e,t)=>{var{id:i,name:l,slots:r,renderHeight:s,resizeHeight:n,foldHeight:o,renderWidth:a,resizeWidth:d,foldWidth:u,isExpand:h}=e,t=b[t+1],r=r?r.default:null,p={};let g=h?u||d||a:0,v=h?o||n||s:0,m=(1===w.length&&(_?e.height||(v=0):e.width||(g=0)),!0);_?v&&1<C.length&&(m=!1,p.height=(0,_dom.toCssUnit)(v)):g&&1<C.length&&(m=!1,p.width=(0,_dom.toCssUnit)(g)),y.push((0,_vue.h)("div",{itemid:i,class:["vxe-splitter-panel",_?"is--vertical":"is--horizontal",z?"is-resize--immediate":"is-resize--lazy",{["size--"+E]:E,"is--resize":x,"is--padding":c,"is--border":f,"is--height":v,"is--width":g,"is--visible":h,"is--hidden":!h,"is--fill":h&&m}],style:p},[(0,_vue.h)("div",{itemid:i,class:"vxe-splitter-panel--wrapper"},[(0,_vue.h)("div",{class:"vxe-splitter-panel--inner"},r?W(r,{name:l,isExpand:h}):[])])])),t&&y.push(T(e,t))}),(0,_vue.h)("div",{class:"vxe-splitter-wrapper"},y)})(),(0,_vue.h)("div",{ref:O,class:["vxe-splitter--resizable-splitter-tip",e?"is--vertical":"is--horizontal",r?"is-resize--immediate":"is-resize--lazy"]},s?[(0,_vue.h)("div",{class:"vxe-splitter--resizable-splitter-tip-number"},[(0,_vue.h)("div",{class:"vxe-splitter--resizable-splitter-number-prev"}),(0,_vue.h)("div",{class:"vxe-splitter--resizable-splitter-number-next"})])]:[]),(0,_vue.h)("div",{class:"vxe-splitter--render-vars"},[(0,_vue.h)("div",{ref:p,class:"vxe-splitter--handle-bar-info"})])])},c},render(){return this.renderVN()}});
|
|
1
|
+
Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var _vue=require("vue"),_comp=require("../../ui/src/comp"),_ui=require("../../ui"),_vn=require("../../ui/src/vn"),_dom=require("../../ui/src/dom"),_utils=require("../../ui/src/utils"),_log=require("../../ui/src/log"),_xeUtils=_interopRequireDefault(require("xe-utils"));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}var _default=exports.default=(0,_comp.defineVxeComponent)({name:"VxeSplitter",props:{width:[Number,String],height:[Number,String],vertical:{type:Boolean,default:()=>(0,_ui.getConfig)().splitter.vertical},border:{type:Boolean,default:()=>(0,_ui.getConfig)().splitter.border},padding:{type:Boolean,default:()=>(0,_ui.getConfig)().splitter.padding},resize:{type:Boolean,default:()=>(0,_ui.getConfig)().splitter.resize},items:Array,itemConfig:Object,barConfig:Object,resizeConfig:Object,actionConfig:Object,size:{type:String,default:()=>(0,_ui.getConfig)().splitter.size||(0,_ui.getConfig)().size}},emits:["action-dblclick","action-click","toggle-expand","resize-start","resize-drag","resize-end"],setup(u,e){let{emit:l,slots:a}=e;var t=_xeUtils.default.uniqueId();let h=(0,_vue.ref)(),p=(0,_vue.ref)(),O=(0,_vue.ref)(),d=(0,_ui.useSize)(u).computeSize,A=(0,_vue.reactive)({staticItems:[],itemList:[],barWidth:0,barHeight:0,resizeFlag:0}),g={wrapperWidth:0,wrapperHeight:0},M=(0,_vue.computed)(()=>Object.assign({},(0,_ui.getConfig)().splitter.itemConfig,u.itemConfig)),r=(0,_vue.computed)(()=>Object.assign({},(0,_ui.getConfig)().splitter.barConfig,u.barConfig)),P=(0,_vue.computed)(()=>Object.assign({},(0,_ui.getConfig)().splitter.resizeConfig,u.resizeConfig)),v=(0,_vue.computed)(()=>Object.assign({},(0,_ui.getConfig)().splitter.actionConfig,u.actionConfig)),m=(0,_vue.computed)(()=>A.itemList.filter(e=>e.isExpand)),H=(0,_vue.computed)(()=>{var e=u.vertical;let n=[],o=0,a=0;return A.itemList.forEach(e?e=>{var{renderHeight:t,resizeHeight:i,foldHeight:l,isExpand:r,height:s}=e,r=r?l||i||t:0;s||n.push(e),o+=r}:e=>{var{renderWidth:t,resizeWidth:i,foldWidth:l,isExpand:r,width:s}=e,r=r?l||i||t:0;s||n.push(e),a+=r}),{autoItems:n,heightCount:o,heightRatio:o/100,widthCount:a,widthRatio:a/100}}),f=(0,_vue.computed)(()=>{var{width:e,height:t}=r.value,i={};return t&&(i.height=(0,_dom.toCssUnit)(t)),e&&(i.width=(0,_dom.toCssUnit)(e)),i}),i={computeItemOpts:M,computeBarOpts:r,computeActionOpts:v},s={refElem:h},c={xID:t,props:u,context:e,reactData:A,internalData:g,getRefMaps:()=>s,getComputeMaps:()=>i},D=(e,t,i)=>{l(e,(0,_ui.createEvent)(i,{$splitter:c},t))},I=(e,t)=>e&&(_xeUtils.default.isString(e)&&(e=a[e]||null),_xeUtils.default.isFunction(e))?(0,_vn.getSlotVNs)(e(t)):[],x=(e,t,i)=>{var l=u.vertical,r="SPLIT_TOP_ACTION",s="SPLIT_BOTTOM_ACTION",n="SPLIT_LEFT_ACTION",o="SPLIT_RIGHT_ACTION";let a="";return(a=l?i?t.isExpand?s:r:e.isExpand?r:s:i?t.isExpand?o:n:e.isExpand?n:o)?(0,_ui.getIcon)()[a]:""};let n=(e,t)=>{var i=A.staticItems,{showPrevButton:l,showNextButton:r}=v.value;let s={isExpand:!0,renderWidth:0,resizeWidth:0,foldWidth:0,renderHeight:0,resizeHeight:0,foldHeight:0};return A.itemList=e.map(e=>(e.showAction&&(0,_log.warnLog)("vxe.error.removeProp",["[splitter] show-action"]),e.slots&&_xeUtils.default.each(e.slots,e=>{_xeUtils.default.isFunction(e)||a[e]||(0,_log.errLog)("vxe.error.notSlot",["[splitter] "+e])}),Object.assign({},t?null:s,e,t?s:null,{id:_xeUtils.default.uniqueId()}))),i.length&&(0,_log.errLog)("vxe.error.errConflicts",["<vxe-splitter-panel ...>","items"]),(l||r)&&2<A.itemList.length&&(0,_log.errLog)("vxe.error.errConflicts",["action-config.showPrevButton | action-config.showNextButton","Only supports 2 item"]),q()},o=e=>n(e||[],!1);let _=t=>{var i=A.itemList;let l=-1,r=null,s=null,n=null;for(let e=0;e<i.length;e++){var o=i[e];if(o.name===t){l=e,r=o,s=i[e-1]||null,n=i[e+1]||null;break}}return{index:l,currItem:r,prevItem:s,nextItem:n}},b=(e,t)=>{var i,l,e=_(e);return e&&({currItem:e,prevItem:i,nextItem:l}=e,e)&&(t?!e.isExpand:e.isExpand)&&(l?l.isExpand&&z(null,e,l,!1):i&&i.isExpand&&z(null,i,e,!0)),(0,_vue.nextTick)()};let q=()=>(0,_vue.nextTick)().then(()=>{var e=u.vertical,t=A.itemList,l=h.value,a=p.value;if(l){var d=l.clientWidth,l=l.clientHeight;if(d&&l){a&&(A.barWidth=a.offsetWidth,A.barHeight=a.offsetHeight);let r=d-(e?0:A.barWidth*(t.length-1)),s=l-(e?A.barHeight*(t.length-1):0);a=M.value;let i=_xeUtils.default.toNumber(a.minWidth),n=_xeUtils.default.toNumber(a.minHeight),o=[];if(e){let l=0;if(t.forEach(e=>{var t=e.height;let i=0;t?(i=(0,_dom.isScale)(t)?s*_xeUtils.default.toNumber(t)/100:_xeUtils.default.toNumber(t),e.renderHeight=i):o.push(e),l+=i}),o.length){let t=(s-l)/o.length;o.forEach(e=>{e.renderHeight=Math.max(_xeUtils.default.toNumber((0,_utils.getGlobalDefaultConfig)(e.minHeight,n)),t)})}}else{let l=0;if(t.forEach(e=>{var t=e.width;let i=0;t?(i=(0,_dom.isScale)(t)?r*_xeUtils.default.toNumber(t)/100:_xeUtils.default.toNumber(t),e.renderWidth=i):o.push(e),l+=i}),o.length){let t=(r-l)/o.length;o.forEach(e=>{e.renderWidth=Math.max(_xeUtils.default.toNumber((0,_utils.getGlobalDefaultConfig)(e.minWidth,i)),t)})}}g.wrapperWidth=r,g.wrapperHeight=s}}}),E=e=>{let{resize:t,vertical:L}=u;var N=A.itemList;if(t){e.preventDefault();var S=e.currentTarget,T=S.parentElement;let U=h.value;if(U){let I=T.previousElementSibling,W=T.nextElementSibling;if(I&&W){let t=I.getAttribute("itemid"),i=W.getAttribute("itemid"),y=N.find(e=>e.id===t),H=N.find(e=>e.id===i);if(y&&H){let s=U.getBoundingClientRect();T=S.getBoundingClientRect();let n=O.value,o=n?n.children[0]:null;N=M.value;let t=P.value.immediate;var S=_xeUtils.default.toNumber(N.minWidth),N=_xeUtils.default.toNumber(N.minHeight),k=Math.ceil(T.width-(e.clientX-T.left)),T=Math.ceil(e.clientY-T.top);let i=I.offsetWidth,l=W.offsetWidth;var B=_xeUtils.default.toNumber(y?(0,_utils.getGlobalDefaultConfig)(y.minWidth,S):S),S=_xeUtils.default.toNumber(H?(0,_utils.getGlobalDefaultConfig)(H.minWidth,S):S);let r=I.offsetLeft+B-k,a=W.offsetLeft+W.offsetWidth-S-k,d=e.clientX-s.left,u=-1,h=0,p=0,g=d,v=I.offsetHeight,m=W.offsetHeight;B=_xeUtils.default.toNumber(y?(0,_utils.getGlobalDefaultConfig)(y.minHeight,N):N),S=_xeUtils.default.toNumber(H?(0,_utils.getGlobalDefaultConfig)(H.minHeight,N):N);let f=I.offsetTop+B+T,c=W.offsetTop+W.offsetHeight-S+T,x=e.clientY-s.top,_=-1,b=0,E=0,z=x,C=i=>{if(n){var l=o?o.children[0]:null,r=o?o.children[1]:null;if(L){let e=0,t=(l&&(_<0?l.style.display="none":(l.textContent=Math.floor(b)+"px",l.style.display="block",e=l.offsetWidth)),r&&(_<0?(r.textContent=Math.floor(E)+"px",r.style.display="block",e=r.offsetWidth):r.style.display="none"),Math.max(1,i.clientX-s.left-e/2));t>s.width-e-1&&(t=s.width-e-1),n.style.left="0",n.style.top=z+"px",o&&(o.style.left=t+"px")}else{let e=0,t=(l&&(u<0?l.style.display="none":(l.textContent=Math.floor(h)+"px",l.style.display="block",e=l.offsetHeight)),r&&(u<0?(r.textContent=Math.floor(p)+"px",r.style.display="block",e=r.offsetHeight):r.style.display="none"),Math.max(1,i.clientY-s.top-e/2));t>s.height-e-1&&(t=s.height-e-1),n.style.top="0",n.style.left=g+"px",o&&(o.style.top=t+"px")}}},w=e=>{L?((z=(z=e.clientY-s.top)<f?f:z)>c&&(z=c),_=z-x,b=v+_,E=m-_):((g=(g=e.clientX-s.left)<r?r:g)>a&&(g=a),u=g-d,h=i+u,p=l-u),t&&(L?(I.style.height=(0,_dom.toCssUnit)(b),W.style.height=(0,_dom.toCssUnit)(E)):(I.style.width=(0,_dom.toCssUnit)(h),W.style.width=(0,_dom.toCssUnit)(p))),n&&C(e),D("resize-drag",{prevItem:y,nextItem:H,offsetHeight:_,offsetWidth:u},e)};document.onmousemove=e=>{e.preventDefault(),w(e),A.resizeFlag++},document.onmouseup=e=>{document.onmousemove=null,document.onmouseup=null,n&&(n.style.display=""),L?(y.resizeHeight=b,H.resizeHeight=E):(y.resizeWidth=h,H.resizeWidth=p),(0,_dom.removeClass)(U,"is--drag"),D("resize-end",{prevItem:y,nextItem:H,offsetHeight:_,offsetWidth:u},e),q(),A.resizeFlag++},n&&(n.style.display="block",C(e)),w(e),(0,_dom.addClass)(U,"is--drag"),D("resize-start",{prevItem:y,nextItem:H},e)}}}}},z=(e,t,i,l)=>{var r=u.vertical;let s=!1,n=t;l?(n=i,s=!i.isExpand,i.isExpand=s):(s=!t.isExpand,t.isExpand=s),r?t.isExpand&&i.isExpand?(t.foldHeight=0,i.foldHeight=0):t.isExpand?(i.foldHeight=0,t.foldHeight=(t.resizeHeight||t.renderHeight)+(i.resizeHeight||i.renderHeight)):(t.foldHeight=0,i.foldHeight=(t.resizeHeight||t.renderHeight)+(i.resizeHeight||i.renderHeight)):t.isExpand&&i.isExpand?(t.foldWidth=0,i.foldWidth=0):t.isExpand?(i.foldWidth=0,t.foldWidth=(t.resizeWidth||t.renderWidth)+(i.resizeWidth||i.renderWidth)):(t.foldWidth=0,i.foldWidth=(t.resizeWidth||t.renderWidth)+(i.resizeWidth||i.renderWidth)),e&&D("toggle-expand",{prevItem:t,nextItem:i,expanded:s,item:n},e),q(),A.resizeFlag++},C=e=>{var t=A.itemList,i=v.value,l=e.currentTarget.parentElement.parentElement;let r=l.previousElementSibling.getAttribute("itemid");var s=t.find(e=>e.id===r);let n=l.nextElementSibling.getAttribute("itemid");l=t.find(e=>e.id===n);"dblclick"===i.trigger&&s&&l&&l.isExpand&&z(e,s,l,!1),D("action-dblclick",{prevItem:s,nextItem:l},e)},w=e=>{var t=A.itemList,i=v.value,l=e.currentTarget.parentElement.parentElement;let r=l.previousElementSibling.getAttribute("itemid");var s=t.find(e=>e.id===r);let n=l.nextElementSibling.getAttribute("itemid");l=t.find(e=>e.id===n);"dblclick"!==i.trigger&&s&&l&&l.isExpand&&z(e,s,l,!1),D("action-click",{prevItem:s,nextItem:l},e)},y=e=>{var t=A.itemList,i=v.value,l=e.currentTarget.parentElement.parentElement;let r=l.previousElementSibling.getAttribute("itemid");var s=t.find(e=>e.id===r);let n=l.nextElementSibling.getAttribute("itemid");l=t.find(e=>e.id===n);"dblclick"===i.trigger&&s&&l&&s.isExpand&&z(e,s,l,!0),D("action-dblclick",{prevItem:s,nextItem:l},e)},L=e=>{var t=A.itemList,i=v.value,l=e.currentTarget.parentElement.parentElement;let r=l.previousElementSibling.getAttribute("itemid");var s=t.find(e=>e.id===r);let n=l.nextElementSibling.getAttribute("itemid");l=t.find(e=>e.id===n);"dblclick"!==i.trigger&&s&&l&&s.isExpand&&z(e,s,l,!0),D("action-click",{prevItem:s,nextItem:l},e)},N=()=>{q()};t={dispatchEvent:D,setItemExpand:b,toggleItemExpand:e=>{var t=_(e);if(t){t=t.currItem;if(t)return b(e,!t.isExpand)}return(0,_vue.nextTick)()},getItemExpand:e=>{e=_(e);if(e){e=e.currItem;if(e)return e.isExpand}return!1},recalculate:q,reset:()=>{var e=A.itemList;return e.forEach(e=>{e.isExpand=!0,e.foldHeight=0,e.foldWidth=0,e.resizeHeight=0,e.resizeWidth=0}),(0,_vue.nextTick)()},loadItem:o,reloadItem:e=>n(e||[],!0)};Object.assign(c,t,{});let S=(e,t)=>{var{border:i,resize:l,vertical:r}=u,s=A.itemList,n=f.value,o=v.value,a=o.direction,d=_xeUtils.default.isBoolean(o.showPrevButton)?o.showPrevButton:s.some(e=>e.showAction),o=_xeUtils.default.isBoolean(o.showNextButton)?o.showNextButton:"next"===a&&s.some(e=>e.showAction),a=P.value.immediate;return(0,_vue.h)("div",{class:["vxe-splitter-panel-handle",r?"is--vertical":"is--horizontal",a?"is-resize--immediate":"is-resize--lazy",{"is--resize":l,"is--border":i}]},[(0,_vue.h)("div",{class:"vxe-splitter-panel-handle-bar",style:n,onMousedown:E}),2===s.length?(0,_vue.h)("div",{class:"vxe-splitter-panel-action-btn-wrapper"},[d&&t.isExpand?(0,_vue.h)("div",{class:"vxe-splitter-panel-action-btn",onDblclick:C,onClick:w},[(0,_vue.h)("i",{class:x(e,t,!1)})]):(0,_ui.renderEmptyElement)(c),o&&e.isExpand?(0,_vue.h)("div",{class:"vxe-splitter-panel-action-btn",onDblclick:y,onClick:L},[(0,_vue.h)("i",{class:x(e,t,!0)})]):(0,_ui.renderEmptyElement)(c)]):(0,_ui.renderEmptyElement)(c)])};let W=(0,_vue.ref)(0);(0,_vue.watch)(()=>u.items?u.items.length:-1,()=>{W.value++}),(0,_vue.watch)(()=>u.items,()=>{W.value++}),(0,_vue.watch)(W,()=>{o(u.items||[])}),(0,_vue.watch)(()=>A.staticItems,e=>{var{showPrevButton:t,showNextButton:i}=v.value;u.items&&u.items.length&&(0,_log.errLog)("vxe.error.errConflicts",["<vxe-splitter-panel ...>","items"]),A.itemList=e||[],(t||i)&&2<A.itemList.length&&(0,_log.errLog)("vxe.error.modelConflicts",["[splitter] action-config.showPrevButton | action-config.showNextButton","<vxe-splitter-panel ...> Only supports 2 panel"]),A.itemList.forEach(e=>{e.showAction&&(0,_log.warnLog)("vxe.error.removeProp",["[splitter] showAction"])}),q()});let U;return(0,_vue.onMounted)(()=>{(0,_vue.nextTick)(()=>{q()});var e=h.value,e=(e&&(U=_ui.globalResize.create(()=>{q()})).observe(e),v.value);e.direction&&(0,_log.errLog)("vxe.error.delProp",["[splitter] action-config.direction","action-config.showPrevButton | action-config.showNextButton"]),_ui.globalEvents.on(c,"resize",N)}),(0,_vue.onUnmounted)(()=>{U&&U.disconnect(),_ui.globalEvents.off(c,"resize")}),(0,_vue.onActivated)(()=>{q()}),u.items&&o(u.items),(0,_vue.provide)("$xeSplitter",c),c.renderVN=()=>{var{vertical:e,width:t,height:i}=u,l=d.value,{immediate:r,showTip:s}=P.value,n=a.default,o={};return i&&(o.height=(0,_dom.toCssUnit)(i)),t&&(o.width=(0,_dom.toCssUnit)(t)),(0,_vue.h)("div",{ref:h,class:["vxe-splitter",e?"is--vertical":"is--horizontal",r?"is-resize--immediate":"is-resize--lazy",{["size--"+l]:l}],style:o},[(0,_vue.h)("div",{class:"vxe-splitter-slots"},n?n({}):[]),(()=>{let{border:f,padding:c,resize:x,vertical:_}=u,b=A.itemList,E=d.value;let z=P.value.immediate,C=m.value,w=H.value.autoItems,y=[];return b.forEach((e,t)=>{var{id:i,name:l,slots:r,renderHeight:s,resizeHeight:n,foldHeight:o,renderWidth:a,resizeWidth:d,foldWidth:u,isExpand:h}=e,t=b[t+1],r=r?r.default:null,p={};let g=h?u||d||a:0,v=h?o||n||s:0,m=(1===w.length&&(_?e.height||(v=0):e.width||(g=0)),!0);_?v&&1<C.length&&(m=!1,p.height=(0,_dom.toCssUnit)(v)):g&&1<C.length&&(m=!1,p.width=(0,_dom.toCssUnit)(g)),y.push((0,_vue.h)("div",{itemid:i,class:["vxe-splitter-panel",_?"is--vertical":"is--horizontal",z?"is-resize--immediate":"is-resize--lazy",{["size--"+E]:E,"is--resize":x,"is--padding":c,"is--border":f,"is--height":v,"is--width":g,"is--visible":h,"is--hidden":!h,"is--fill":h&&m}],style:p},[(0,_vue.h)("div",{itemid:i,class:"vxe-splitter-panel--wrapper"},[(0,_vue.h)("div",{class:"vxe-splitter-panel--inner"},r?I(r,{name:l,isExpand:h}):[])])])),t&&y.push(S(e,t))}),(0,_vue.h)("div",{class:"vxe-splitter-wrapper"},y)})(),(0,_vue.h)("div",{ref:O,class:["vxe-splitter--resizable-splitter-tip",e?"is--vertical":"is--horizontal",r?"is-resize--immediate":"is-resize--lazy"]},s?[(0,_vue.h)("div",{class:"vxe-splitter--resizable-splitter-tip-number"},[(0,_vue.h)("div",{class:"vxe-splitter--resizable-splitter-number-prev"}),(0,_vue.h)("div",{class:"vxe-splitter--resizable-splitter-number-next"})])]:[]),(0,_vue.h)("div",{class:"vxe-splitter--render-vars"},[(0,_vue.h)("div",{ref:p,class:"vxe-splitter--handle-bar-info"})])])},c},render(){return this.renderVN()}});
|
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
|
-
const version = exports.version = "4.15.
|
|
29
|
+
const version = exports.version = "4.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");let version=exports.version="4.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:null,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:100}},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:{}});let iconPrefix="vxe-icon-";(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"});var _default=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");let version=exports.version="4.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:null,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:100}},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:{}});let iconPrefix="vxe-icon-";(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"});var _default=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
|
-
const version = `ui v${"4.15.
|
|
8
|
+
const version = `ui v${"4.15.2"}`;
|
|
9
9
|
const warnLog = exports.warnLog = _core.log.create('warn', version);
|
|
10
10
|
const 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");let version="ui v4.15.
|
|
1
|
+
Object.defineProperty(exports,"__esModule",{value:!0}),exports.warnLog=exports.errLog=void 0;var _core=require("@vxe-ui/core");let version="ui v4.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) {
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { h, Teleport, ref, Ref, computed, provide, reactive, inject, nextTick, watch, PropType, onUnmounted } from 'vue'
|
|
1
|
+
import { h, Teleport, ref, Ref, computed, provide, reactive, inject, nextTick, watch, PropType, onUnmounted, onMounted } from 'vue'
|
|
2
2
|
import { defineVxeComponent } from '../../ui/src/comp'
|
|
3
3
|
import XEUtils from 'xe-utils'
|
|
4
4
|
import { getConfig, getIcon, getI18n, commands, createEvent, globalEvents, GLOBAL_EVENT_KEYS, useSize, renderEmptyElement } from '../../ui'
|
|
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'
|
|
@@ -77,6 +77,7 @@ export default defineVxeComponent({
|
|
|
77
77
|
labelFormat: String as PropType<VxeDatePickerPropTypes.LabelFormat>,
|
|
78
78
|
valueFormat: String as PropType<VxeDatePickerPropTypes.ValueFormat>,
|
|
79
79
|
timeFormat: String as PropType<VxeDatePickerPropTypes.TimeFormat>,
|
|
80
|
+
inputFormat: String as PropType<VxeDatePickerPropTypes.InputFormat>,
|
|
80
81
|
editable: {
|
|
81
82
|
type: Boolean as PropType<VxeDatePickerPropTypes.Editable>,
|
|
82
83
|
default: true
|
|
@@ -107,6 +108,7 @@ export default defineVxeComponent({
|
|
|
107
108
|
type: Boolean as PropType<VxeDatePickerPropTypes.AutoClose>,
|
|
108
109
|
default: () => getConfig().datePicker.autoClose
|
|
109
110
|
},
|
|
111
|
+
controlConfig: Object as PropType<VxeDatePickerPropTypes.ControlConfig>,
|
|
110
112
|
|
|
111
113
|
prefixIcon: String as PropType<VxeDatePickerPropTypes.PrefixIcon>,
|
|
112
114
|
suffixIcon: String as PropType<VxeDatePickerPropTypes.SuffixIcon>,
|
|
@@ -167,7 +169,8 @@ export default defineVxeComponent({
|
|
|
167
169
|
})
|
|
168
170
|
|
|
169
171
|
const internalData: DatePickerInternalData = {
|
|
170
|
-
hpTimeout: undefined
|
|
172
|
+
// hpTimeout: undefined,
|
|
173
|
+
parseInputKayMaps: {}
|
|
171
174
|
}
|
|
172
175
|
|
|
173
176
|
const refElem = ref() as Ref<HTMLDivElement>
|
|
@@ -303,6 +306,11 @@ export default defineVxeComponent({
|
|
|
303
306
|
return handleValueFormat(type, valueFormat)
|
|
304
307
|
})
|
|
305
308
|
|
|
309
|
+
const computeDateInputFormat = computed(() => {
|
|
310
|
+
const { type, inputFormat } = props
|
|
311
|
+
return handleInputFormat(type, inputFormat)
|
|
312
|
+
})
|
|
313
|
+
|
|
306
314
|
const computeFirstDayOfWeek = computed(() => {
|
|
307
315
|
const { startDay } = props
|
|
308
316
|
return XEUtils.toNumber(startDay) as VxeDatePickerPropTypes.StartDay
|
|
@@ -325,6 +333,10 @@ export default defineVxeComponent({
|
|
|
325
333
|
}).join(', ')
|
|
326
334
|
})
|
|
327
335
|
|
|
336
|
+
const computeControlOpts = computed(() => {
|
|
337
|
+
return Object.assign({}, getConfig().datePicker.controlConfig, props.controlConfig)
|
|
338
|
+
})
|
|
339
|
+
|
|
328
340
|
const updateModelValue = () => {
|
|
329
341
|
const { modelValue } = props
|
|
330
342
|
let val: any = ''
|
|
@@ -400,6 +412,8 @@ export default defineVxeComponent({
|
|
|
400
412
|
reactData.isActivated = true
|
|
401
413
|
if (!trigger || trigger === 'default') {
|
|
402
414
|
datePickerOpenEvent(evnt)
|
|
415
|
+
} else if (trigger === 'icon') {
|
|
416
|
+
hidePanel()
|
|
403
417
|
}
|
|
404
418
|
triggerEvent(evnt)
|
|
405
419
|
}
|
|
@@ -439,6 +453,32 @@ export default defineVxeComponent({
|
|
|
439
453
|
}
|
|
440
454
|
}
|
|
441
455
|
|
|
456
|
+
const handleArrowInputDate = (evnt: KeyboardEvent, isUpArrow: boolean) => {
|
|
457
|
+
const { multiple } = props
|
|
458
|
+
if (multiple) {
|
|
459
|
+
return
|
|
460
|
+
}
|
|
461
|
+
const { inputValue } = reactData
|
|
462
|
+
if (!inputValue) {
|
|
463
|
+
return
|
|
464
|
+
}
|
|
465
|
+
const targetElem = refInputTarget.value
|
|
466
|
+
if (!targetElem) {
|
|
467
|
+
return
|
|
468
|
+
}
|
|
469
|
+
const { parseInputKayMaps } = internalData
|
|
470
|
+
const inputFormat = computeDateInputFormat.value
|
|
471
|
+
const selectionStart = targetElem.selectionStart || 0
|
|
472
|
+
let selectKey = inputFormat[selectionStart]
|
|
473
|
+
if (!parseInputKayMaps[selectKey]) {
|
|
474
|
+
selectKey = inputFormat[selectionStart - 1]
|
|
475
|
+
}
|
|
476
|
+
const inputPaesrFn = parseInputKayMaps[selectKey]
|
|
477
|
+
if (inputPaesrFn) {
|
|
478
|
+
inputPaesrFn(evnt, targetElem, isUpArrow)
|
|
479
|
+
}
|
|
480
|
+
}
|
|
481
|
+
|
|
442
482
|
const blurEvent = (evnt: Event & { type: 'blur' }) => {
|
|
443
483
|
const $datePanel = refDatePanel.value
|
|
444
484
|
const { inputValue } = reactData
|
|
@@ -462,6 +502,13 @@ export default defineVxeComponent({
|
|
|
462
502
|
}
|
|
463
503
|
|
|
464
504
|
const keydownEvent = (evnt: KeyboardEvent & { type: 'keydown' }) => {
|
|
505
|
+
const { controlConfig } = props
|
|
506
|
+
const controlOpts = computeControlOpts.value
|
|
507
|
+
const isUpArrow = globalEvents.hasKey(evnt, GLOBAL_EVENT_KEYS.ARROW_UP)
|
|
508
|
+
const isDwArrow = globalEvents.hasKey(evnt, GLOBAL_EVENT_KEYS.ARROW_DOWN)
|
|
509
|
+
if ((isUpArrow || isDwArrow) && controlOpts.isArrow && (controlConfig || controlOpts.enabled)) {
|
|
510
|
+
handleArrowInputDate(evnt, isUpArrow)
|
|
511
|
+
}
|
|
465
512
|
triggerEvent(evnt)
|
|
466
513
|
}
|
|
467
514
|
|
|
@@ -592,6 +639,9 @@ export default defineVxeComponent({
|
|
|
592
639
|
const { panelIndex } = reactData
|
|
593
640
|
const targetElem = refInputTarget.value
|
|
594
641
|
const panelElem = refInputPanel.value
|
|
642
|
+
if (!panelElem) {
|
|
643
|
+
return nextTick()
|
|
644
|
+
}
|
|
595
645
|
const btnTransfer = computeBtnTransfer.value
|
|
596
646
|
const popupOpts = computePopupOpts.value
|
|
597
647
|
const handleStyle = () => {
|
|
@@ -642,10 +692,15 @@ export default defineVxeComponent({
|
|
|
642
692
|
}
|
|
643
693
|
|
|
644
694
|
const clickIconEvent = (evnt: MouseEvent) => {
|
|
695
|
+
const { visiblePanel } = reactData
|
|
645
696
|
const popupOpts = computePopupOpts.value
|
|
646
697
|
const { trigger } = popupOpts
|
|
647
698
|
if (!trigger || trigger === 'default' || trigger === 'icon') {
|
|
648
|
-
|
|
699
|
+
if (visiblePanel) {
|
|
700
|
+
hidePanel()
|
|
701
|
+
} else {
|
|
702
|
+
datePickerOpenEvent(evnt)
|
|
703
|
+
}
|
|
649
704
|
}
|
|
650
705
|
}
|
|
651
706
|
|
|
@@ -766,6 +821,10 @@ export default defineVxeComponent({
|
|
|
766
821
|
}
|
|
767
822
|
|
|
768
823
|
const renderPanel = () => {
|
|
824
|
+
const popupOpts = computePopupOpts.value
|
|
825
|
+
if (popupOpts.enabled === false) {
|
|
826
|
+
return renderEmptyElement($xeDatePicker)
|
|
827
|
+
}
|
|
769
828
|
const { type, multiple, showClearButton, showConfirmButton } = props
|
|
770
829
|
const { initialized, isAniVisible, visiblePanel, panelPlacement, panelStyle, inputValue } = reactData
|
|
771
830
|
const vSize = computeSize.value
|
|
@@ -775,7 +834,6 @@ export default defineVxeComponent({
|
|
|
775
834
|
const isDateTimeType = computeIsDateTimeType.value
|
|
776
835
|
const shortcutList = computeShortcutList.value
|
|
777
836
|
const timeOpts = computeTimeOpts.value
|
|
778
|
-
const popupOpts = computePopupOpts.value
|
|
779
837
|
const { position } = shortcutOpts
|
|
780
838
|
const headerSlot = slots.header
|
|
781
839
|
const footerSlot = slots.footer
|
|
@@ -1055,6 +1113,16 @@ export default defineVxeComponent({
|
|
|
1055
1113
|
globalEvents.on($xeDatePicker, 'resize', handleGlobalResizeEvent)
|
|
1056
1114
|
})
|
|
1057
1115
|
|
|
1116
|
+
onMounted(() => {
|
|
1117
|
+
const { parseInputKayMaps } = internalData
|
|
1118
|
+
const inputKeys = ['y', 'M', 'd', 'H', 'm', 'n']
|
|
1119
|
+
inputKeys.forEach(key => {
|
|
1120
|
+
parseInputKayMaps[key] = (evnt: KeyboardEvent) => {
|
|
1121
|
+
evnt.preventDefault()
|
|
1122
|
+
}
|
|
1123
|
+
})
|
|
1124
|
+
})
|
|
1125
|
+
|
|
1058
1126
|
onUnmounted(() => {
|
|
1059
1127
|
globalEvents.off($xeDatePicker, 'mousewheel')
|
|
1060
1128
|
globalEvents.off($xeDatePicker, 'mousedown')
|
|
@@ -505,6 +505,8 @@ export default defineVxeComponent({
|
|
|
505
505
|
reactData.isActivated = true
|
|
506
506
|
if (!trigger || trigger === 'default') {
|
|
507
507
|
dateRangePickerOpenEvent(evnt)
|
|
508
|
+
} else if (trigger === 'icon') {
|
|
509
|
+
hidePanel()
|
|
508
510
|
}
|
|
509
511
|
triggerEvent(evnt)
|
|
510
512
|
}
|
|
@@ -833,6 +835,9 @@ export default defineVxeComponent({
|
|
|
833
835
|
const { panelIndex } = reactData
|
|
834
836
|
const targetElem = refInputTarget.value
|
|
835
837
|
const panelElem = refInputPanel.value
|
|
838
|
+
if (!panelElem) {
|
|
839
|
+
return nextTick()
|
|
840
|
+
}
|
|
836
841
|
const btnTransfer = computeBtnTransfer.value
|
|
837
842
|
const popupOpts = computePopupOpts.value
|
|
838
843
|
const handleStyle = () => {
|
|
@@ -884,10 +889,15 @@ export default defineVxeComponent({
|
|
|
884
889
|
}
|
|
885
890
|
|
|
886
891
|
const clickIconEvent = (evnt: MouseEvent) => {
|
|
892
|
+
const { visiblePanel } = reactData
|
|
887
893
|
const popupOpts = computePopupOpts.value
|
|
888
894
|
const { trigger } = popupOpts
|
|
889
895
|
if (!trigger || trigger === 'default' || trigger === 'icon') {
|
|
890
|
-
|
|
896
|
+
if (visiblePanel) {
|
|
897
|
+
hidePanel()
|
|
898
|
+
} else {
|
|
899
|
+
dateRangePickerOpenEvent(evnt)
|
|
900
|
+
}
|
|
891
901
|
}
|
|
892
902
|
}
|
|
893
903
|
|
|
@@ -1019,6 +1029,10 @@ export default defineVxeComponent({
|
|
|
1019
1029
|
}
|
|
1020
1030
|
|
|
1021
1031
|
const renderPanel = () => {
|
|
1032
|
+
const popupOpts = computePopupOpts.value
|
|
1033
|
+
if (popupOpts.enabled === false) {
|
|
1034
|
+
return renderEmptyElement($xeDateRangePicker)
|
|
1035
|
+
}
|
|
1022
1036
|
const { type, separator, autoClose, showConfirmButton, showClearButton } = props
|
|
1023
1037
|
const { initialized, isAniVisible, visiblePanel, panelPlacement, panelStyle, startValue, endValue } = reactData
|
|
1024
1038
|
const vSize = computeSize.value
|
|
@@ -1031,7 +1045,6 @@ export default defineVxeComponent({
|
|
|
1031
1045
|
const defaultDates = computeDefaultDates.value
|
|
1032
1046
|
const defaultTimes = computeDefaultTimes.value
|
|
1033
1047
|
const timeOpts = computeTimeOpts.value
|
|
1034
|
-
const popupOpts = computePopupOpts.value
|
|
1035
1048
|
const { startLabel, endLabel } = panelLabelObj
|
|
1036
1049
|
const { position } = shortcutOpts
|
|
1037
1050
|
const headerSlot = slots.header
|
|
@@ -50,8 +50,6 @@ export default defineVxeComponent({
|
|
|
50
50
|
type: String as PropType<VxeNumberInputPropTypes.Size>,
|
|
51
51
|
default: () => getConfig().numberInput.size || getConfig().size
|
|
52
52
|
},
|
|
53
|
-
|
|
54
|
-
// number、integer、float
|
|
55
53
|
min: {
|
|
56
54
|
type: [String, Number] as PropType<VxeNumberInputPropTypes.Min>,
|
|
57
55
|
default: null
|
|
@@ -74,13 +72,12 @@ export default defineVxeComponent({
|
|
|
74
72
|
default: () => getConfig().numberInput.currencySymbol
|
|
75
73
|
},
|
|
76
74
|
controlConfig: Object as PropType<VxeNumberInputPropTypes.ControlConfig>,
|
|
77
|
-
|
|
78
|
-
// float
|
|
75
|
+
// number、float、amount
|
|
79
76
|
roundingMode: {
|
|
80
77
|
type: String as PropType<VxeNumberInputPropTypes.RoundingMode>,
|
|
81
78
|
default: () => getConfig().numberInput.roundingMode
|
|
82
79
|
},
|
|
83
|
-
// float
|
|
80
|
+
// float、amount
|
|
84
81
|
digits: {
|
|
85
82
|
type: [String, Number] as PropType<VxeNumberInputPropTypes.Digits>,
|
|
86
83
|
default: null
|
|
@@ -93,7 +90,6 @@ export default defineVxeComponent({
|
|
|
93
90
|
type: Boolean as PropType<VxeNumberInputPropTypes.Editable>,
|
|
94
91
|
default: true
|
|
95
92
|
},
|
|
96
|
-
|
|
97
93
|
plusIcon: String as PropType<VxeNumberInputPropTypes.PlusIcon>,
|
|
98
94
|
minusIcon: String as PropType<VxeNumberInputPropTypes.MinusIcon>,
|
|
99
95
|
prefixIcon: String as PropType<VxeNumberInputPropTypes.PrefixIcon>,
|
|
@@ -63,7 +63,8 @@ export default defineVxeComponent({
|
|
|
63
63
|
staticItems: [],
|
|
64
64
|
itemList: [],
|
|
65
65
|
barWidth: 0,
|
|
66
|
-
barHeight: 0
|
|
66
|
+
barHeight: 0,
|
|
67
|
+
resizeFlag: 0
|
|
67
68
|
})
|
|
68
69
|
|
|
69
70
|
const internalData: SplitterInternalData = {
|
|
@@ -581,6 +582,7 @@ export default defineVxeComponent({
|
|
|
581
582
|
document.onmousemove = (evnt) => {
|
|
582
583
|
evnt.preventDefault()
|
|
583
584
|
handleDrag(evnt)
|
|
585
|
+
reactData.resizeFlag++
|
|
584
586
|
}
|
|
585
587
|
document.onmouseup = (evnt) => {
|
|
586
588
|
document.onmousemove = null
|
|
@@ -592,6 +594,7 @@ export default defineVxeComponent({
|
|
|
592
594
|
removeClass(el, 'is--drag')
|
|
593
595
|
dispatchEvent('resize-end', { prevItem, nextItem, offsetHeight: targetOffsetHeight, offsetWidth: targetOffsetWidth }, evnt)
|
|
594
596
|
recalculate()
|
|
597
|
+
reactData.resizeFlag++
|
|
595
598
|
}
|
|
596
599
|
|
|
597
600
|
if (rsSplitterLineEl) {
|
|
@@ -642,6 +645,7 @@ export default defineVxeComponent({
|
|
|
642
645
|
dispatchEvent('toggle-expand', { prevItem, nextItem, expanded, item }, evnt)
|
|
643
646
|
}
|
|
644
647
|
recalculate()
|
|
648
|
+
reactData.resizeFlag++
|
|
645
649
|
}
|
|
646
650
|
|
|
647
651
|
const handlePrevActionDblclickEvent = (evnt: MouseEvent) => {
|
|
@@ -57,12 +57,23 @@ export namespace VxeDatePickerPropTypes {
|
|
|
57
57
|
export type LabelFormat = string
|
|
58
58
|
export type ValueFormat = string
|
|
59
59
|
export type TimeFormat = string
|
|
60
|
+
export type InputFormat = string
|
|
60
61
|
export type Editable = boolean
|
|
61
62
|
export type FestivalMethod = VxeDatePanelPropTypes.FestivalMethod
|
|
62
63
|
export type DisabledMethod = VxeDatePanelPropTypes.DisabledMethod
|
|
63
64
|
export type AutoClose = boolean
|
|
64
65
|
export type PrefixIcon = string
|
|
65
66
|
export type SuffixIcon = string
|
|
67
|
+
export interface ControlConfig {
|
|
68
|
+
/**
|
|
69
|
+
* 是否启用,支持局部/全局启用
|
|
70
|
+
*/
|
|
71
|
+
enabled?: boolean
|
|
72
|
+
/**
|
|
73
|
+
* 只对 enabled 启用后有效,是否启用方向键操作
|
|
74
|
+
*/
|
|
75
|
+
isArrow?: boolean
|
|
76
|
+
}
|
|
66
77
|
/**
|
|
67
78
|
* 已废弃,请使用 PopupConfig.placement
|
|
68
79
|
* @deprecated
|
|
@@ -79,6 +90,10 @@ export namespace VxeDatePickerPropTypes {
|
|
|
79
90
|
export interface TimeConfig extends VxeDatePanelPropTypes.TimeConfig {}
|
|
80
91
|
|
|
81
92
|
export interface PopupConfig {
|
|
93
|
+
/**
|
|
94
|
+
* 是否启用,支持局部/全局启用
|
|
95
|
+
*/
|
|
96
|
+
enabled?: boolean
|
|
82
97
|
/**
|
|
83
98
|
* 设置弹出面板方向
|
|
84
99
|
*/
|
|
@@ -142,6 +157,7 @@ export interface VxeDatePickerProps {
|
|
|
142
157
|
labelFormat?: VxeDatePickerPropTypes.LabelFormat
|
|
143
158
|
valueFormat?: VxeDatePickerPropTypes.ValueFormat
|
|
144
159
|
timeFormat?: VxeDatePickerPropTypes.TimeFormat
|
|
160
|
+
inputFormat?: VxeDatePickerPropTypes.InputFormat
|
|
145
161
|
editable?: VxeDatePickerPropTypes.Editable
|
|
146
162
|
festivalMethod?: VxeDatePickerPropTypes.FestivalMethod
|
|
147
163
|
disabledMethod?: VxeDatePickerPropTypes.DisabledMethod
|
|
@@ -154,6 +170,7 @@ export interface VxeDatePickerProps {
|
|
|
154
170
|
* 只对 type=date,week,month,quarter,year 有效,选择完日期后自动关闭
|
|
155
171
|
*/
|
|
156
172
|
autoClose?: VxeDatePickerPropTypes.AutoClose
|
|
173
|
+
controlConfig?: VxeDatePickerPropTypes.ControlConfig
|
|
157
174
|
|
|
158
175
|
/**
|
|
159
176
|
* 只对 type=week 有效,选中日期后指定为一周的哪一天
|
|
@@ -195,6 +212,7 @@ export interface DatePickerReactData {
|
|
|
195
212
|
|
|
196
213
|
export interface DatePickerInternalData {
|
|
197
214
|
hpTimeout?: undefined | number
|
|
215
|
+
parseInputKayMaps: Record<string, (evnt: KeyboardEvent, targetElem: HTMLInputElement, isUpArrow: boolean) => void>
|
|
198
216
|
}
|
|
199
217
|
|
|
200
218
|
export interface DatePickerMethods {
|