vxe-pc-ui 4.9.15 → 4.9.17
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/es/icon/style.css +1 -1
- package/es/image/src/preview.js +8 -2
- package/es/input/src/input.js +8 -1
- package/es/number-input/src/number-input.js +8 -1
- package/es/style.css +1 -1
- package/es/style.min.css +1 -1
- package/es/text/src/text.js +93 -30
- package/es/text/style.css +13 -8
- package/es/text/style.min.css +1 -1
- package/es/ui/index.js +1 -1
- package/es/ui/src/log.js +1 -1
- package/es/vxe-text/style.css +13 -8
- package/es/vxe-text/style.min.css +1 -1
- package/lib/icon/style/style.css +1 -1
- package/lib/icon/style/style.min.css +1 -1
- package/lib/image/src/preview.js +10 -2
- package/lib/image/src/preview.min.js +1 -1
- package/lib/index.umd.js +118 -21
- package/lib/index.umd.min.js +1 -1
- package/lib/input/src/input.js +10 -1
- package/lib/input/src/input.min.js +1 -1
- package/lib/number-input/src/number-input.js +10 -1
- package/lib/number-input/src/number-input.min.js +1 -1
- package/lib/style.css +1 -1
- package/lib/style.min.css +1 -1
- package/lib/text/src/text.js +86 -16
- package/lib/text/src/text.min.js +1 -1
- package/lib/text/style/style.css +13 -8
- package/lib/text/style/style.min.css +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/lib/vxe-text/style/style.css +13 -8
- package/lib/vxe-text/style/style.min.css +1 -1
- package/package.json +1 -1
- package/packages/image/src/preview.ts +8 -2
- package/packages/input/src/input.ts +10 -2
- package/packages/number-input/src/number-input.ts +10 -6
- package/packages/text/src/text.ts +95 -24
- package/styles/components/text.scss +13 -5
- package/types/components/column.d.ts +1 -1
- package/types/components/countdown.d.ts +8 -0
- package/types/components/table.d.ts +31 -0
- package/types/components/text.d.ts +20 -1
- /package/es/icon/{iconfont.1757057037549.ttf → iconfont.1757125817990.ttf} +0 -0
- /package/es/icon/{iconfont.1757057037549.woff → iconfont.1757125817990.woff} +0 -0
- /package/es/icon/{iconfont.1757057037549.woff2 → iconfont.1757125817990.woff2} +0 -0
- /package/es/{iconfont.1757057037549.ttf → iconfont.1757125817990.ttf} +0 -0
- /package/es/{iconfont.1757057037549.woff → iconfont.1757125817990.woff} +0 -0
- /package/es/{iconfont.1757057037549.woff2 → iconfont.1757125817990.woff2} +0 -0
- /package/lib/icon/style/{iconfont.1757057037549.ttf → iconfont.1757125817990.ttf} +0 -0
- /package/lib/icon/style/{iconfont.1757057037549.woff → iconfont.1757125817990.woff} +0 -0
- /package/lib/icon/style/{iconfont.1757057037549.woff2 → iconfont.1757125817990.woff2} +0 -0
- /package/lib/{iconfont.1757057037549.ttf → iconfont.1757125817990.ttf} +0 -0
- /package/lib/{iconfont.1757057037549.woff → iconfont.1757125817990.woff} +0 -0
- /package/lib/{iconfont.1757057037549.woff2 → iconfont.1757125817990.woff2} +0 -0
package/lib/image/src/preview.js
CHANGED
|
@@ -390,8 +390,10 @@ var _default = exports.default = (0, _comp.defineVxeComponent)({
|
|
|
390
390
|
const wheelEvent = evnt => {
|
|
391
391
|
const delta = evnt.deltaY;
|
|
392
392
|
if (delta > 0) {
|
|
393
|
+
evnt.preventDefault();
|
|
393
394
|
handleZoom(false);
|
|
394
395
|
} else if (delta < 0) {
|
|
396
|
+
evnt.preventDefault();
|
|
395
397
|
handleZoom(true);
|
|
396
398
|
}
|
|
397
399
|
};
|
|
@@ -588,8 +590,7 @@ var _default = exports.default = (0, _comp.defineVxeComponent)({
|
|
|
588
590
|
ref: refElem,
|
|
589
591
|
class: ['vxe-image-preview', {
|
|
590
592
|
'is--pct11': offsetPct11
|
|
591
|
-
}]
|
|
592
|
-
onWheel: wheelEvent
|
|
593
|
+
}]
|
|
593
594
|
}, [renderImgWrapper(), renderBtnWrapper()]);
|
|
594
595
|
};
|
|
595
596
|
(0, _vue.watch)(() => props.modelValue, val => {
|
|
@@ -597,11 +598,18 @@ var _default = exports.default = (0, _comp.defineVxeComponent)({
|
|
|
597
598
|
resetStyle();
|
|
598
599
|
});
|
|
599
600
|
(0, _vue.onMounted)(() => {
|
|
601
|
+
const elem = refElem.value;
|
|
602
|
+
if (elem) {
|
|
603
|
+
elem.addEventListener('wheel', wheelEvent, {
|
|
604
|
+
passive: false
|
|
605
|
+
});
|
|
606
|
+
}
|
|
600
607
|
_ui.globalEvents.on($xeImagePreview, 'keydown', handleGlobalKeydownEvent);
|
|
601
608
|
});
|
|
602
609
|
(0, _vue.onBeforeUnmount)(() => {
|
|
603
610
|
const elem = refElem.value;
|
|
604
611
|
if (elem) {
|
|
612
|
+
elem.removeEventListener('wheel', wheelEvent);
|
|
605
613
|
(0, _dom.removeClass)(elem, 'is--move');
|
|
606
614
|
}
|
|
607
615
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var _vue=require("vue"),_comp=require("../../ui/src/comp"),_ui=require("../../ui"),_xeUtils=_interopRequireDefault(require("xe-utils")),_dom=require("../../ui/src/dom");function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}var _default=exports.default=(0,_comp.defineVxeComponent)({name:"VxeImagePreview",props:{modelValue:Number,urlList:Array,urlField:{type:String,default:()=>(0,_ui.getConfig)().imagePreview.urlField},maskClosable:{type:Boolean,default:()=>(0,_ui.getConfig)().imagePreview.maskClosable},marginSize:{type:String,default:()=>(0,_ui.getConfig)().imagePreview.marginSize},showPrintButton:{type:Boolean,default:()=>(0,_ui.getConfig)().imagePreview.showPrintButton},showDownloadButton:{type:Boolean,default:()=>(0,_ui.getConfig)().imagePreview.showDownloadButton},toolbarConfig:Object,beforeDownloadMethod:Function,downloadMethod:Function},emits:["update:modelValue","change","download","download-fail","rotate","close"],setup(u,e){const a=e["emit"];var t=_xeUtils.default.uniqueId();const i=(0,_vue.ref)(),o={refElem:i},c=(0,_vue.reactive)({activeIndex:u.modelValue||0,offsetPct11:!1,offsetScale:0,offsetRotate:0,offsetLeft:0,offsetTop:0}),r=(0,_vue.computed)(()=>u.urlField||"url"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var _vue=require("vue"),_comp=require("../../ui/src/comp"),_ui=require("../../ui"),_xeUtils=_interopRequireDefault(require("xe-utils")),_dom=require("../../ui/src/dom");function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}var _default=exports.default=(0,_comp.defineVxeComponent)({name:"VxeImagePreview",props:{modelValue:Number,urlList:Array,urlField:{type:String,default:()=>(0,_ui.getConfig)().imagePreview.urlField},maskClosable:{type:Boolean,default:()=>(0,_ui.getConfig)().imagePreview.maskClosable},marginSize:{type:String,default:()=>(0,_ui.getConfig)().imagePreview.marginSize},showPrintButton:{type:Boolean,default:()=>(0,_ui.getConfig)().imagePreview.showPrintButton},showDownloadButton:{type:Boolean,default:()=>(0,_ui.getConfig)().imagePreview.showDownloadButton},toolbarConfig:Object,beforeDownloadMethod:Function,downloadMethod:Function},emits:["update:modelValue","change","download","download-fail","rotate","close"],setup(u,e){const a=e["emit"];var t=_xeUtils.default.uniqueId();const i=(0,_vue.ref)(),o={refElem:i},c=(0,_vue.reactive)({activeIndex:u.modelValue||0,offsetPct11:!1,offsetScale:0,offsetRotate:0,offsetLeft:0,offsetTop:0}),r=(0,_vue.computed)(()=>u.urlField||"url"),d=(0,_vue.computed)(()=>_xeUtils.default.toNumber(u.marginSize||0)||16),s=(0,_vue.computed)(()=>Object.assign({},(0,_ui.getConfig)().imagePreview.toolbarConfig,u.toolbarConfig)),l=(0,_vue.computed)(()=>{var e=c["offsetRotate"];return e?e+"°":"0°"}),v=(0,_vue.computed)(()=>{var e=c["offsetScale"];return e?_xeUtils.default.ceil(100*(1+e))+"%":"100%"}),_=(0,_vue.computed)(()=>{var e=u["urlList"];const t=r.value;return e&&e.length?e.map(e=>_xeUtils.default.isString(e)?e:e[t]||""):[]}),n=(0,_vue.computed)(()=>{var{offsetScale:e,offsetRotate:o,offsetLeft:a,offsetTop:i}=c,r=[];let n=1;if(e&&(n=1+e,r.push(`scale(${n})`)),o&&r.push(`rotate(${o}deg)`),a||i){let e=a/=n,t=i/=n;if(o)switch(o%360){case 90:case-270:e=i,t=-a;break;case 180:case-180:e=-a,t=-i;break;case 270:case-90:e=-i,t=a}r.push(`translate(${e}px, ${t}px)`)}return r.length?r.join(" "):""}),f={computeImgList:_},m={xID:t,props:u,context:e,reactData:c,getRefMaps:()=>o,getComputeMaps:()=>f},p=(e,t,o)=>{a(e,(0,_ui.createEvent)(o,{$imagePreview:m},t))};t={dispatchEvent:p};const g=e=>{c.activeIndex=e,a("update:modelValue",e)},E=e=>{p("close",{},e)};const h=()=>{var e=i.value;(0,_dom.removeClass)(e,"is--move"),Object.assign(c,{offsetPct11:!1,offsetScale:0,offsetRotate:0,offsetLeft:0,offsetTop:0})},w=()=>{var e=c["offsetScale"];let t=.02;return t=-.6<=e&&(t=.04,-.4<=e)&&(t=.07,0<=e)&&(t=.1,3<=e)&&(t=.25,8<=e)&&(t=.4,16<=e)&&(t=.6,24<=e)&&(t=.9,32<=e)&&(t=1.3,39<=e)&&(t=1.9,45<=e)?2.5:t},x=e=>{var t=c["offsetScale"],o=w();c.offsetScale=e?Number(Math.min(49,t+o).toFixed(2)):Number(Math.max(-.9,t-o).toFixed(2))},I=(e,t)=>{let o=c.activeIndex||0;var a=_.value,t=(t?o>=a.length-1?o=0:o++:o<=0?o=a.length-1:o--,a[o||0]);c.activeIndex=o,h(),g(o),p("change",{url:t,activeIndex:o},e)},b=(e,t)=>{var o=_.value,a=c["activeIndex"],o=o[a||0];let i=c.offsetRotate;t?i+=90:i-=90,c.offsetRotate=i,p("rotate",{url:o,rotateValue:i},e)},P=()=>{var e=c["activeIndex"],e=_.value[e||0];_ui.VxeUI.print&&_ui.VxeUI.print({align:"center",pageBreaks:[{bodyHtml:`<img src="${e}" style="max-width:100%;max-height:100%;">`}]})},R=(e,t)=>{p("download",{url:t},e)},V=a=>{const i=c["activeIndex"];var e=s.value.download,e=!_xeUtils.default.isBoolean(e)&&e?Object.assign({},e):{};const r=_.value[i||0];var t=u.beforeDownloadMethod||e.beforeDownloadMethod||(0,_ui.getConfig)().imagePreview.beforeDownloadMethod;const n=u.downloadMethod||e.downloadMethod||(0,_ui.getConfig)().imagePreview.downloadMethod;Promise.resolve(!t||t({$imagePreview:m,url:r,index:i||0})).then(e=>{var t,o;e&&(n?Promise.resolve(n({$imagePreview:m,url:r,index:i||0})).then(()=>{R(a,r)}).catch(e=>e):(t=a,o=r,_ui.VxeUI.saveFile&&fetch(o).then(e=>e.blob().then(e=>{_ui.VxeUI.saveFile({filename:o,content:e}),R(t,o)})).catch(()=>{_ui.VxeUI.modal&&_ui.VxeUI.modal.message({content:(0,_ui.getI18n)("vxe.error.downErr"),status:"error"})})))})},L=(e,t)=>{var o=c["activeIndex"];if(_.value[o||0])switch(t){case"zoomOut":x(!1);break;case"zoomIn":x(!0);break;case"pctFull":h();break;case"pct11":h(),c.offsetPct11=!0;break;case"rotateLeft":b(e,!1);break;case"rotateRight":b(e,!0);break;case"print":P();break;case"download":V(e)}},O=e=>{var t=e.deltaY;0<t?(e.preventDefault(),x(!1)):t<0&&(e.preventDefault(),x(!0))},C=e=>{const{offsetTop:r,offsetLeft:n}=c,u=i.value,t=(e.preventDefault(),document.onmousemove),o=document.onmouseup,s=e.pageX,l=e.pageY,v=d.value;document.onmousemove=e=>{var{pageX:t,pageY:o}=e,{visibleHeight:a,visibleWidth:i}=(0,_dom.getDomNode)();e.preventDefault(),(0,_dom.addClass)(u,"is--move"),t>v&&o>v&&t<i-v&&o<a-v&&(c.offsetLeft=n+t-s,c.offsetTop=r+o-l)},document.onmouseup=()=>{document.onmousemove=t,document.onmouseup=o,(0,_dom.removeClass)(u,"is--move")}},M=e=>{var t=(0,_dom.hasControlKey)(e),o=e.shiftKey,a=_ui.globalEvents.hasKey(e,_ui.GLOBAL_EVENT_KEYS.ARROW_UP),i=_ui.globalEvents.hasKey(e,_ui.GLOBAL_EVENT_KEYS.ARROW_DOWN),r=_ui.globalEvents.hasKey(e,_ui.GLOBAL_EVENT_KEYS.ARROW_LEFT),n=_ui.globalEvents.hasKey(e,_ui.GLOBAL_EVENT_KEYS.ARROW_RIGHT),u=_ui.globalEvents.hasKey(e,_ui.GLOBAL_EVENT_KEYS.R),s=_ui.globalEvents.hasKey(e,_ui.GLOBAL_EVENT_KEYS.P);a?(e.preventDefault(),o?--c.offsetTop:x(!0)):i?(e.preventDefault(),o?c.offsetTop+=1:x(!1)):r?(e.preventDefault(),o?--c.offsetLeft:I(e,!1)):n?(e.preventDefault(),o?c.offsetLeft+=1:I(e,!0)):u&&t?(e.preventDefault(),o?b(e,!1):b(e,!0)):s&&t&&(e.preventDefault(),P())},T=e=>{u.maskClosable&&e.target===e.currentTarget&&p("close",{},e)},y=(Object.assign(m,t,{}),(t,e)=>{var o=s.value[t],a=!_xeUtils.default.isBoolean(o)&&o?Object.assign({},o):{};return!1!==o?(0,_vue.h)("div",{class:"vxe-image-preview--operation-btn",title:(0,_ui.getI18n)("vxe.imagePreview.operBtn."+t),onClick(e){L(e,t)}},[(0,_vue.h)("i",{class:a.icon||(0,_ui.getIcon)()[e]})]):(0,_ui.renderEmptyElement)(m)});e=()=>{var e=c["offsetPct11"];return(0,_vue.h)("div",{ref:i,class:["vxe-image-preview",{"is--pct11":e}]},[(()=>{const o=c["activeIndex"];var e=_.value;const a=n.value;return(0,_vue.h)("div",{class:"vxe-image-preview--img-list",onClick:T},e.map((e,t)=>{t=o===t;return(0,_vue.h)("img",{class:["vxe-image-preview--img-item",{"is--active":t}],src:e,style:t?{transform:a}:null,onMousedown(e){C(e)}})}))})(),(()=>{var{showPrintButton:e,showDownloadButton:t}=u,o=c["activeIndex"],a=_.value,i=l.value,r=v.value,n=s.value;return(0,_vue.h)("div",{class:"vxe-image-preview--btn-wrapper"},[(0,_vue.h)("div",{class:"vxe-image-preview--close-wrapper"},[(0,_vue.h)("div",{class:"vxe-image-preview--close-btn",onClick:E},[(0,_vue.h)("i",{class:(0,_ui.getIcon)().IMAGE_PREVIEW_CLOSE})]),(0,_vue.h)("div",{class:"vxe-image-preview--close-bg"})]),1<a.length?(0,_vue.h)("div",{class:"vxe-image-preview--previous-btn",onClick(e){I(e,!1)}},[(0,_vue.h)("i",{class:(0,_ui.getIcon)().IMAGE_PREVIEW_PREVIOUS})]):(0,_ui.renderEmptyElement)(m),1<a.length?(0,_vue.h)("div",{class:"vxe-image-preview--next-btn",onClick(e){I(e,!0)}},[(0,_vue.h)("i",{class:(0,_ui.getIcon)().IMAGE_PREVIEW_NEXT})]):(0,_ui.renderEmptyElement)(m),(0,_vue.h)("div",{class:"vxe-image-preview--operation-info"},[(0,_vue.h)("div",{class:"vxe-image-preview--operation-deg"},i),(0,_vue.h)("div",{class:"vxe-image-preview--operation-pct"},r)]),(0,_vue.h)("div",{class:"vxe-image-preview--operation-wrapper"},[(0,_vue.h)("div",{class:"vxe-image-preview--operation-active-count"},[(0,_vue.h)("span",{class:"vxe-image-preview--operation-active-current"},""+((o||0)+1)),(0,_vue.h)("span",{class:"vxe-image-preview--operation-active-total"},"/"+a.length)]),y("zoomOut","IMAGE_PREVIEW_ZOOM_OUT"),y("zoomIn","IMAGE_PREVIEW_ZOOM_IN"),y("pctFull","IMAGE_PREVIEW_PCT_FULL"),y("pct11","IMAGE_PREVIEW_PCT_1_1"),y("rotateLeft","IMAGE_PREVIEW_ROTATE_LEFT"),y("rotateRight","IMAGE_PREVIEW_ROTATE_RIGHT"),e||n.print?y("print","IMAGE_PREVIEW_PRINT"):(0,_ui.renderEmptyElement)(m),t||n.download?y("download","IMAGE_PREVIEW_DOWNLOAD"):(0,_ui.renderEmptyElement)(m)])])})()])};return(0,_vue.watch)(()=>u.modelValue,e=>{c.activeIndex=e,h()}),(0,_vue.onMounted)(()=>{var e=i.value;e&&e.addEventListener("wheel",O,{passive:!1}),_ui.globalEvents.on(m,"keydown",M)}),(0,_vue.onBeforeUnmount)(()=>{var e=i.value;e&&(e.removeEventListener("wheel",O),(0,_dom.removeClass)(e,"is--move"))}),(0,_vue.onUnmounted)(()=>{_ui.globalEvents.off(m,"keydown")}),(0,_vue.provide)("$xeImagePreview",m),m.renderVN=e}});
|
package/lib/index.umd.js
CHANGED
|
@@ -3588,14 +3588,14 @@ function checkDynamic() {
|
|
|
3588
3588
|
}
|
|
3589
3589
|
;// CONCATENATED MODULE: ./packages/ui/src/log.ts
|
|
3590
3590
|
|
|
3591
|
-
const log_version = `ui v${"4.9.
|
|
3591
|
+
const log_version = `ui v${"4.9.17"}`;
|
|
3592
3592
|
const warnLog = log.create('warn', log_version);
|
|
3593
3593
|
const errLog = log.create('error', log_version);
|
|
3594
3594
|
;// CONCATENATED MODULE: ./packages/ui/index.ts
|
|
3595
3595
|
|
|
3596
3596
|
|
|
3597
3597
|
|
|
3598
|
-
const ui_version = "4.9.
|
|
3598
|
+
const ui_version = "4.9.17";
|
|
3599
3599
|
index_esm_VxeUI.uiVersion = ui_version;
|
|
3600
3600
|
index_esm_VxeUI.dynamicApp = dynamicApp;
|
|
3601
3601
|
function config(options) {
|
|
@@ -13750,7 +13750,6 @@ function toFloatValueFixed(inputValue, digitsValue) {
|
|
|
13750
13750
|
autocomplete: autoComplete || autocomplete,
|
|
13751
13751
|
onKeydown: keydownEvent,
|
|
13752
13752
|
onKeyup: keyupEvent,
|
|
13753
|
-
onWheel: wheelEvent,
|
|
13754
13753
|
onClick: clickEvent,
|
|
13755
13754
|
onInput: inputEvent,
|
|
13756
13755
|
onChange: changeEvent,
|
|
@@ -13803,6 +13802,12 @@ function toFloatValueFixed(inputValue, digitsValue) {
|
|
|
13803
13802
|
} else if (['password'].includes(type)) {
|
|
13804
13803
|
warnLog('vxe.error.useNew', [`<vxe-input type="${type}" ... />`, '<vxe-password-input ... />']);
|
|
13805
13804
|
}
|
|
13805
|
+
const inputElem = refInputTarget.value;
|
|
13806
|
+
if (inputElem) {
|
|
13807
|
+
inputElem.addEventListener('wheel', wheelEvent, {
|
|
13808
|
+
passive: false
|
|
13809
|
+
});
|
|
13810
|
+
}
|
|
13806
13811
|
globalEvents.on($xeInput, 'mousewheel', handleGlobalMousewheelEvent);
|
|
13807
13812
|
globalEvents.on($xeInput, 'mousedown', handleGlobalMousedownEvent);
|
|
13808
13813
|
globalEvents.on($xeInput, 'keydown', handleGlobalKeydownEvent);
|
|
@@ -13811,6 +13816,10 @@ function toFloatValueFixed(inputValue, digitsValue) {
|
|
|
13811
13816
|
(0,external_commonjs_vue_commonjs2_vue_root_Vue_.onBeforeUnmount)(() => {
|
|
13812
13817
|
numberStopDown();
|
|
13813
13818
|
afterCheckValue();
|
|
13819
|
+
const inputElem = refInputTarget.value;
|
|
13820
|
+
if (inputElem) {
|
|
13821
|
+
inputElem.removeEventListener('wheel', wheelEvent);
|
|
13822
|
+
}
|
|
13814
13823
|
globalEvents.off($xeInput, 'mousewheel');
|
|
13815
13824
|
globalEvents.off($xeInput, 'mousedown');
|
|
13816
13825
|
globalEvents.off($xeInput, 'keydown');
|
|
@@ -14747,7 +14756,6 @@ function toFloatValueFixed(inputValue, digitsValue) {
|
|
|
14747
14756
|
autocomplete: autoComplete || autocomplete,
|
|
14748
14757
|
onKeydown: keydownEvent,
|
|
14749
14758
|
onKeyup: keyupEvent,
|
|
14750
|
-
onWheel: wheelEvent,
|
|
14751
14759
|
onClick: clickEvent,
|
|
14752
14760
|
onInput: inputEvent,
|
|
14753
14761
|
onChange: changeEvent,
|
|
@@ -14862,6 +14870,12 @@ function toFloatValueFixed(inputValue, digitsValue) {
|
|
|
14862
14870
|
initValue();
|
|
14863
14871
|
});
|
|
14864
14872
|
(0,external_commonjs_vue_commonjs2_vue_root_Vue_.onMounted)(() => {
|
|
14873
|
+
const targetElem = refInputTarget.value;
|
|
14874
|
+
if (targetElem) {
|
|
14875
|
+
targetElem.addEventListener('wheel', wheelEvent, {
|
|
14876
|
+
passive: false
|
|
14877
|
+
});
|
|
14878
|
+
}
|
|
14865
14879
|
globalEvents.on($xeNumberInput, 'mousedown', handleGlobalMousedownEvent);
|
|
14866
14880
|
globalEvents.on($xeNumberInput, 'keydown', handleGlobalKeydownEvent);
|
|
14867
14881
|
globalEvents.on($xeNumberInput, 'blur', handleGlobalBlurEvent);
|
|
@@ -14870,6 +14884,10 @@ function toFloatValueFixed(inputValue, digitsValue) {
|
|
|
14870
14884
|
reactData.isFocus = false;
|
|
14871
14885
|
numberStopAll();
|
|
14872
14886
|
afterCheckValue();
|
|
14887
|
+
const targetElem = refInputTarget.value;
|
|
14888
|
+
if (targetElem) {
|
|
14889
|
+
targetElem.removeEventListener('wheel', wheelEvent);
|
|
14890
|
+
}
|
|
14873
14891
|
globalEvents.off($xeNumberInput, 'mousedown');
|
|
14874
14892
|
globalEvents.off($xeNumberInput, 'keydown');
|
|
14875
14893
|
globalEvents.off($xeNumberInput, 'blur');
|
|
@@ -15921,15 +15939,28 @@ const ColorPicker = VxeColorPicker;
|
|
|
15921
15939
|
status: String,
|
|
15922
15940
|
title: [String, Number],
|
|
15923
15941
|
icon: String,
|
|
15942
|
+
prefixIcon: String,
|
|
15943
|
+
suffixIcon: String,
|
|
15924
15944
|
loading: Boolean,
|
|
15925
15945
|
content: [String, Number],
|
|
15926
|
-
clickToCopy:
|
|
15946
|
+
clickToCopy: {
|
|
15947
|
+
type: Boolean,
|
|
15948
|
+
default: () => getConfig().text.clickToCopy
|
|
15949
|
+
},
|
|
15950
|
+
copyIcon: {
|
|
15951
|
+
type: String,
|
|
15952
|
+
default: () => getConfig().text.copyIcon
|
|
15953
|
+
},
|
|
15954
|
+
copyLayout: {
|
|
15955
|
+
type: String,
|
|
15956
|
+
default: () => getConfig().text.copyLayout
|
|
15957
|
+
},
|
|
15927
15958
|
size: {
|
|
15928
15959
|
type: String,
|
|
15929
15960
|
default: () => getConfig().text.size || getConfig().size
|
|
15930
15961
|
}
|
|
15931
15962
|
},
|
|
15932
|
-
emits: ['click'],
|
|
15963
|
+
emits: ['click', 'prefix-click', 'suffix-click'],
|
|
15933
15964
|
setup(props, context) {
|
|
15934
15965
|
const {
|
|
15935
15966
|
emit,
|
|
@@ -15997,30 +16028,88 @@ const ColorPicker = VxeColorPicker;
|
|
|
15997
16028
|
dispatchEvent('click', {}, evnt);
|
|
15998
16029
|
}
|
|
15999
16030
|
};
|
|
16031
|
+
const prefixEvent = evnt => {
|
|
16032
|
+
const {
|
|
16033
|
+
loading
|
|
16034
|
+
} = props;
|
|
16035
|
+
if (!loading) {
|
|
16036
|
+
dispatchEvent('prefix-click', {}, evnt);
|
|
16037
|
+
}
|
|
16038
|
+
};
|
|
16039
|
+
const suffixEvent = evnt => {
|
|
16040
|
+
const {
|
|
16041
|
+
loading
|
|
16042
|
+
} = props;
|
|
16043
|
+
if (!loading) {
|
|
16044
|
+
dispatchEvent('suffix-click', {}, evnt);
|
|
16045
|
+
}
|
|
16046
|
+
};
|
|
16000
16047
|
const textPrivateMethods = {};
|
|
16001
16048
|
Object.assign($xeText, textMethods, textPrivateMethods);
|
|
16049
|
+
const renderCopyIcon = () => {
|
|
16050
|
+
const {
|
|
16051
|
+
copyIcon
|
|
16052
|
+
} = props;
|
|
16053
|
+
return (0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('span', {
|
|
16054
|
+
key: 'ci',
|
|
16055
|
+
class: 'vxe-text--copy-icon',
|
|
16056
|
+
onClick: clickIconEvent
|
|
16057
|
+
}, [(0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('i', {
|
|
16058
|
+
class: copyIcon || getIcon().TEXT_COPY
|
|
16059
|
+
})]);
|
|
16060
|
+
};
|
|
16002
16061
|
const renderContent = () => {
|
|
16003
16062
|
const {
|
|
16004
16063
|
loading,
|
|
16005
16064
|
icon,
|
|
16065
|
+
prefixIcon,
|
|
16066
|
+
suffixIcon,
|
|
16067
|
+
clickToCopy,
|
|
16006
16068
|
content,
|
|
16007
|
-
|
|
16069
|
+
copyLayout
|
|
16008
16070
|
} = props;
|
|
16009
16071
|
const defaultSlot = slots.default;
|
|
16010
|
-
const
|
|
16011
|
-
|
|
16012
|
-
|
|
16013
|
-
|
|
16014
|
-
|
|
16015
|
-
|
|
16016
|
-
|
|
16017
|
-
|
|
16018
|
-
|
|
16019
|
-
|
|
16020
|
-
|
|
16072
|
+
const prefixIconSlot = slots.prefixIcon || slots['prefix-icon'] || slots.icon;
|
|
16073
|
+
const suffixIconSlot = slots.suffixIcon || slots['suffix-icon'];
|
|
16074
|
+
const copyToRight = copyLayout === 'right';
|
|
16075
|
+
const contVNs = [];
|
|
16076
|
+
if (loading) {
|
|
16077
|
+
contVNs.push((0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('span', {
|
|
16078
|
+
key: 'lg',
|
|
16079
|
+
class: 'vxe-text--loading'
|
|
16080
|
+
}, [(0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('i', {
|
|
16081
|
+
class: getIcon().TEXT_LOADING
|
|
16082
|
+
})]));
|
|
16083
|
+
} else if (clickToCopy && !copyToRight) {
|
|
16084
|
+
contVNs.push(renderCopyIcon());
|
|
16085
|
+
}
|
|
16086
|
+
if (prefixIcon || icon) {
|
|
16087
|
+
contVNs.push((0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('span', {
|
|
16088
|
+
key: 'si',
|
|
16089
|
+
class: 'vxe-text--prefix-icon',
|
|
16090
|
+
onClick: prefixEvent
|
|
16091
|
+
}, prefixIconSlot ? prefixIconSlot({}) : [(0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('i', {
|
|
16092
|
+
class: prefixIcon || icon
|
|
16093
|
+
})]));
|
|
16094
|
+
}
|
|
16095
|
+
contVNs.push((0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('span', {
|
|
16096
|
+
key: 'ct',
|
|
16021
16097
|
ref: refContentElem,
|
|
16022
16098
|
class: 'vxe-text--content'
|
|
16023
|
-
}, defaultSlot ? defaultSlot({}) : external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().toValueString(content))
|
|
16099
|
+
}, defaultSlot ? defaultSlot({}) : external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().toValueString(content)));
|
|
16100
|
+
if (suffixIcon) {
|
|
16101
|
+
contVNs.push((0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('span', {
|
|
16102
|
+
key: 'si',
|
|
16103
|
+
class: 'vxe-text--suffix-icon',
|
|
16104
|
+
onClick: suffixEvent
|
|
16105
|
+
}, suffixIconSlot ? suffixIconSlot({}) : [(0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('i', {
|
|
16106
|
+
class: suffixIcon
|
|
16107
|
+
})]));
|
|
16108
|
+
}
|
|
16109
|
+
if (clickToCopy && copyToRight && !loading) {
|
|
16110
|
+
contVNs.push(renderCopyIcon());
|
|
16111
|
+
}
|
|
16112
|
+
return contVNs;
|
|
16024
16113
|
};
|
|
16025
16114
|
const renderVN = () => {
|
|
16026
16115
|
const {
|
|
@@ -24827,8 +24916,10 @@ const IconPicker = VxeIconPicker;
|
|
|
24827
24916
|
const wheelEvent = evnt => {
|
|
24828
24917
|
const delta = evnt.deltaY;
|
|
24829
24918
|
if (delta > 0) {
|
|
24919
|
+
evnt.preventDefault();
|
|
24830
24920
|
handleZoom(false);
|
|
24831
24921
|
} else if (delta < 0) {
|
|
24922
|
+
evnt.preventDefault();
|
|
24832
24923
|
handleZoom(true);
|
|
24833
24924
|
}
|
|
24834
24925
|
};
|
|
@@ -25025,8 +25116,7 @@ const IconPicker = VxeIconPicker;
|
|
|
25025
25116
|
ref: refElem,
|
|
25026
25117
|
class: ['vxe-image-preview', {
|
|
25027
25118
|
'is--pct11': offsetPct11
|
|
25028
|
-
}]
|
|
25029
|
-
onWheel: wheelEvent
|
|
25119
|
+
}]
|
|
25030
25120
|
}, [renderImgWrapper(), renderBtnWrapper()]);
|
|
25031
25121
|
};
|
|
25032
25122
|
(0,external_commonjs_vue_commonjs2_vue_root_Vue_.watch)(() => props.modelValue, val => {
|
|
@@ -25034,11 +25124,18 @@ const IconPicker = VxeIconPicker;
|
|
|
25034
25124
|
resetStyle();
|
|
25035
25125
|
});
|
|
25036
25126
|
(0,external_commonjs_vue_commonjs2_vue_root_Vue_.onMounted)(() => {
|
|
25127
|
+
const elem = refElem.value;
|
|
25128
|
+
if (elem) {
|
|
25129
|
+
elem.addEventListener('wheel', wheelEvent, {
|
|
25130
|
+
passive: false
|
|
25131
|
+
});
|
|
25132
|
+
}
|
|
25037
25133
|
globalEvents.on($xeImagePreview, 'keydown', handleGlobalKeydownEvent);
|
|
25038
25134
|
});
|
|
25039
25135
|
(0,external_commonjs_vue_commonjs2_vue_root_Vue_.onBeforeUnmount)(() => {
|
|
25040
25136
|
const elem = refElem.value;
|
|
25041
25137
|
if (elem) {
|
|
25138
|
+
elem.removeEventListener('wheel', wheelEvent);
|
|
25042
25139
|
removeClass(elem, 'is--move');
|
|
25043
25140
|
}
|
|
25044
25141
|
});
|