vxe-pc-ui 4.4.1 → 4.4.3
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/color-picker/src/color-picker.js +2 -2
- package/es/date-picker/src/date-picker.js +1 -1
- package/es/form/src/form.js +1 -1
- package/es/icon/style.css +1 -1
- package/es/icon-picker/src/icon-picker.js +1 -1
- package/es/input/src/input.js +4 -4
- package/es/number-input/src/number-input.js +3 -3
- package/es/pulldown/src/pulldown.js +1 -1
- package/es/select/src/select.js +67 -19
- package/es/select/style.css +17 -0
- package/es/select/style.min.css +1 -1
- package/es/style.css +1 -1
- package/es/style.min.css +1 -1
- package/es/table-select/src/table-select.js +1 -1
- package/es/tree-select/src/tree-select.js +1 -1
- package/es/ui/index.js +2 -1
- package/es/ui/src/log.js +1 -1
- package/es/vxe-select/style.css +17 -0
- package/es/vxe-select/style.min.css +1 -1
- package/lib/color-picker/src/color-picker.js +2 -2
- package/lib/color-picker/src/color-picker.min.js +1 -1
- package/lib/date-picker/src/date-picker.js +1 -1
- package/lib/date-picker/src/date-picker.min.js +1 -1
- package/lib/form/src/form.js +1 -1
- package/lib/form/src/form.min.js +1 -1
- package/lib/icon/style/style.css +1 -1
- package/lib/icon/style/style.min.css +1 -1
- package/lib/icon-picker/src/icon-picker.js +1 -1
- package/lib/icon-picker/src/icon-picker.min.js +1 -1
- package/lib/index.umd.js +88 -31
- package/lib/index.umd.min.js +1 -1
- package/lib/input/src/input.js +4 -4
- package/lib/input/src/input.min.js +1 -1
- package/lib/number-input/src/number-input.js +3 -3
- package/lib/number-input/src/number-input.min.js +1 -1
- package/lib/pulldown/src/pulldown.js +1 -1
- package/lib/pulldown/src/pulldown.min.js +1 -1
- package/lib/select/src/select.js +70 -14
- package/lib/select/src/select.min.js +1 -1
- package/lib/select/style/style.css +17 -0
- package/lib/select/style/style.min.css +1 -1
- package/lib/style.css +1 -1
- package/lib/style.min.css +1 -1
- package/lib/table-select/src/table-select.js +1 -1
- package/lib/table-select/src/table-select.min.js +1 -1
- package/lib/tree-select/src/tree-select.js +1 -1
- package/lib/tree-select/src/tree-select.min.js +1 -1
- package/lib/ui/index.js +2 -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-select/style/style.css +17 -0
- package/lib/vxe-select/style/style.min.css +1 -1
- package/package.json +1 -1
- package/packages/color-picker/src/color-picker.ts +3 -3
- package/packages/date-picker/src/date-picker.ts +1 -1
- package/packages/form/src/form.ts +1 -1
- package/packages/icon-picker/src/icon-picker.ts +1 -1
- package/packages/input/src/input.ts +4 -4
- package/packages/number-input/src/number-input.ts +3 -3
- package/packages/pulldown/src/pulldown.ts +1 -1
- package/packages/select/src/select.ts +68 -19
- package/packages/table-select/src/table-select.ts +1 -1
- package/packages/tree-select/src/tree-select.ts +1 -1
- package/packages/ui/index.ts +1 -0
- package/styles/components/select.scss +19 -0
- package/types/components/select.d.ts +15 -2
- package/types/ui/global-icon.d.ts +1 -0
- /package/es/icon/{iconfont.1741079794679.ttf → iconfont.1741230076540.ttf} +0 -0
- /package/es/icon/{iconfont.1741079794679.woff → iconfont.1741230076540.woff} +0 -0
- /package/es/icon/{iconfont.1741079794679.woff2 → iconfont.1741230076540.woff2} +0 -0
- /package/es/{iconfont.1741079794679.ttf → iconfont.1741230076540.ttf} +0 -0
- /package/es/{iconfont.1741079794679.woff → iconfont.1741230076540.woff} +0 -0
- /package/es/{iconfont.1741079794679.woff2 → iconfont.1741230076540.woff2} +0 -0
- /package/lib/icon/style/{iconfont.1741079794679.ttf → iconfont.1741230076540.ttf} +0 -0
- /package/lib/icon/style/{iconfont.1741079794679.woff → iconfont.1741230076540.woff} +0 -0
- /package/lib/icon/style/{iconfont.1741079794679.woff2 → iconfont.1741230076540.woff2} +0 -0
- /package/lib/{iconfont.1741079794679.ttf → iconfont.1741230076540.ttf} +0 -0
- /package/lib/{iconfont.1741079794679.woff → iconfont.1741230076540.woff} +0 -0
- /package/lib/{iconfont.1741079794679.woff2 → iconfont.1741230076540.woff2} +0 -0
package/lib/input/src/input.js
CHANGED
|
@@ -902,7 +902,7 @@ var _default = exports.default = (0, _vue.defineComponent)({
|
|
|
902
902
|
const hidePanel = () => {
|
|
903
903
|
return new Promise(resolve => {
|
|
904
904
|
reactData.visiblePanel = false;
|
|
905
|
-
internalData.hpTimeout =
|
|
905
|
+
internalData.hpTimeout = setTimeout(() => {
|
|
906
906
|
reactData.isAniVisible = false;
|
|
907
907
|
resolve();
|
|
908
908
|
}, 350);
|
|
@@ -1233,7 +1233,7 @@ var _default = exports.default = (0, _vue.defineComponent)({
|
|
|
1233
1233
|
}, evnt);
|
|
1234
1234
|
};
|
|
1235
1235
|
const numberDownNextEvent = evnt => {
|
|
1236
|
-
internalData.dnTimeout =
|
|
1236
|
+
internalData.dnTimeout = setTimeout(() => {
|
|
1237
1237
|
numberNextEvent(evnt);
|
|
1238
1238
|
numberDownNextEvent(evnt);
|
|
1239
1239
|
}, 60);
|
|
@@ -1303,7 +1303,7 @@ var _default = exports.default = (0, _vue.defineComponent)({
|
|
|
1303
1303
|
}
|
|
1304
1304
|
};
|
|
1305
1305
|
const numberDownPrevEvent = evnt => {
|
|
1306
|
-
internalData.dnTimeout =
|
|
1306
|
+
internalData.dnTimeout = setTimeout(() => {
|
|
1307
1307
|
numberPrevEvent(evnt);
|
|
1308
1308
|
numberDownPrevEvent(evnt);
|
|
1309
1309
|
}, 60);
|
|
@@ -1317,7 +1317,7 @@ var _default = exports.default = (0, _vue.defineComponent)({
|
|
|
1317
1317
|
} else {
|
|
1318
1318
|
numberNextEvent(evnt);
|
|
1319
1319
|
}
|
|
1320
|
-
internalData.dnTimeout =
|
|
1320
|
+
internalData.dnTimeout = setTimeout(() => {
|
|
1321
1321
|
if (isPrevNumber) {
|
|
1322
1322
|
numberDownPrevEvent(evnt);
|
|
1323
1323
|
} else {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var _vue=require("vue"),_xeUtils=_interopRequireDefault(require("xe-utils")),_ui=require("../../ui"),_utils=require("../../ui/src/utils"),_dom=require("../../ui/src/dom"),_util=require("../../date-picker/src/util"),_util2=require("../../number-input/src/util"),_vn=require("../..//ui/src/vn");function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}var _default=exports.default=(0,_vue.defineComponent)({name:"VxeInput",props:{modelValue:[String,Number,Date],immediate:{type:Boolean,default:!0},name:String,type:{type:String,default:"text"},clearable:{type:Boolean,default:()=>(0,_ui.getConfig)().input.clearable},readonly:{type:Boolean,default:null},disabled:{type:Boolean,default:null},placeholder:{type:String,default:null},maxLength:{type:[String,Number],default:()=>(0,_ui.getConfig)().input.maxLength},autoComplete:{type:String,default:"off"},align:String,form:String,className:String,size:{type:String,default:()=>(0,_ui.getConfig)().input.size||(0,_ui.getConfig)().size},multiple:Boolean,showWordCount:Boolean,countMethod:Function,min:{type:[String,Number],default:null},max:{type:[String,Number],default:null},step:[String,Number],trim:{type:Boolean,default:()=>(0,_ui.getConfig)().input.trim},exponential:{type:Boolean,default:()=>(0,_ui.getConfig)().input.exponential},controls:{type:Boolean,default:()=>(0,_ui.getConfig)().input.controls},digits:{type:[String,Number],default:()=>(0,_ui.getConfig)().input.digits},startDate:{type:[String,Number,Date],default:()=>(0,_ui.getConfig)().input.startDate},endDate:{type:[String,Number,Date],default:()=>(0,_ui.getConfig)().input.endDate},minDate:[String,Number,Date],maxDate:[String,Number,Date],startWeek:Number,startDay:{type:[String,Number],default:()=>(0,_ui.getConfig)().input.startDay},labelFormat:String,valueFormat:String,editable:{type:Boolean,default:!0},festivalMethod:{type:Function,default:()=>(0,_ui.getConfig)().input.festivalMethod},disabledMethod:{type:Function,default:()=>(0,_ui.getConfig)().input.disabledMethod},selectDay:{type:[String,Number],default:()=>(0,_ui.getConfig)().input.selectDay},prefixIcon:String,suffixIcon:String,placement:String,transfer:{type:Boolean,default:null},maxlength:[String,Number],autocomplete:String},emits:["update:modelValue","input","change","keydown","keyup","wheel","click","focus","blur","clear","search-click","toggle-visible","prev-number","next-number","prefix-click","suffix-click","date-prev","date-today","date-next"],setup(A,e){const{slots:G,emit:E}=e,S=(0,_vue.inject)("$xeSelect",null),N=(0,_vue.inject)("$xeTreeSelect",null),D=(0,_vue.inject)("$xeModal",null),V=(0,_vue.inject)("$xeDrawer",null),P=(0,_vue.inject)("$xeTable",null),a=(0,_vue.inject)("$xeForm",null),l=(0,_vue.inject)("xeFormItemInfo",null);var t=_xeUtils.default.uniqueId();const z=(0,_ui.useSize)(A)["computeSize"],L=(0,_vue.reactive)({initialized:!1,panelIndex:0,showPwd:!1,visiblePanel:!1,isAniVisible:!1,panelStyle:{},panelPlacement:"",isActivated:!1,inputValue:A.modelValue,datetimePanelValue:null,datePanelValue:null,datePanelLabel:"",datePanelType:"day",selectMonth:null,currentDate:null}),p={yearSize:12,monthSize:20,quarterSize:8,hpTimeout:void 0,dnTimeout:void 0},k=(0,_vue.ref)(),W=(0,_vue.ref)(),j=(0,_vue.ref)(),M=(0,_vue.ref)(),T=(0,_vue.ref)(),w={refElem:k,refInput:W},i={xID:t,props:A,context:e,reactData:L,internalData:p,getRefMaps:()=>w};let s={};const v=(e,t)=>{var a=A["type"];return"time"===a?(0,_util.toStringTimeDate)(e):_xeUtils.default.toStringDate(e,t)},$=(0,_vue.computed)(()=>{var e=A["transfer"];if(null===e){var t=(0,_ui.getConfig)().input.transfer;if(_xeUtils.default.isBoolean(t))return t;if(P||D||V||a)return!0}return e}),Q=(0,_vue.computed)(()=>!!a&&a.props.readonly),u=(0,_vue.computed)(()=>{var e=A["readonly"];return e}),C=(0,_vue.computed)(()=>{var e=A["disabled"];return null===e?!!a&&a.props.disabled:e}),Z=(0,_vue.computed)(()=>{var{maxLength:e,maxlength:t}=A,e=e||t;return Y.value&&!_xeUtils.default.toNumber(e)?16:e}),o=(0,_vue.computed)(()=>{var e=A["type"];return"time"===e||"datetime"===e}),Y=(0,_vue.computed)(()=>-1<["number","integer","float"].indexOf(A.type)),X=(0,_vue.computed)(()=>_xeUtils.default.getSize(L.inputValue)),J=(0,_vue.computed)(()=>{var e=X.value,t=Z.value;return t&&e>_xeUtils.default.toNumber(t)}),I=(0,_vue.computed)(()=>{return o.value||-1<["date","week","month","quarter","year"].indexOf(A.type)}),O=(0,_vue.computed)(()=>"password"===A.type),ee=(0,_vue.computed)(()=>"search"===A.type),te=(0,_vue.computed)(()=>_xeUtils.default.toInteger(A.digits)||1),ae=(0,_vue.computed)(()=>{var e=A["type"],t=te.value,a=A.step;return"integer"===e?_xeUtils.default.toInteger(a)||1:"float"===e?_xeUtils.default.toNumber(a)||1/Math.pow(10,t):_xeUtils.default.toNumber(a)||1}),le=(0,_vue.computed)(()=>{var e=A["type"],t=Y.value,a=I.value,l=O.value;return A.clearable&&(l||t||a||"text"===e||"search"===e)}),ue=(0,_vue.computed)(()=>A.startDate?_xeUtils.default.toStringDate(A.startDate):null),ie=(0,_vue.computed)(()=>A.endDate?_xeUtils.default.toStringDate(A.endDate):null),ne=(0,_vue.computed)(()=>-1<["date","week","month","quarter","year"].indexOf(A.type)),K=(0,_vue.computed)(()=>{var{modelValue:e,multiple:t}=A,a=I.value;const l=d.value;return t&&e&&a?_xeUtils.default.toValueString(e).split(",").map(e=>{e=v(e,l);return _xeUtils.default.isValidDate(e)?e:null}):[]}),se=(0,_vue.computed)(()=>{var e=K.value;const t=d.value;return e.map(e=>_xeUtils.default.toDateString(e,t))}),re=(0,_vue.computed)(()=>{var e=K.value;const t=_.value;return e.map(e=>_xeUtils.default.toDateString(e,t)).join(", ")}),d=(0,_vue.computed)(()=>{var{type:e,valueFormat:t}=A;return t||("time"===e?"HH:mm:ss":"datetime"===e?"yyyy-MM-dd HH:mm:ss":"yyyy-MM-dd")}),q=(0,_vue.computed)(()=>{var e=A["modelValue"],t=I.value,a=d.value;let l=null;return l=e&&t&&(t=v(e,a),_xeUtils.default.isValidDate(t))?t:l}),ve=(0,_vue.computed)(()=>{var e=ue.value,t=L["selectMonth"];return!(!t||!e)&&t<=e}),oe=(0,_vue.computed)(()=>{var e=ie.value,t=L["selectMonth"];return!(!t||!e)&&e<=t}),de=(0,_vue.computed)(()=>{var e=L["datetimePanelValue"],t=Te.value;return e?_xeUtils.default.toDateString(e,t?"HH:mm:ss":"HH:mm"):""}),pe=(0,_vue.computed)(()=>{var e=q.value,t=o.value;return e&&t?1e3*(3600*e.getHours()+60*e.getMinutes()+e.getSeconds()):0}),_=(0,_vue.computed)(()=>{var e=A["labelFormat"];return I.value?e||(0,_ui.getI18n)("vxe.input.date.labelFormat."+A.type):""}),_e=(0,_vue.computed)(()=>{var{selectMonth:e,currentDate:t}=L,a=p["yearSize"],l=[];if(e&&t){var u=t.getFullYear(),t=e.getFullYear(),i=new Date(t-t%a,0,1);for(let e=-4;e<a+4;e++){var n=_xeUtils.default.getWhatYear(i,e,"first"),s=n.getFullYear();l.push({date:n,isCurrent:!0,isPrev:e<0,isNow:u===s,isNext:e>=a,year:s})}}return l}),ce=(0,_vue.computed)(()=>{if(I.value){var{datePanelType:a,selectMonth:l}=L,u=_e.value;let e="",t;return l&&(e=l.getFullYear(),t=l.getMonth()+1),"quarter"===a?(0,_ui.getI18n)("vxe.input.date.quarterLabel",[e]):"month"===a?(0,_ui.getI18n)("vxe.input.date.monthLabel",[e]):"year"===a?u.length?u[0].year+" - "+u[u.length-1].year:"":(0,_ui.getI18n)("vxe.input.date.dayLabel",[e,t?(0,_ui.getI18n)("vxe.input.date.m"+t):"-"])}return""}),g=(0,_vue.computed)(()=>{var{startDay:e,startWeek:t}=A;return _xeUtils.default.toNumber(_xeUtils.default.isNumber(e)||_xeUtils.default.isString(e)?e:t)}),me=(0,_vue.computed)(()=>{var a=[];if(I.value){let t=g.value;a.push(t);for(let e=0;e<6;e++)6<=t?t=0:t++,a.push(t)}return a}),fe=(0,_vue.computed)(()=>{return I.value?me.value.map(e=>({value:e,label:(0,_ui.getI18n)("vxe.input.date.weeks.w"+e)})):[]}),he=(0,_vue.computed)(()=>{var e;return I.value?(e=fe.value,[{label:(0,_ui.getI18n)("vxe.input.date.weeks.w")}].concat(e)):[]}),xe=(0,_vue.computed)(()=>{var e=_e.value;return _xeUtils.default.chunk(e,4)}),ge=(0,_vue.computed)(()=>{var{selectMonth:e,currentDate:t}=L,a=p["quarterSize"],l=[];if(e&&t){var u=t.getFullYear(),i=(0,_util.getDateQuarter)(t),n=_xeUtils.default.getWhatYear(e,0,"first"),s=n.getFullYear();for(let e=-2;e<a-2;e++){var r=_xeUtils.default.getWhatQuarter(n,e),v=r.getFullYear(),o=(0,_util.getDateQuarter)(r),d=v<s;l.push({date:r,isPrev:d,isCurrent:v===s,isNow:v===u&&o===i,isNext:!d&&s<v,quarter:o})}}return l}),ye=(0,_vue.computed)(()=>{var e=ge.value;return _xeUtils.default.chunk(e,2)}),be=(0,_vue.computed)(()=>{var{selectMonth:t,currentDate:e}=L,a=p["monthSize"],l=[];if(t&&e){var u=e.getFullYear(),i=e.getMonth(),n=_xeUtils.default.getWhatYear(t,0,"first").getFullYear();for(let e=-4;e<a-4;e++){var s=_xeUtils.default.getWhatYear(t,0,e),r=s.getFullYear(),v=s.getMonth(),o=r<n;l.push({date:s,isPrev:o,isCurrent:r===n,isNow:r===u&&v===i,isNext:!o&&n<r,month:v})}}return l}),Ue=(0,_vue.computed)(()=>{var e=be.value;return _xeUtils.default.chunk(e,4)}),Ee=(0,_vue.computed)(()=>{var{selectMonth:t,currentDate:e}=L,a=[];if(t&&e){var l=pe.value,u=me.value,i=e.getFullYear(),n=e.getMonth(),s=e.getDate(),r=t.getFullYear(),v=t.getMonth(),e=t.getDay(),u=-u.indexOf(e),o=new Date(_xeUtils.default.getWhatDay(t,u).getTime()+l);for(let e=0;e<42;e++){var d=_xeUtils.default.getWhatDay(o,e),p=d.getFullYear(),_=d.getMonth(),c=d.getDate(),m=d<t;a.push({date:d,isPrev:m,isCurrent:p===r&&_===v,isNow:p===i&&_===n&&c===s,isNext:!m&&v!==_,label:c})}}return a}),Se=(0,_vue.computed)(()=>{var e=Ee.value;return _xeUtils.default.chunk(e,7)}),Ne=(0,_vue.computed)(()=>{var e=Se.value;const a=g.value;return e.map(e=>{var t=e[0];return[{date:t.date,isWeekNumber:!0,isPrev:!1,isCurrent:!1,isNow:!1,isNext:!1,label:_xeUtils.default.getYearWeek(t.date,a)}].concat(e)})}),De=(0,_vue.computed)(()=>{var t=[];if(o.value)for(let e=0;e<24;e++)t.push({value:e,label:(""+e).padStart(2,"0")});return t}),Ve=(0,_vue.computed)(()=>{var t=[];if(o.value)for(let e=0;e<60;e++)t.push({value:e,label:(""+e).padStart(2,"0")});return t}),Pe=(0,_vue.computed)(()=>{var e=d.value;return!/HH/.test(e)||/mm/.test(e)}),Te=(0,_vue.computed)(()=>{var e=d.value;return!/HH/.test(e)||/ss/.test(e)}),we=(0,_vue.computed)(()=>{return Ve.value}),ke=(0,_vue.computed)(()=>{var{type:e,editable:t,multiple:a}=A;return u.value||a||!t||"week"===e||"quarter"===e}),We=(0,_vue.computed)(()=>{var e=A["type"],t=L["showPwd"],a=Y.value,l=I.value,u=O.value;return l||a||u&&t||"number"===e?"text":e}),Me=(0,_vue.computed)(()=>{var e,t=A["placeholder"];return t?(0,_utils.getFuncText)(t):_xeUtils.default.eqNull(t)?(e=(0,_ui.getConfig)().input.placeholder)?(0,_utils.getFuncText)(e):(0,_ui.getI18n)("vxe.base.pleaseInput"):t}),Ce=(0,_vue.computed)(()=>{var{type:e,immediate:t}=A;return t||!("text"===e||"number"===e||"integer"===e||"float"===e)}),Ae=(0,_vue.computed)(()=>{var e=A["type"],t=L["inputValue"];return Y.value?"integer"===e?_xeUtils.default.toInteger((0,_util2.handleNumber)(t)):_xeUtils.default.toNumber((0,_util2.handleNumber)(t)):0}),Le=(0,_vue.computed)(()=>{var e=A["min"],t=L["inputValue"],a=Y.value,l=Ae.value;return!(!t&&0!==t||!a||null===e)&&l<=_xeUtils.default.toNumber(e)}),Ye=(0,_vue.computed)(()=>{var e=A["max"],t=L["inputValue"],a=Y.value,l=Ae.value;return!(!t&&0!==t||!a||null===e)&&l>=_xeUtils.default.toNumber(e)}),Ie=e=>{var{type:t,exponential:a}=A,l=Z.value,u=te.value,t="float"===t?(0,_util2.toFloatValueFixed)(e,u):_xeUtils.default.toValueString(e);return!a||e!==t&&_xeUtils.default.toValueString(e).toLowerCase()!==_xeUtils.default.toNumber(t).toExponential()?t.slice(0,l):e},Oe=e=>{E("update:modelValue",e)},c=e=>{var t=L["inputValue"];s.dispatchEvent(e.type,{value:t},e)},m=(e,t)=>{A.trim&&(e=(""+(e||"")).trim()),L.inputValue=e,Oe(e),s.dispatchEvent("input",{value:e},t),_xeUtils.default.toValueString(A.modelValue)!==e&&(s.dispatchEvent("change",{value:e},t),S||N||a&&l&&a.triggerItemEvent(t,l.itemConfig.field,e))},Ke=(e,t)=>{var a=I.value,l=Ce.value;L.inputValue=e,a||(l?m(e,t):s.dispatchEvent("input",{value:e},t))},qe=e=>{var t=e.target.value;Ke(t,e)},Be=e=>{Ce.value||c(e)},Re=e=>{var t=L["inputValue"];Ce.value||m(t,e),b(),L.visiblePanel||(L.isActivated=!1),s.dispatchEvent("blur",{value:t},e),S||N||a&&l&&a.triggerItemEvent(e,l.itemConfig.field,t)},Fe=e=>{var t=L["inputValue"],a=Y.value,l=I.value;L.isActivated=!0,a?L.inputValue=(0,_utils.eqEmptyValue)(t)?"":""+_xeUtils.default.toNumber(t):l&&Nt(e),c(e)},He=e=>{var t;C.value||(t=L["inputValue"],s.dispatchEvent("prefix-click",{value:t},e))},y=()=>new Promise(e=>{L.visiblePanel=!1,p.hpTimeout=window.setTimeout(()=>{L.isAniVisible=!1,e()},350)}),Ge=(e,t)=>{var a=A["type"],l=Y.value;I.value&&y(),(l||-1<["text","search","password"].indexOf(a))&&focus(),m("",e),s.dispatchEvent("clear",{value:t},e)},ze=e=>{var t;C.value||(t=L["inputValue"],s.dispatchEvent("suffix-click",{value:t},e))},n=e=>{var t=A["type"],a=_.value,l=d.value,u=g.value;let i=null,n="";e&&(i=v(e,l)),_xeUtils.default.isValidDate(i)?(n=_xeUtils.default.toDateString(i,a,{firstDay:u}),a&&"week"===t&&(e=_xeUtils.default.getYearWeek(i,u),(l=_xeUtils.default.getWhatWeek(i,0,1===e?(6+u)%7:u,u).getFullYear())!==i.getFullYear())&&-1<(t=a.indexOf("yyyy"))&&(e=Number(n.substring(t,t+4)))&&!isNaN(e)&&(n=n.replace(""+e,""+l))):i=null,L.datePanelValue=i,L.datePanelLabel=n},je=()=>{var e=I.value,t=L["inputValue"];e&&(n(t),L.inputValue=A.multiple?re.value:L.datePanelLabel)},$e=()=>{var e=A["type"],t=L["inputValue"],a=I.value,l=te.value;a?je():"float"===e&&t&&t!==(a=(0,_util2.toFloatValueFixed)(t,l))&&m(a,{type:"init"})},Qe=e=>null===A.max||_xeUtils.default.toNumber(e)<=_xeUtils.default.toNumber(A.max),Ze=e=>null===A.min||_xeUtils.default.toNumber(e)>=_xeUtils.default.toNumber(A.min),Xe=()=>{L.inputValue=A.multiple?re.value:L.datePanelLabel},f=e=>{var t=g.value,a=_xeUtils.default.getYearWeek(e,t),t=_xeUtils.default.getWhatWeek(e,0,t,t),a=_xeUtils.default.getWhatMonth(1===a?_xeUtils.default.getWhatDay(t,6):e,0,"first");_xeUtils.default.isEqual(a,L.selectMonth)||(L.selectMonth=a)},h=t=>{var{modelValue:e,multiple:a}=A;const l=L["datetimePanelValue"];var u=o.value;const i=d.value;var n=g.value;"week"===A.type?(r=_xeUtils.default.toNumber(A.selectDay),t=_xeUtils.default.getWhatWeek(t,0,r,n)):u&&(t.setHours(l.getHours()),t.setMinutes(l.getMinutes()),t.setSeconds(l.getSeconds()));const s=_xeUtils.default.toDateString(t,i,{firstDay:n});if(f(t),a){var r=se.value;if(u){n=[...K.value];const v=[];a=_xeUtils.default.findIndexOf(n,e=>_xeUtils.default.isDateSame(t,e,"yyyyMMdd"));-1===a?n.push(t):n.splice(a,1),n.forEach(e=>{e&&(e.setHours(l.getHours()),e.setMinutes(l.getMinutes()),e.setSeconds(l.getSeconds()),v.push(e))}),m(v.map(e=>_xeUtils.default.toDateString(e,i)).join(","),{type:"update"})}else r.some(e=>_xeUtils.default.isEqual(e,s))?m(r.filter(e=>!_xeUtils.default.isEqual(e,s)).join(","),{type:"update"}):m(r.concat([s]).join(","),{type:"update"})}else _xeUtils.default.isEqual(e,s)||m(s,{type:"update"})},b=()=>{var{type:a,min:l,max:u,exponential:t}=A,{inputValue:i,datetimePanelValue:n}=L,s=Y.value,e=I.value,r=_.value;if(!ke.value)if(s){if(i){let e="integer"===a?_xeUtils.default.toInteger((0,_util2.handleNumber)(i)):_xeUtils.default.toNumber((0,_util2.handleNumber)(i));Ze(e)?Qe(e)||(e=u):e=l,t&&(s=_xeUtils.default.toValueString(i).toLowerCase())===_xeUtils.default.toNumber(e).toExponential()&&(e=s),m(Ie(e),{type:"check"})}}else if(e)if(i){let t=v(i,r);if(_xeUtils.default.isValidDate(t))if("time"===a)i!==(t=_xeUtils.default.toDateString(t,r))&&m(t,{type:"check"}),L.inputValue=t;else{let e=!1;u=g.value;"datetime"===a?(l=q.value,i===_xeUtils.default.toDateString(l,r)&&i===_xeUtils.default.toDateString(t,r)||(e=!0,n.setHours(t.getHours()),n.setMinutes(t.getMinutes()),n.setSeconds(t.getSeconds()))):e=!0,L.inputValue=_xeUtils.default.toDateString(t,r,{firstDay:u}),e&&h(t)}else Xe()}else m("",{type:"check"})},Je=e=>{var t=L["showPwd"],a=C.value,l=u.value;a||l||(L.showPwd=!t),s.dispatchEvent("toggle-visible",{visible:L.showPwd},e)},et=e=>{s.dispatchEvent("search-click",{},e)},tt=(e,t)=>{var{min:a,max:l,type:u}=A,i=L["inputValue"],n=ae.value,u="integer"===u?_xeUtils.default.toInteger((0,_util2.handleNumber)(i)):_xeUtils.default.toNumber((0,_util2.handleNumber)(i)),i=e?_xeUtils.default.add(u,n):_xeUtils.default.subtract(u,n);let s;s=Ze(i)?Qe(i)?i:l:a,Ke(Ie(s),t)},r=e=>{var t=C.value,a=u.value,l=Le.value;U(),t||a||l||tt(!1,e),s.dispatchEvent("next-number",{value:L.inputValue},e)},at=e=>{p.dnTimeout=window.setTimeout(()=>{r(e),at(e)},60)},x=e=>{var t=C.value,a=u.value,l=Ye.value;U(),t||a||l||tt(!0,e),s.dispatchEvent("prev-number",{value:L.inputValue},e)},lt=e=>{var t=_ui.globalEvents.hasKey(e,_ui.GLOBAL_EVENT_KEYS.ARROW_UP),a=_ui.globalEvents.hasKey(e,_ui.GLOBAL_EVENT_KEYS.ARROW_DOWN);(t||a)&&(e.preventDefault(),(t?x:r)(e))},ut=e=>{var t,a,l,u,i,n,s,{exponential:r,controls:v}=A;Y.value&&(t=e.ctrlKey,a=e.shiftKey,l=e.altKey,u=e.keyCode,i=_ui.globalEvents.hasKey(e,_ui.GLOBAL_EVENT_KEYS.ESCAPE),n=_ui.globalEvents.hasKey(e,_ui.GLOBAL_EVENT_KEYS.ARROW_UP),s=_ui.globalEvents.hasKey(e,_ui.GLOBAL_EVENT_KEYS.ARROW_DOWN),t||a||l||!(_ui.globalEvents.hasKey(e,_ui.GLOBAL_EVENT_KEYS.SPACEBAR)||(!r||69!==u)&&65<=u&&u<=90||186<=u&&u<=188||191<=u)||e.preventDefault(),i?b():(n||s)&&v&<(e)),c(e)},it=e=>{c(e)},U=()=>{var e=p["dnTimeout"];e&&(clearTimeout(e),p.dnTimeout=void 0)},nt=e=>{p.dnTimeout=window.setTimeout(()=>{x(e),nt(e)},60)},st=e=>{if(U(),0===e.button){const t=(0,_dom.hasClass)(e.currentTarget,"is--prev");(t?x:r)(e),p.dnTimeout=window.setTimeout(()=>{(t?nt:at)(e)},500)}},rt=e=>{var t;Y.value&&A.controls&&L.isActivated&&(0<(t=e.deltaY)?r(e):t<0&&x(e),e.preventDefault()),c(e)},vt=(e,t)=>{var a=g.value,l=_xeUtils.default.getYearWeek(e,a),a=_xeUtils.default.getWhatWeek(e,0,a,a),l=_xeUtils.default.getWhatMonth(1===l?_xeUtils.default.getWhatDay(a,6):e,t,"first");L.selectMonth=l},ot=()=>{var e=_xeUtils.default.getWhatDay(Date.now(),0,"first");L.currentDate=e,vt(e,0)},dt=()=>{let e=L["datePanelType"];e="month"===e||"quarter"===e?"year":"month",L.datePanelType=e},pt=t=>{var a=A["type"],{datePanelType:l,selectMonth:u,inputValue:i}=L,n=p["yearSize"];if(!ve.value){let e;e="year"===a?_xeUtils.default.getWhatYear(u,-n,"first"):"month"===a||"quarter"===a?"year"===l?_xeUtils.default.getWhatYear(u,-n,"first"):_xeUtils.default.getWhatYear(u,-1,"first"):"year"===l?_xeUtils.default.getWhatYear(u,-n,"first"):"month"===l?_xeUtils.default.getWhatYear(u,-1,"first"):_xeUtils.default.getWhatMonth(u,-1,"first"),L.selectMonth=e,s.dispatchEvent("date-prev",{viewType:l,viewDate:e,value:i,type:a},t)}},_t=e=>{ot(),A.multiple||(h(L.currentDate),y()),s.dispatchEvent("date-today",{type:A.type},e)},ct=t=>{var a=A["type"],{datePanelType:l,selectMonth:u,inputValue:i}=L,n=p["yearSize"];if(!oe.value){let e;e="year"===a?_xeUtils.default.getWhatYear(u,n,"first"):"month"===a||"quarter"===a?"year"===l?_xeUtils.default.getWhatYear(u,n,"first"):_xeUtils.default.getWhatYear(u,1,"first"):"year"===l?_xeUtils.default.getWhatYear(u,n,"first"):"month"===l?_xeUtils.default.getWhatYear(u,1,"first"):_xeUtils.default.getWhatMonth(u,1,"first"),L.selectMonth=e,s.dispatchEvent("date-next",{viewType:l,viewDate:e,value:i,type:a},t)}},B=e=>{var t=A["disabledMethod"],a=L["datePanelType"],l=ue.value,u=ie.value,e=e["date"];return!!(l&&l.getTime()>e.getTime())||!!(u&&u.getTime()<e.getTime())||!!t&&t({type:a,viewType:a,date:e,$input:i})},mt=e=>{var{type:t,multiple:a}=A,l=L["datePanelType"];"month"===t?"year"===l?(L.datePanelType="month",f(e)):(h(e),a||y()):"year"===t?(h(e),a||y()):"quarter"===t?"year"===l?(L.datePanelType="quarter",f(e)):(h(e),a||y()):"month"===l?(L.datePanelType="week"===t?t:"day",f(e)):"year"===l?(L.datePanelType="month",f(e)):(h(e),"datetime"===t||a||y())},R=e=>{B(e)||mt(e.date)},ft=t=>{B({date:t})||(Ee.value.some(e=>_xeUtils.default.isDateSame(e.date,t,"yyyyMMdd"))||f(t),n(t))},ht=t=>{B({date:t})||(_e.value.some(e=>_xeUtils.default.isDateSame(e.date,t,"yyyy"))||f(t),n(t))},xt=t=>{B({date:t})||(ge.value.some(e=>_xeUtils.default.isDateSame(e.date,t,"yyyyq"))||f(t),n(t))},gt=t=>{B({date:t})||(be.value.some(e=>_xeUtils.default.isDateSame(e.date,t,"yyyyMM"))||f(t),n(t))},F=e=>{var t;B(e)||(t=L["datePanelType"],("month"===t?gt:"quarter"===t?xt:"year"===t?ht:ft)(e.date))},yt=e=>{var t;e&&(t=e.offsetHeight,e.parentNode.scrollTop=e.offsetTop-4*t)},bt=e=>{L.datetimePanelValue=new Date(L.datetimePanelValue.getTime()),yt(e.currentTarget)},Ut=()=>{var e=A["multiple"];const t=L["datetimePanelValue"];var a=q.value,l=o.value;if(l){const u=d.value;if(e){e=se.value;if(l){l=[...K.value];const i=[];l.forEach(e=>{e&&(e.setHours(t.getHours()),e.setMinutes(t.getMinutes()),e.setSeconds(t.getSeconds()),i.push(e))}),m(i.map(e=>_xeUtils.default.toDateString(e,u)).join(","),{type:"update"})}else m(e.join(","),{type:"update"})}else h(a||L.currentDate)}y()},Et=()=>(0,_vue.nextTick)().then(()=>{var l=A["placement"],u=L["panelIndex"],i=W.value,n=j.value,e=$.value;if(i&&n){var s=i.offsetHeight,r=i.offsetWidth,v=n.offsetHeight,n=n.offsetWidth,u={zIndex:u},{boundingTop:i,boundingLeft:o,visibleHeight:d,visibleWidth:p}=(0,_dom.getAbsolutePos)(i);let a="bottom";if(e){let e=o,t=i+s;"top"===l?(a="top",t=i-v):l||(t+v+5>d&&(a="top",t=i-v),t<5&&(a="bottom",t=i+s)),e+n+5>p&&(e-=e+n+5-p),e<5&&(e=5),Object.assign(u,{left:e+"px",top:t+"px",minWidth:r+"px"})}else"top"===l?(a="top",u.bottom=s+"px"):l||(u.top=s+"px",d<i+s+v&&5<i-s-v&&(a="top",u.top="",u.bottom=s+"px"));return L.panelStyle=u,L.panelPlacement=a,(0,_vue.nextTick)()}}),St=()=>{var e=L["visiblePanel"],t=p["hpTimeout"],a=C.value,l=I.value;return(a||e?(0,_vue.nextTick):(L.initialized||(L.initialized=!0),t&&(clearTimeout(t),p.hpTimeout=void 0),L.isActivated=!0,L.isAniVisible=!0,l&&(a=A.type,e=o.value,t=q.value,-1<["year","quarter","month","week"].indexOf(a)?L.datePanelType=a:L.datePanelType="day",L.currentDate=_xeUtils.default.getWhatDay(Date.now(),0,"first"),t?(vt(t,0),n(t)):ot(),e)&&(L.datetimePanelValue=L.datePanelValue||_xeUtils.default.getWhatDay(Date.now(),0,"first"),(0,_vue.nextTick)(()=>{var e=T.value;_xeUtils.default.arrayEach(e.querySelectorAll("li.is--selected"),e=>{yt(e)})})),setTimeout(()=>{L.visiblePanel=!0},10),L.panelIndex<(0,_utils.getLastZIndex)()&&(L.panelIndex=(0,_utils.nextZIndex)()),Et))()},Nt=e=>{u.value||(e.preventDefault(),St())},Dt=e=>{c(e)},Vt=e=>{var{visiblePanel:t,isActivated:a}=L,l=I.value,u=k.value,i=M.value;!C.value&&a&&(L.isActivated=(0,_dom.getEventTargetNode)(e,u).flag||(0,_dom.getEventTargetNode)(e,i).flag,L.isActivated||(l?t&&(y(),b()):b()))},Pt=t=>{var a=A["clearable"],l=L["visiblePanel"],u=C.value,i=I.value;if(!u){var u=_ui.globalEvents.hasKey(t,_ui.GLOBAL_EVENT_KEYS.TAB),n=_ui.globalEvents.hasKey(t,_ui.GLOBAL_EVENT_KEYS.DELETE),s=_ui.globalEvents.hasKey(t,_ui.GLOBAL_EVENT_KEYS.ESCAPE),r=_ui.globalEvents.hasKey(t,_ui.GLOBAL_EVENT_KEYS.ENTER),v=_ui.globalEvents.hasKey(t,_ui.GLOBAL_EVENT_KEYS.ARROW_LEFT),o=_ui.globalEvents.hasKey(t,_ui.GLOBAL_EVENT_KEYS.ARROW_UP),d=_ui.globalEvents.hasKey(t,_ui.GLOBAL_EVENT_KEYS.ARROW_RIGHT),p=_ui.globalEvents.hasKey(t,_ui.GLOBAL_EVENT_KEYS.ARROW_DOWN),_=_ui.globalEvents.hasKey(t,_ui.GLOBAL_EVENT_KEYS.PAGE_UP),c=_ui.globalEvents.hasKey(t,_ui.GLOBAL_EVENT_KEYS.PAGE_DOWN),v=v||o||d||p;let e=L.isActivated;if(u)e&&b(),e=!1,L.isActivated=e;else if(v){if(i&&e)if(l){var d=t,{isActivated:v,datePanelValue:m,datePanelType:f}=L;if(v){d.preventDefault();var v=_ui.globalEvents.hasKey(d,_ui.GLOBAL_EVENT_KEYS.ARROW_LEFT),h=_ui.globalEvents.hasKey(d,_ui.GLOBAL_EVENT_KEYS.ARROW_UP),x=_ui.globalEvents.hasKey(d,_ui.GLOBAL_EVENT_KEYS.ARROW_RIGHT),d=_ui.globalEvents.hasKey(d,_ui.GLOBAL_EVENT_KEYS.ARROW_DOWN);if("year"===f){let e=_xeUtils.default.getWhatYear(m||Date.now(),0,"first");v?e=_xeUtils.default.getWhatYear(e,-1):h?e=_xeUtils.default.getWhatYear(e,-4):x?e=_xeUtils.default.getWhatYear(e,1):d&&(e=_xeUtils.default.getWhatYear(e,4)),ht(e)}else if("quarter"===f){let e=_xeUtils.default.getWhatQuarter(m||Date.now(),0,"first");v?e=_xeUtils.default.getWhatQuarter(e,-1):h?e=_xeUtils.default.getWhatQuarter(e,-2):x?e=_xeUtils.default.getWhatQuarter(e,1):d&&(e=_xeUtils.default.getWhatQuarter(e,2)),xt(e)}else if("month"===f){let e=_xeUtils.default.getWhatMonth(m||Date.now(),0,"first");v?e=_xeUtils.default.getWhatMonth(e,-1):h?e=_xeUtils.default.getWhatMonth(e,-4):x?e=_xeUtils.default.getWhatMonth(e,1):d&&(e=_xeUtils.default.getWhatMonth(e,4)),gt(e)}else{let e=m||_xeUtils.default.getWhatDay(Date.now(),0,"first");f=g.value;v?e=_xeUtils.default.getWhatDay(e,-1):h?e=_xeUtils.default.getWhatWeek(e,-1,f):x?e=_xeUtils.default.getWhatDay(e,1):d&&(e=_xeUtils.default.getWhatWeek(e,1,f)),ft(e)}}}else(o||p)&&Nt(t)}else r?i&&(l?L.datePanelValue?mt(L.datePanelValue):y():e&&Nt(t)):(_||c)&&i&&e&&(m=t,v=L.isActivated)&&(v=_ui.globalEvents.hasKey(m,_ui.GLOBAL_EVENT_KEYS.PAGE_UP),m.preventDefault(),(v?pt:ct)(m));u||s?l&&y():n&&a&&e&&Ge(t,null)}},Tt=e=>{var t=L["visiblePanel"];C.value||t&&(t=M.value,((0,_dom.getEventTargetNode)(e,t).flag?Et:(y(),b))())},wt=()=>{var{isActivated:e,visiblePanel:t}=L;t?(y(),b()):e&&b()},H=(e,t)=>{var a,l=A["festivalMethod"];return l?(a=L["datePanelType"],e=(a=(l=l({type:a,viewType:a,date:e.date,$input:i}))?_xeUtils.default.isString(l)?{label:l}:l:{}).extra?_xeUtils.default.isString(a.extra)?{label:a.extra}:a.extra:null,l=[(0,_vue.h)("span",{class:["vxe-input--date-label",{"is-notice":a.notice}]},e&&e.label?[(0,_vue.h)("span",""+(t||"")),(0,_vue.h)("span",{class:["vxe-input--date-label--extra",e.important?"is-important":"",e.className],style:e.style},_xeUtils.default.toValueString(e.label))]:[""+(t||"")])],(e=a.label)&&(e=_xeUtils.default.toValueString(e).split(","),l.push((0,_vue.h)("span",{class:["vxe-input--date-festival",a.important?"is-important":"",a.className],style:a.style},[1<e.length?(0,_vue.h)("span",{class:["vxe-input--date-festival--overlap","overlap--"+e.length]},e.map(e=>(0,_vue.h)("span",e.substring(0,3)))):(0,_vue.h)("span",{class:"vxe-input--date-festival--label"},e[0].substring(0,3))]))),l):[""+(t||"")]},kt=()=>{var e=L["datePanelType"];switch(e){case"week":{const i=A["multiple"],{datePanelType:n,datePanelValue:s}=L,r=q.value;var t=he.value,a=Ne.value;const v=K.value,o="yyyyMMdd";return[(0,_vue.h)("table",{class:`vxe-input--date-${n}-view`,cellspacing:0,cellpadding:0,border:0},[(0,_vue.h)("thead",[(0,_vue.h)("tr",t.map(e=>(0,_vue.h)("th",e.label)))]),(0,_vue.h)("tbody",a.map(e=>{const t=i?e.some(t=>v.some(e=>_xeUtils.default.isDateSame(e,t.date,o))):e.some(e=>_xeUtils.default.isDateSame(r,e.date,o)),a=e.some(e=>_xeUtils.default.isDateSame(s,e.date,o));return(0,_vue.h)("tr",e.map(e=>(0,_vue.h)("td",{class:{"is--prev":e.isPrev,"is--current":e.isCurrent,"is--now":e.isNow,"is--next":e.isNext,"is--disabled":B(e),"is--selected":t,"is--hover":a},onClick:()=>R(e),onMouseenter:()=>F(e)},H(e,e.label))))}))])];return}case"month":{const d=A["multiple"],{datePanelType:p,datePanelValue:_}=L,c=q.value;t=Ue.value;const m=K.value,f="yyyyMM";return[(0,_vue.h)("table",{class:`vxe-input--date-${p}-view`,cellspacing:0,cellpadding:0,border:0},[(0,_vue.h)("tbody",t.map(e=>(0,_vue.h)("tr",e.map(t=>(0,_vue.h)("td",{class:{"is--prev":t.isPrev,"is--current":t.isCurrent,"is--now":t.isNow,"is--next":t.isNext,"is--disabled":B(t),"is--selected":d?m.some(e=>_xeUtils.default.isDateSame(e,t.date,f)):_xeUtils.default.isDateSame(c,t.date,f),"is--hover":_xeUtils.default.isDateSame(_,t.date,f)},onClick:()=>R(t),onMouseenter:()=>F(t)},H(t,(0,_ui.getI18n)("vxe.input.date.months.m"+t.month)))))))])];return}case"quarter":{const h=A["multiple"],{datePanelType:x,datePanelValue:g}=L,y=q.value;a=ye.value;const b=K.value,U="yyyyq";return[(0,_vue.h)("table",{class:`vxe-input--date-${x}-view`,cellspacing:0,cellpadding:0,border:0},[(0,_vue.h)("tbody",a.map(e=>(0,_vue.h)("tr",e.map(t=>(0,_vue.h)("td",{class:{"is--prev":t.isPrev,"is--current":t.isCurrent,"is--now":t.isNow,"is--next":t.isNext,"is--disabled":B(t),"is--selected":h?b.some(e=>_xeUtils.default.isDateSame(e,t.date,U)):_xeUtils.default.isDateSame(y,t.date,U),"is--hover":_xeUtils.default.isDateSame(g,t.date,U)},onClick:()=>R(t),onMouseenter:()=>F(t)},H(t,(0,_ui.getI18n)("vxe.input.date.quarters.q"+t.quarter)))))))])];return}case"year":{const E=A["multiple"],{datePanelType:S,datePanelValue:N}=L,D=q.value;var l=xe.value;const V=K.value,P="yyyy";return[(0,_vue.h)("table",{class:`vxe-input--date-${S}-view`,cellspacing:0,cellpadding:0,border:0},[(0,_vue.h)("tbody",l.map(e=>(0,_vue.h)("tr",e.map(t=>(0,_vue.h)("td",{class:{"is--prev":t.isPrev,"is--current":t.isCurrent,"is--now":t.isNow,"is--next":t.isNext,"is--disabled":B(t),"is--selected":E?V.some(e=>_xeUtils.default.isDateSame(e,t.date,P)):_xeUtils.default.isDateSame(D,t.date,P),"is--hover":_xeUtils.default.isDateSame(N,t.date,P)},onClick:()=>R(t),onMouseenter:()=>F(t)},H(t,t.year))))))])];return}}{const T=A["multiple"],{datePanelType:w,datePanelValue:k}=L,W=q.value;var e=fe.value,u=Se.value;const M=K.value,C="yyyyMMdd";return[(0,_vue.h)("table",{class:`vxe-input--date-${w}-view`,cellspacing:0,cellpadding:0,border:0},[(0,_vue.h)("thead",[(0,_vue.h)("tr",e.map(e=>(0,_vue.h)("th",e.label)))]),(0,_vue.h)("tbody",u.map(e=>(0,_vue.h)("tr",e.map(t=>(0,_vue.h)("td",{class:{"is--prev":t.isPrev,"is--current":t.isCurrent,"is--now":t.isNow,"is--next":t.isNext,"is--disabled":B(t),"is--selected":T?M.some(e=>_xeUtils.default.isDateSame(e,t.date,C)):_xeUtils.default.isDateSame(W,t.date,C),"is--hover":_xeUtils.default.isDateSame(k,t.date,C)},onClick:()=>R(t),onMouseenter:()=>F(t)},H(t,t.label))))))])]}},Wt=()=>{var e=A["multiple"],t=L["datePanelType"],a=ve.value,l=oe.value,u=ce.value;return[(0,_vue.h)("div",{class:"vxe-input--date-picker-header"},[(0,_vue.h)("div",{class:"vxe-input--date-picker-type-wrapper"},["year"===t?(0,_vue.h)("span",{class:"vxe-input--date-picker-label"},u):(0,_vue.h)("span",{class:"vxe-input--date-picker-btn",onClick:dt},u)]),(0,_vue.h)("div",{class:"vxe-input--date-picker-btn-wrapper"},[(0,_vue.h)("span",{class:["vxe-input--date-picker-btn vxe-input--date-picker-prev-btn",{"is--disabled":a}],onClick:pt},[(0,_vue.h)("i",{class:"vxe-icon-caret-left"})]),(0,_vue.h)("span",{class:"vxe-input--date-picker-btn vxe-input--date-picker-current-btn",onClick:_t},[(0,_vue.h)("i",{class:"vxe-icon-dot"})]),(0,_vue.h)("span",{class:["vxe-input--date-picker-btn vxe-input--date-picker-next-btn",{"is--disabled":l}],onClick:ct},[(0,_vue.h)("i",{class:"vxe-icon-caret-right"})]),e&&ne.value?(0,_vue.h)("span",{class:"vxe-input--date-picker-btn vxe-input--date-picker-confirm-btn"},[(0,_vue.h)("button",{class:"vxe-input--date-picker-confirm",type:"button",onClick:Ut},(0,_ui.getI18n)("vxe.button.confirm"))]):null])]),(0,_vue.h)("div",{class:"vxe-input--date-picker-body"},kt())]},Mt=()=>{const t=L["datetimePanelValue"];var e=de.value,a=De.value,l=Pe.value,u=Ve.value,i=Te.value,n=we.value;return[(0,_vue.h)("div",{class:"vxe-input--time-picker-header"},[l?(0,_vue.h)("span",{class:"vxe-input--time-picker-title"},e):(0,_vue.createCommentVNode)(),(0,_vue.h)("div",{class:"vxe-input--time-picker-btn"},[(0,_vue.h)("button",{class:"vxe-input--time-picker-confirm",type:"button",onClick:Ut},(0,_ui.getI18n)("vxe.button.confirm"))])]),(0,_vue.h)("div",{ref:T,class:"vxe-input--time-picker-body"},[(0,_vue.h)("ul",{class:"vxe-input--time-picker-hour-list"},a.map((a,e)=>(0,_vue.h)("li",{key:e,class:{"is--selected":t&&t.getHours()===a.value},onClick:e=>{return e=e,t=a,L.datetimePanelValue.setHours(t.value),void bt(e);var t}},a.label))),l?(0,_vue.h)("ul",{class:"vxe-input--time-picker-minute-list"},u.map((a,e)=>(0,_vue.h)("li",{key:e,class:{"is--selected":t&&t.getMinutes()===a.value},onClick:e=>{return e=e,t=a,L.datetimePanelValue.setMinutes(t.value),void bt(e);var t}},a.label))):(0,_vue.createCommentVNode)(),l&&i?(0,_vue.h)("ul",{class:"vxe-input--time-picker-second-list"},n.map((a,e)=>(0,_vue.h)("li",{key:e,class:{"is--selected":t&&t.getSeconds()===a.value},onClick:e=>{return e=e,t=a,L.datetimePanelValue.setSeconds(t.value),void bt(e);var t}},a.label))):(0,_vue.createCommentVNode)()])]},Ct=()=>{var e=A["controls"],t=Y.value,a=I.value,l=O.value,u=ee.value;return l?(l=L.showPwd,(0,_vue.h)("div",{class:"vxe-input--control-icon",onClick:Je},[(0,_vue.h)("i",{class:["vxe-input--password-icon",l?(0,_ui.getIcon)().PASSWORD_INPUT_SHOW_PWD:(0,_ui.getIcon)().PASSWORD_INPUT_HIDE_PWD]})])):t&&e?(l=Ye.value,t=Le.value,(0,_vue.h)("div",{class:"vxe-input--control-icon"},[(0,_vue.h)("div",{class:"vxe-input--number-icon"},[(0,_vue.h)("div",{class:["vxe-input--number-btn is--prev",{"is--disabled":l}],onMousedown:st,onMouseup:U,onMouseleave:U},[(0,_vue.h)("i",{class:(0,_ui.getIcon)().NUMBER_INPUT_PREV_NUM})]),(0,_vue.h)("div",{class:["vxe-input--number-btn is--next",{"is--disabled":t}],onMousedown:st,onMouseup:U,onMouseleave:U},[(0,_vue.h)("i",{class:(0,_ui.getIcon)().NUMBER_INPUT_NEXT_NUM})])])])):a?(0,_vue.h)("div",{class:"vxe-input--control-icon",onClick:Nt},[(0,_vue.h)("i",{class:["vxe-input--date-picker-icon",(0,_ui.getIcon)().DATE_PICKER_DATE]})]):u?(0,_vue.h)("div",{class:"vxe-input--control-icon",onClick:et},[(0,_vue.h)("i",{class:["vxe-input--search-icon",(0,_ui.getIcon)().INPUT_SEARCH]})]):(0,_vue.createCommentVNode)()};s={dispatchEvent:(e,t,a)=>{E(e,(0,_ui.createEvent)(a,{$input:i},t))},focus(){var e=W.value;return L.isActivated=!0,e.focus(),(0,_vue.nextTick)()},blur(){return W.value.blur(),(L.isActivated=!1,_vue.nextTick)()},select(){return W.value.select(),(L.isActivated=!1,_vue.nextTick)()},showPanel:St,hidePanel:y,updatePlacement:Et},Object.assign(i,s);return(0,_vue.watch)(()=>A.modelValue,e=>{L.inputValue=e,je()}),(0,_vue.watch)(()=>A.type,()=>{Object.assign(L,{inputValue:A.modelValue,datetimePanelValue:null,datePanelValue:null,datePanelLabel:"",datePanelType:"day",selectMonth:null,currentDate:null}),$e()}),(0,_vue.watch)(_,()=>{I.value&&(n(L.datePanelValue),L.inputValue=A.multiple?re.value:L.datePanelLabel)}),(0,_vue.onMounted)(()=>{_ui.globalEvents.on(i,"mousewheel",Tt),_ui.globalEvents.on(i,"mousedown",Vt),_ui.globalEvents.on(i,"keydown",Pt),_ui.globalEvents.on(i,"blur",wt)}),(0,_vue.onBeforeUnmount)(()=>{U(),b(),_ui.globalEvents.off(i,"mousewheel"),_ui.globalEvents.off(i,"mousedown"),_ui.globalEvents.off(i,"keydown"),_ui.globalEvents.off(i,"blur")}),$e(),i.renderVN=()=>{var e,t,a,l,u,i,n,s,r,v,o,d,p,_,c,m,f,{className:h,controls:x,type:g,align:y,showWordCount:b,countMethod:U,name:E,autoComplete:S,autocomplete:N}=A,{inputValue:D,visiblePanel:V,isActivated:P}=L,T=z.value,w=C.value;return Q.value?(0,_vue.h)("div",{ref:k,class:["vxe-input--readonly","type--"+g,h]},D):(e=J.value,t=X.value,a=ke.value,l=Z.value,u=We.value,i=Me.value,n=le.value,b=b&&["text","search"].includes(g),r=A.prefixIcon,s=(s=G.prefix)||r?(0,_vue.h)("div",{class:"vxe-input--prefix",onClick:He},[(0,_vue.h)("div",{class:"vxe-input--prefix-icon"},s?(0,_vn.getSlotVNs)(s({})):[(0,_vue.h)("i",{class:r})])]):null,r=A.suffixIcon,v=L.inputValue,o=G.suffix,d=C.value,p=Y.value,_=I.value,c=O.value,m=ee.value,f=le.value,c=c||p||_||m,p=f||o||r||c?(0,_vue.h)("div",{class:["vxe-input--suffix",{"is--clear":f&&!d&&!(""===v||_xeUtils.default.eqNull(v))}]},[f?(0,_vue.h)("div",{class:"vxe-input--clear-icon",onClick:Ge},[(0,_vue.h)("i",{class:(0,_ui.getIcon)().INPUT_CLEAR})]):(0,_vue.createCommentVNode)(),(c?Ct:(0,_vue.createCommentVNode))(),o||r?(0,_vue.h)("div",{class:"vxe-input--suffix-icon",onClick:ze},o?(0,_vn.getSlotVNs)(o({})):[(0,_vue.h)("i",{class:r})]):(0,_vue.createCommentVNode)()]):null,(0,_vue.h)("div",{ref:k,class:["vxe-input","type--"+g,h,{["size--"+T]:T,["is--"+y]:y,"is--controls":x,"is--prefix":!!s,"is--suffix":!!p,"is--visible":V,"is--count":b,"is--disabled":w,"is--active":P,"show--clear":n&&!w&&!(""===D||_xeUtils.default.eqNull(D))}],spellcheck:!1},[s||(0,_vue.createCommentVNode)(),(0,_vue.h)("div",{class:"vxe-input--wrapper"},[(0,_vue.h)("input",{ref:W,class:"vxe-input--inner",value:D,name:E,type:u,placeholder:i,maxlength:l,readonly:a,disabled:w,autocomplete:S||N,onKeydown:ut,onKeyup:it,onWheel:rt,onClick:Dt,onInput:qe,onChange:Be,onFocus:Fe,onBlur:Re})]),p||(0,_vue.createCommentVNode)(),(()=>{var e=A["type"],{initialized:t,isAniVisible:a,visiblePanel:l,panelPlacement:u,panelStyle:i}=L,n=z.value,s=$.value,r=[];return I.value?(r.push("datetime"===e?(0,_vue.h)("div",{key:e,ref:M,class:"vxe-input--panel-layout-wrapper"},[(0,_vue.h)("div",{class:"vxe-input--panel-left-wrapper"},Wt()),(0,_vue.h)("div",{class:"vxe-input--panel-right-wrapper"},Mt())]):"time"===e?(0,_vue.h)("div",{key:e,ref:M,class:"vxe-input--panel-wrapper"},Mt()):(0,_vue.h)("div",{key:e||"default",ref:M,class:"vxe-input--panel-wrapper"},Wt())),(0,_vue.h)(_vue.Teleport,{to:"body",disabled:!s||!t},[(0,_vue.h)("div",{ref:j,class:["vxe-table--ignore-clear vxe-input--panel","type--"+e,{["size--"+n]:n,"is--transfer":s,"ani--leave":a,"ani--enter":l}],placement:u,style:i},l||a?r:[])])):(0,_vue.createCommentVNode)()})(),b?(0,_vue.h)("span",{class:["vxe-input--count",{"is--error":e}]},U?""+U({value:D}):t+(l?"/"+l:"")):(0,_vue.createCommentVNode)()]))},i},render(){return this.renderVN()}});
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var _vue=require("vue"),_xeUtils=_interopRequireDefault(require("xe-utils")),_ui=require("../../ui"),_utils=require("../../ui/src/utils"),_dom=require("../../ui/src/dom"),_util=require("../../date-picker/src/util"),_util2=require("../../number-input/src/util"),_vn=require("../..//ui/src/vn");function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}var _default=exports.default=(0,_vue.defineComponent)({name:"VxeInput",props:{modelValue:[String,Number,Date],immediate:{type:Boolean,default:!0},name:String,type:{type:String,default:"text"},clearable:{type:Boolean,default:()=>(0,_ui.getConfig)().input.clearable},readonly:{type:Boolean,default:null},disabled:{type:Boolean,default:null},placeholder:{type:String,default:null},maxLength:{type:[String,Number],default:()=>(0,_ui.getConfig)().input.maxLength},autoComplete:{type:String,default:"off"},align:String,form:String,className:String,size:{type:String,default:()=>(0,_ui.getConfig)().input.size||(0,_ui.getConfig)().size},multiple:Boolean,showWordCount:Boolean,countMethod:Function,min:{type:[String,Number],default:null},max:{type:[String,Number],default:null},step:[String,Number],trim:{type:Boolean,default:()=>(0,_ui.getConfig)().input.trim},exponential:{type:Boolean,default:()=>(0,_ui.getConfig)().input.exponential},controls:{type:Boolean,default:()=>(0,_ui.getConfig)().input.controls},digits:{type:[String,Number],default:()=>(0,_ui.getConfig)().input.digits},startDate:{type:[String,Number,Date],default:()=>(0,_ui.getConfig)().input.startDate},endDate:{type:[String,Number,Date],default:()=>(0,_ui.getConfig)().input.endDate},minDate:[String,Number,Date],maxDate:[String,Number,Date],startWeek:Number,startDay:{type:[String,Number],default:()=>(0,_ui.getConfig)().input.startDay},labelFormat:String,valueFormat:String,editable:{type:Boolean,default:!0},festivalMethod:{type:Function,default:()=>(0,_ui.getConfig)().input.festivalMethod},disabledMethod:{type:Function,default:()=>(0,_ui.getConfig)().input.disabledMethod},selectDay:{type:[String,Number],default:()=>(0,_ui.getConfig)().input.selectDay},prefixIcon:String,suffixIcon:String,placement:String,transfer:{type:Boolean,default:null},maxlength:[String,Number],autocomplete:String},emits:["update:modelValue","input","change","keydown","keyup","wheel","click","focus","blur","clear","search-click","toggle-visible","prev-number","next-number","prefix-click","suffix-click","date-prev","date-today","date-next"],setup(A,e){const{slots:G,emit:E}=e,S=(0,_vue.inject)("$xeSelect",null),N=(0,_vue.inject)("$xeTreeSelect",null),D=(0,_vue.inject)("$xeModal",null),V=(0,_vue.inject)("$xeDrawer",null),P=(0,_vue.inject)("$xeTable",null),a=(0,_vue.inject)("$xeForm",null),l=(0,_vue.inject)("xeFormItemInfo",null);var t=_xeUtils.default.uniqueId();const z=(0,_ui.useSize)(A)["computeSize"],L=(0,_vue.reactive)({initialized:!1,panelIndex:0,showPwd:!1,visiblePanel:!1,isAniVisible:!1,panelStyle:{},panelPlacement:"",isActivated:!1,inputValue:A.modelValue,datetimePanelValue:null,datePanelValue:null,datePanelLabel:"",datePanelType:"day",selectMonth:null,currentDate:null}),p={yearSize:12,monthSize:20,quarterSize:8,hpTimeout:void 0,dnTimeout:void 0},w=(0,_vue.ref)(),W=(0,_vue.ref)(),j=(0,_vue.ref)(),M=(0,_vue.ref)(),T=(0,_vue.ref)(),k={refElem:w,refInput:W},i={xID:t,props:A,context:e,reactData:L,internalData:p,getRefMaps:()=>k};let s={};const v=(e,t)=>{var a=A["type"];return"time"===a?(0,_util.toStringTimeDate)(e):_xeUtils.default.toStringDate(e,t)},$=(0,_vue.computed)(()=>{var e=A["transfer"];if(null===e){var t=(0,_ui.getConfig)().input.transfer;if(_xeUtils.default.isBoolean(t))return t;if(P||D||V||a)return!0}return e}),Q=(0,_vue.computed)(()=>!!a&&a.props.readonly),u=(0,_vue.computed)(()=>{var e=A["readonly"];return e}),C=(0,_vue.computed)(()=>{var e=A["disabled"];return null===e?!!a&&a.props.disabled:e}),Z=(0,_vue.computed)(()=>{var{maxLength:e,maxlength:t}=A,e=e||t;return Y.value&&!_xeUtils.default.toNumber(e)?16:e}),o=(0,_vue.computed)(()=>{var e=A["type"];return"time"===e||"datetime"===e}),Y=(0,_vue.computed)(()=>-1<["number","integer","float"].indexOf(A.type)),X=(0,_vue.computed)(()=>_xeUtils.default.getSize(L.inputValue)),J=(0,_vue.computed)(()=>{var e=X.value,t=Z.value;return t&&e>_xeUtils.default.toNumber(t)}),I=(0,_vue.computed)(()=>{return o.value||-1<["date","week","month","quarter","year"].indexOf(A.type)}),O=(0,_vue.computed)(()=>"password"===A.type),ee=(0,_vue.computed)(()=>"search"===A.type),te=(0,_vue.computed)(()=>_xeUtils.default.toInteger(A.digits)||1),ae=(0,_vue.computed)(()=>{var e=A["type"],t=te.value,a=A.step;return"integer"===e?_xeUtils.default.toInteger(a)||1:"float"===e?_xeUtils.default.toNumber(a)||1/Math.pow(10,t):_xeUtils.default.toNumber(a)||1}),le=(0,_vue.computed)(()=>{var e=A["type"],t=Y.value,a=I.value,l=O.value;return A.clearable&&(l||t||a||"text"===e||"search"===e)}),ue=(0,_vue.computed)(()=>A.startDate?_xeUtils.default.toStringDate(A.startDate):null),ie=(0,_vue.computed)(()=>A.endDate?_xeUtils.default.toStringDate(A.endDate):null),ne=(0,_vue.computed)(()=>-1<["date","week","month","quarter","year"].indexOf(A.type)),K=(0,_vue.computed)(()=>{var{modelValue:e,multiple:t}=A,a=I.value;const l=d.value;return t&&e&&a?_xeUtils.default.toValueString(e).split(",").map(e=>{e=v(e,l);return _xeUtils.default.isValidDate(e)?e:null}):[]}),se=(0,_vue.computed)(()=>{var e=K.value;const t=d.value;return e.map(e=>_xeUtils.default.toDateString(e,t))}),re=(0,_vue.computed)(()=>{var e=K.value;const t=_.value;return e.map(e=>_xeUtils.default.toDateString(e,t)).join(", ")}),d=(0,_vue.computed)(()=>{var{type:e,valueFormat:t}=A;return t||("time"===e?"HH:mm:ss":"datetime"===e?"yyyy-MM-dd HH:mm:ss":"yyyy-MM-dd")}),q=(0,_vue.computed)(()=>{var e=A["modelValue"],t=I.value,a=d.value;let l=null;return l=e&&t&&(t=v(e,a),_xeUtils.default.isValidDate(t))?t:l}),ve=(0,_vue.computed)(()=>{var e=ue.value,t=L["selectMonth"];return!(!t||!e)&&t<=e}),oe=(0,_vue.computed)(()=>{var e=ie.value,t=L["selectMonth"];return!(!t||!e)&&e<=t}),de=(0,_vue.computed)(()=>{var e=L["datetimePanelValue"],t=Te.value;return e?_xeUtils.default.toDateString(e,t?"HH:mm:ss":"HH:mm"):""}),pe=(0,_vue.computed)(()=>{var e=q.value,t=o.value;return e&&t?1e3*(3600*e.getHours()+60*e.getMinutes()+e.getSeconds()):0}),_=(0,_vue.computed)(()=>{var e=A["labelFormat"];return I.value?e||(0,_ui.getI18n)("vxe.input.date.labelFormat."+A.type):""}),_e=(0,_vue.computed)(()=>{var{selectMonth:e,currentDate:t}=L,a=p["yearSize"],l=[];if(e&&t){var u=t.getFullYear(),t=e.getFullYear(),i=new Date(t-t%a,0,1);for(let e=-4;e<a+4;e++){var n=_xeUtils.default.getWhatYear(i,e,"first"),s=n.getFullYear();l.push({date:n,isCurrent:!0,isPrev:e<0,isNow:u===s,isNext:e>=a,year:s})}}return l}),ce=(0,_vue.computed)(()=>{if(I.value){var{datePanelType:a,selectMonth:l}=L,u=_e.value;let e="",t;return l&&(e=l.getFullYear(),t=l.getMonth()+1),"quarter"===a?(0,_ui.getI18n)("vxe.input.date.quarterLabel",[e]):"month"===a?(0,_ui.getI18n)("vxe.input.date.monthLabel",[e]):"year"===a?u.length?u[0].year+" - "+u[u.length-1].year:"":(0,_ui.getI18n)("vxe.input.date.dayLabel",[e,t?(0,_ui.getI18n)("vxe.input.date.m"+t):"-"])}return""}),g=(0,_vue.computed)(()=>{var{startDay:e,startWeek:t}=A;return _xeUtils.default.toNumber(_xeUtils.default.isNumber(e)||_xeUtils.default.isString(e)?e:t)}),me=(0,_vue.computed)(()=>{var a=[];if(I.value){let t=g.value;a.push(t);for(let e=0;e<6;e++)6<=t?t=0:t++,a.push(t)}return a}),fe=(0,_vue.computed)(()=>{return I.value?me.value.map(e=>({value:e,label:(0,_ui.getI18n)("vxe.input.date.weeks.w"+e)})):[]}),he=(0,_vue.computed)(()=>{var e;return I.value?(e=fe.value,[{label:(0,_ui.getI18n)("vxe.input.date.weeks.w")}].concat(e)):[]}),xe=(0,_vue.computed)(()=>{var e=_e.value;return _xeUtils.default.chunk(e,4)}),ge=(0,_vue.computed)(()=>{var{selectMonth:e,currentDate:t}=L,a=p["quarterSize"],l=[];if(e&&t){var u=t.getFullYear(),i=(0,_util.getDateQuarter)(t),n=_xeUtils.default.getWhatYear(e,0,"first"),s=n.getFullYear();for(let e=-2;e<a-2;e++){var r=_xeUtils.default.getWhatQuarter(n,e),v=r.getFullYear(),o=(0,_util.getDateQuarter)(r),d=v<s;l.push({date:r,isPrev:d,isCurrent:v===s,isNow:v===u&&o===i,isNext:!d&&s<v,quarter:o})}}return l}),ye=(0,_vue.computed)(()=>{var e=ge.value;return _xeUtils.default.chunk(e,2)}),be=(0,_vue.computed)(()=>{var{selectMonth:t,currentDate:e}=L,a=p["monthSize"],l=[];if(t&&e){var u=e.getFullYear(),i=e.getMonth(),n=_xeUtils.default.getWhatYear(t,0,"first").getFullYear();for(let e=-4;e<a-4;e++){var s=_xeUtils.default.getWhatYear(t,0,e),r=s.getFullYear(),v=s.getMonth(),o=r<n;l.push({date:s,isPrev:o,isCurrent:r===n,isNow:r===u&&v===i,isNext:!o&&n<r,month:v})}}return l}),Ue=(0,_vue.computed)(()=>{var e=be.value;return _xeUtils.default.chunk(e,4)}),Ee=(0,_vue.computed)(()=>{var{selectMonth:t,currentDate:e}=L,a=[];if(t&&e){var l=pe.value,u=me.value,i=e.getFullYear(),n=e.getMonth(),s=e.getDate(),r=t.getFullYear(),v=t.getMonth(),e=t.getDay(),u=-u.indexOf(e),o=new Date(_xeUtils.default.getWhatDay(t,u).getTime()+l);for(let e=0;e<42;e++){var d=_xeUtils.default.getWhatDay(o,e),p=d.getFullYear(),_=d.getMonth(),c=d.getDate(),m=d<t;a.push({date:d,isPrev:m,isCurrent:p===r&&_===v,isNow:p===i&&_===n&&c===s,isNext:!m&&v!==_,label:c})}}return a}),Se=(0,_vue.computed)(()=>{var e=Ee.value;return _xeUtils.default.chunk(e,7)}),Ne=(0,_vue.computed)(()=>{var e=Se.value;const a=g.value;return e.map(e=>{var t=e[0];return[{date:t.date,isWeekNumber:!0,isPrev:!1,isCurrent:!1,isNow:!1,isNext:!1,label:_xeUtils.default.getYearWeek(t.date,a)}].concat(e)})}),De=(0,_vue.computed)(()=>{var t=[];if(o.value)for(let e=0;e<24;e++)t.push({value:e,label:(""+e).padStart(2,"0")});return t}),Ve=(0,_vue.computed)(()=>{var t=[];if(o.value)for(let e=0;e<60;e++)t.push({value:e,label:(""+e).padStart(2,"0")});return t}),Pe=(0,_vue.computed)(()=>{var e=d.value;return!/HH/.test(e)||/mm/.test(e)}),Te=(0,_vue.computed)(()=>{var e=d.value;return!/HH/.test(e)||/ss/.test(e)}),ke=(0,_vue.computed)(()=>{return Ve.value}),we=(0,_vue.computed)(()=>{var{type:e,editable:t,multiple:a}=A;return u.value||a||!t||"week"===e||"quarter"===e}),We=(0,_vue.computed)(()=>{var e=A["type"],t=L["showPwd"],a=Y.value,l=I.value,u=O.value;return l||a||u&&t||"number"===e?"text":e}),Me=(0,_vue.computed)(()=>{var e,t=A["placeholder"];return t?(0,_utils.getFuncText)(t):_xeUtils.default.eqNull(t)?(e=(0,_ui.getConfig)().input.placeholder)?(0,_utils.getFuncText)(e):(0,_ui.getI18n)("vxe.base.pleaseInput"):t}),Ce=(0,_vue.computed)(()=>{var{type:e,immediate:t}=A;return t||!("text"===e||"number"===e||"integer"===e||"float"===e)}),Ae=(0,_vue.computed)(()=>{var e=A["type"],t=L["inputValue"];return Y.value?"integer"===e?_xeUtils.default.toInteger((0,_util2.handleNumber)(t)):_xeUtils.default.toNumber((0,_util2.handleNumber)(t)):0}),Le=(0,_vue.computed)(()=>{var e=A["min"],t=L["inputValue"],a=Y.value,l=Ae.value;return!(!t&&0!==t||!a||null===e)&&l<=_xeUtils.default.toNumber(e)}),Ye=(0,_vue.computed)(()=>{var e=A["max"],t=L["inputValue"],a=Y.value,l=Ae.value;return!(!t&&0!==t||!a||null===e)&&l>=_xeUtils.default.toNumber(e)}),Ie=e=>{var{type:t,exponential:a}=A,l=Z.value,u=te.value,t="float"===t?(0,_util2.toFloatValueFixed)(e,u):_xeUtils.default.toValueString(e);return!a||e!==t&&_xeUtils.default.toValueString(e).toLowerCase()!==_xeUtils.default.toNumber(t).toExponential()?t.slice(0,l):e},Oe=e=>{E("update:modelValue",e)},c=e=>{var t=L["inputValue"];s.dispatchEvent(e.type,{value:t},e)},m=(e,t)=>{A.trim&&(e=(""+(e||"")).trim()),L.inputValue=e,Oe(e),s.dispatchEvent("input",{value:e},t),_xeUtils.default.toValueString(A.modelValue)!==e&&(s.dispatchEvent("change",{value:e},t),S||N||a&&l&&a.triggerItemEvent(t,l.itemConfig.field,e))},Ke=(e,t)=>{var a=I.value,l=Ce.value;L.inputValue=e,a||(l?m(e,t):s.dispatchEvent("input",{value:e},t))},qe=e=>{var t=e.target.value;Ke(t,e)},Be=e=>{Ce.value||c(e)},Re=e=>{var t=L["inputValue"];Ce.value||m(t,e),b(),L.visiblePanel||(L.isActivated=!1),s.dispatchEvent("blur",{value:t},e),S||N||a&&l&&a.triggerItemEvent(e,l.itemConfig.field,t)},Fe=e=>{var t=L["inputValue"],a=Y.value,l=I.value;L.isActivated=!0,a?L.inputValue=(0,_utils.eqEmptyValue)(t)?"":""+_xeUtils.default.toNumber(t):l&&Nt(e),c(e)},He=e=>{var t;C.value||(t=L["inputValue"],s.dispatchEvent("prefix-click",{value:t},e))},y=()=>new Promise(e=>{L.visiblePanel=!1,p.hpTimeout=setTimeout(()=>{L.isAniVisible=!1,e()},350)}),Ge=(e,t)=>{var a=A["type"],l=Y.value;I.value&&y(),(l||-1<["text","search","password"].indexOf(a))&&focus(),m("",e),s.dispatchEvent("clear",{value:t},e)},ze=e=>{var t;C.value||(t=L["inputValue"],s.dispatchEvent("suffix-click",{value:t},e))},n=e=>{var t=A["type"],a=_.value,l=d.value,u=g.value;let i=null,n="";e&&(i=v(e,l)),_xeUtils.default.isValidDate(i)?(n=_xeUtils.default.toDateString(i,a,{firstDay:u}),a&&"week"===t&&(e=_xeUtils.default.getYearWeek(i,u),(l=_xeUtils.default.getWhatWeek(i,0,1===e?(6+u)%7:u,u).getFullYear())!==i.getFullYear())&&-1<(t=a.indexOf("yyyy"))&&(e=Number(n.substring(t,t+4)))&&!isNaN(e)&&(n=n.replace(""+e,""+l))):i=null,L.datePanelValue=i,L.datePanelLabel=n},je=()=>{var e=I.value,t=L["inputValue"];e&&(n(t),L.inputValue=A.multiple?re.value:L.datePanelLabel)},$e=()=>{var e=A["type"],t=L["inputValue"],a=I.value,l=te.value;a?je():"float"===e&&t&&t!==(a=(0,_util2.toFloatValueFixed)(t,l))&&m(a,{type:"init"})},Qe=e=>null===A.max||_xeUtils.default.toNumber(e)<=_xeUtils.default.toNumber(A.max),Ze=e=>null===A.min||_xeUtils.default.toNumber(e)>=_xeUtils.default.toNumber(A.min),Xe=()=>{L.inputValue=A.multiple?re.value:L.datePanelLabel},f=e=>{var t=g.value,a=_xeUtils.default.getYearWeek(e,t),t=_xeUtils.default.getWhatWeek(e,0,t,t),a=_xeUtils.default.getWhatMonth(1===a?_xeUtils.default.getWhatDay(t,6):e,0,"first");_xeUtils.default.isEqual(a,L.selectMonth)||(L.selectMonth=a)},h=t=>{var{modelValue:e,multiple:a}=A;const l=L["datetimePanelValue"];var u=o.value;const i=d.value;var n=g.value;"week"===A.type?(r=_xeUtils.default.toNumber(A.selectDay),t=_xeUtils.default.getWhatWeek(t,0,r,n)):u&&(t.setHours(l.getHours()),t.setMinutes(l.getMinutes()),t.setSeconds(l.getSeconds()));const s=_xeUtils.default.toDateString(t,i,{firstDay:n});if(f(t),a){var r=se.value;if(u){n=[...K.value];const v=[];a=_xeUtils.default.findIndexOf(n,e=>_xeUtils.default.isDateSame(t,e,"yyyyMMdd"));-1===a?n.push(t):n.splice(a,1),n.forEach(e=>{e&&(e.setHours(l.getHours()),e.setMinutes(l.getMinutes()),e.setSeconds(l.getSeconds()),v.push(e))}),m(v.map(e=>_xeUtils.default.toDateString(e,i)).join(","),{type:"update"})}else r.some(e=>_xeUtils.default.isEqual(e,s))?m(r.filter(e=>!_xeUtils.default.isEqual(e,s)).join(","),{type:"update"}):m(r.concat([s]).join(","),{type:"update"})}else _xeUtils.default.isEqual(e,s)||m(s,{type:"update"})},b=()=>{var{type:a,min:l,max:u,exponential:t}=A,{inputValue:i,datetimePanelValue:n}=L,s=Y.value,e=I.value,r=_.value;if(!we.value)if(s){if(i){let e="integer"===a?_xeUtils.default.toInteger((0,_util2.handleNumber)(i)):_xeUtils.default.toNumber((0,_util2.handleNumber)(i));Ze(e)?Qe(e)||(e=u):e=l,t&&(s=_xeUtils.default.toValueString(i).toLowerCase())===_xeUtils.default.toNumber(e).toExponential()&&(e=s),m(Ie(e),{type:"check"})}}else if(e)if(i){let t=v(i,r);if(_xeUtils.default.isValidDate(t))if("time"===a)i!==(t=_xeUtils.default.toDateString(t,r))&&m(t,{type:"check"}),L.inputValue=t;else{let e=!1;u=g.value;"datetime"===a?(l=q.value,i===_xeUtils.default.toDateString(l,r)&&i===_xeUtils.default.toDateString(t,r)||(e=!0,n.setHours(t.getHours()),n.setMinutes(t.getMinutes()),n.setSeconds(t.getSeconds()))):e=!0,L.inputValue=_xeUtils.default.toDateString(t,r,{firstDay:u}),e&&h(t)}else Xe()}else m("",{type:"check"})},Je=e=>{var t=L["showPwd"],a=C.value,l=u.value;a||l||(L.showPwd=!t),s.dispatchEvent("toggle-visible",{visible:L.showPwd},e)},et=e=>{s.dispatchEvent("search-click",{},e)},tt=(e,t)=>{var{min:a,max:l,type:u}=A,i=L["inputValue"],n=ae.value,u="integer"===u?_xeUtils.default.toInteger((0,_util2.handleNumber)(i)):_xeUtils.default.toNumber((0,_util2.handleNumber)(i)),i=e?_xeUtils.default.add(u,n):_xeUtils.default.subtract(u,n);let s;s=Ze(i)?Qe(i)?i:l:a,Ke(Ie(s),t)},r=e=>{var t=C.value,a=u.value,l=Le.value;U(),t||a||l||tt(!1,e),s.dispatchEvent("next-number",{value:L.inputValue},e)},at=e=>{p.dnTimeout=setTimeout(()=>{r(e),at(e)},60)},x=e=>{var t=C.value,a=u.value,l=Ye.value;U(),t||a||l||tt(!0,e),s.dispatchEvent("prev-number",{value:L.inputValue},e)},lt=e=>{var t=_ui.globalEvents.hasKey(e,_ui.GLOBAL_EVENT_KEYS.ARROW_UP),a=_ui.globalEvents.hasKey(e,_ui.GLOBAL_EVENT_KEYS.ARROW_DOWN);(t||a)&&(e.preventDefault(),(t?x:r)(e))},ut=e=>{var t,a,l,u,i,n,s,{exponential:r,controls:v}=A;Y.value&&(t=e.ctrlKey,a=e.shiftKey,l=e.altKey,u=e.keyCode,i=_ui.globalEvents.hasKey(e,_ui.GLOBAL_EVENT_KEYS.ESCAPE),n=_ui.globalEvents.hasKey(e,_ui.GLOBAL_EVENT_KEYS.ARROW_UP),s=_ui.globalEvents.hasKey(e,_ui.GLOBAL_EVENT_KEYS.ARROW_DOWN),t||a||l||!(_ui.globalEvents.hasKey(e,_ui.GLOBAL_EVENT_KEYS.SPACEBAR)||(!r||69!==u)&&65<=u&&u<=90||186<=u&&u<=188||191<=u)||e.preventDefault(),i?b():(n||s)&&v&<(e)),c(e)},it=e=>{c(e)},U=()=>{var e=p["dnTimeout"];e&&(clearTimeout(e),p.dnTimeout=void 0)},nt=e=>{p.dnTimeout=setTimeout(()=>{x(e),nt(e)},60)},st=e=>{if(U(),0===e.button){const t=(0,_dom.hasClass)(e.currentTarget,"is--prev");(t?x:r)(e),p.dnTimeout=setTimeout(()=>{(t?nt:at)(e)},500)}},rt=e=>{var t;Y.value&&A.controls&&L.isActivated&&(0<(t=e.deltaY)?r(e):t<0&&x(e),e.preventDefault()),c(e)},vt=(e,t)=>{var a=g.value,l=_xeUtils.default.getYearWeek(e,a),a=_xeUtils.default.getWhatWeek(e,0,a,a),l=_xeUtils.default.getWhatMonth(1===l?_xeUtils.default.getWhatDay(a,6):e,t,"first");L.selectMonth=l},ot=()=>{var e=_xeUtils.default.getWhatDay(Date.now(),0,"first");L.currentDate=e,vt(e,0)},dt=()=>{let e=L["datePanelType"];e="month"===e||"quarter"===e?"year":"month",L.datePanelType=e},pt=t=>{var a=A["type"],{datePanelType:l,selectMonth:u,inputValue:i}=L,n=p["yearSize"];if(!ve.value){let e;e="year"===a?_xeUtils.default.getWhatYear(u,-n,"first"):"month"===a||"quarter"===a?"year"===l?_xeUtils.default.getWhatYear(u,-n,"first"):_xeUtils.default.getWhatYear(u,-1,"first"):"year"===l?_xeUtils.default.getWhatYear(u,-n,"first"):"month"===l?_xeUtils.default.getWhatYear(u,-1,"first"):_xeUtils.default.getWhatMonth(u,-1,"first"),L.selectMonth=e,s.dispatchEvent("date-prev",{viewType:l,viewDate:e,value:i,type:a},t)}},_t=e=>{ot(),A.multiple||(h(L.currentDate),y()),s.dispatchEvent("date-today",{type:A.type},e)},ct=t=>{var a=A["type"],{datePanelType:l,selectMonth:u,inputValue:i}=L,n=p["yearSize"];if(!oe.value){let e;e="year"===a?_xeUtils.default.getWhatYear(u,n,"first"):"month"===a||"quarter"===a?"year"===l?_xeUtils.default.getWhatYear(u,n,"first"):_xeUtils.default.getWhatYear(u,1,"first"):"year"===l?_xeUtils.default.getWhatYear(u,n,"first"):"month"===l?_xeUtils.default.getWhatYear(u,1,"first"):_xeUtils.default.getWhatMonth(u,1,"first"),L.selectMonth=e,s.dispatchEvent("date-next",{viewType:l,viewDate:e,value:i,type:a},t)}},B=e=>{var t=A["disabledMethod"],a=L["datePanelType"],l=ue.value,u=ie.value,e=e["date"];return!!(l&&l.getTime()>e.getTime())||!!(u&&u.getTime()<e.getTime())||!!t&&t({type:a,viewType:a,date:e,$input:i})},mt=e=>{var{type:t,multiple:a}=A,l=L["datePanelType"];"month"===t?"year"===l?(L.datePanelType="month",f(e)):(h(e),a||y()):"year"===t?(h(e),a||y()):"quarter"===t?"year"===l?(L.datePanelType="quarter",f(e)):(h(e),a||y()):"month"===l?(L.datePanelType="week"===t?t:"day",f(e)):"year"===l?(L.datePanelType="month",f(e)):(h(e),"datetime"===t||a||y())},R=e=>{B(e)||mt(e.date)},ft=t=>{B({date:t})||(Ee.value.some(e=>_xeUtils.default.isDateSame(e.date,t,"yyyyMMdd"))||f(t),n(t))},ht=t=>{B({date:t})||(_e.value.some(e=>_xeUtils.default.isDateSame(e.date,t,"yyyy"))||f(t),n(t))},xt=t=>{B({date:t})||(ge.value.some(e=>_xeUtils.default.isDateSame(e.date,t,"yyyyq"))||f(t),n(t))},gt=t=>{B({date:t})||(be.value.some(e=>_xeUtils.default.isDateSame(e.date,t,"yyyyMM"))||f(t),n(t))},F=e=>{var t;B(e)||(t=L["datePanelType"],("month"===t?gt:"quarter"===t?xt:"year"===t?ht:ft)(e.date))},yt=e=>{var t;e&&(t=e.offsetHeight,e.parentNode.scrollTop=e.offsetTop-4*t)},bt=e=>{L.datetimePanelValue=new Date(L.datetimePanelValue.getTime()),yt(e.currentTarget)},Ut=()=>{var e=A["multiple"];const t=L["datetimePanelValue"];var a=q.value,l=o.value;if(l){const u=d.value;if(e){e=se.value;if(l){l=[...K.value];const i=[];l.forEach(e=>{e&&(e.setHours(t.getHours()),e.setMinutes(t.getMinutes()),e.setSeconds(t.getSeconds()),i.push(e))}),m(i.map(e=>_xeUtils.default.toDateString(e,u)).join(","),{type:"update"})}else m(e.join(","),{type:"update"})}else h(a||L.currentDate)}y()},Et=()=>(0,_vue.nextTick)().then(()=>{var l=A["placement"],u=L["panelIndex"],i=W.value,n=j.value,e=$.value;if(i&&n){var s=i.offsetHeight,r=i.offsetWidth,v=n.offsetHeight,n=n.offsetWidth,u={zIndex:u},{boundingTop:i,boundingLeft:o,visibleHeight:d,visibleWidth:p}=(0,_dom.getAbsolutePos)(i);let a="bottom";if(e){let e=o,t=i+s;"top"===l?(a="top",t=i-v):l||(t+v+5>d&&(a="top",t=i-v),t<5&&(a="bottom",t=i+s)),e+n+5>p&&(e-=e+n+5-p),e<5&&(e=5),Object.assign(u,{left:e+"px",top:t+"px",minWidth:r+"px"})}else"top"===l?(a="top",u.bottom=s+"px"):l||(u.top=s+"px",d<i+s+v&&5<i-s-v&&(a="top",u.top="",u.bottom=s+"px"));return L.panelStyle=u,L.panelPlacement=a,(0,_vue.nextTick)()}}),St=()=>{var e=L["visiblePanel"],t=p["hpTimeout"],a=C.value,l=I.value;return(a||e?(0,_vue.nextTick):(L.initialized||(L.initialized=!0),t&&(clearTimeout(t),p.hpTimeout=void 0),L.isActivated=!0,L.isAniVisible=!0,l&&(a=A.type,e=o.value,t=q.value,-1<["year","quarter","month","week"].indexOf(a)?L.datePanelType=a:L.datePanelType="day",L.currentDate=_xeUtils.default.getWhatDay(Date.now(),0,"first"),t?(vt(t,0),n(t)):ot(),e)&&(L.datetimePanelValue=L.datePanelValue||_xeUtils.default.getWhatDay(Date.now(),0,"first"),(0,_vue.nextTick)(()=>{var e=T.value;_xeUtils.default.arrayEach(e.querySelectorAll("li.is--selected"),e=>{yt(e)})})),setTimeout(()=>{L.visiblePanel=!0},10),L.panelIndex<(0,_utils.getLastZIndex)()&&(L.panelIndex=(0,_utils.nextZIndex)()),Et))()},Nt=e=>{u.value||(e.preventDefault(),St())},Dt=e=>{c(e)},Vt=e=>{var{visiblePanel:t,isActivated:a}=L,l=I.value,u=w.value,i=M.value;!C.value&&a&&(L.isActivated=(0,_dom.getEventTargetNode)(e,u).flag||(0,_dom.getEventTargetNode)(e,i).flag,L.isActivated||(l?t&&(y(),b()):b()))},Pt=t=>{var a=A["clearable"],l=L["visiblePanel"],u=C.value,i=I.value;if(!u){var u=_ui.globalEvents.hasKey(t,_ui.GLOBAL_EVENT_KEYS.TAB),n=_ui.globalEvents.hasKey(t,_ui.GLOBAL_EVENT_KEYS.DELETE),s=_ui.globalEvents.hasKey(t,_ui.GLOBAL_EVENT_KEYS.ESCAPE),r=_ui.globalEvents.hasKey(t,_ui.GLOBAL_EVENT_KEYS.ENTER),v=_ui.globalEvents.hasKey(t,_ui.GLOBAL_EVENT_KEYS.ARROW_LEFT),o=_ui.globalEvents.hasKey(t,_ui.GLOBAL_EVENT_KEYS.ARROW_UP),d=_ui.globalEvents.hasKey(t,_ui.GLOBAL_EVENT_KEYS.ARROW_RIGHT),p=_ui.globalEvents.hasKey(t,_ui.GLOBAL_EVENT_KEYS.ARROW_DOWN),_=_ui.globalEvents.hasKey(t,_ui.GLOBAL_EVENT_KEYS.PAGE_UP),c=_ui.globalEvents.hasKey(t,_ui.GLOBAL_EVENT_KEYS.PAGE_DOWN),v=v||o||d||p;let e=L.isActivated;if(u)e&&b(),e=!1,L.isActivated=e;else if(v){if(i&&e)if(l){var d=t,{isActivated:v,datePanelValue:m,datePanelType:f}=L;if(v){d.preventDefault();var v=_ui.globalEvents.hasKey(d,_ui.GLOBAL_EVENT_KEYS.ARROW_LEFT),h=_ui.globalEvents.hasKey(d,_ui.GLOBAL_EVENT_KEYS.ARROW_UP),x=_ui.globalEvents.hasKey(d,_ui.GLOBAL_EVENT_KEYS.ARROW_RIGHT),d=_ui.globalEvents.hasKey(d,_ui.GLOBAL_EVENT_KEYS.ARROW_DOWN);if("year"===f){let e=_xeUtils.default.getWhatYear(m||Date.now(),0,"first");v?e=_xeUtils.default.getWhatYear(e,-1):h?e=_xeUtils.default.getWhatYear(e,-4):x?e=_xeUtils.default.getWhatYear(e,1):d&&(e=_xeUtils.default.getWhatYear(e,4)),ht(e)}else if("quarter"===f){let e=_xeUtils.default.getWhatQuarter(m||Date.now(),0,"first");v?e=_xeUtils.default.getWhatQuarter(e,-1):h?e=_xeUtils.default.getWhatQuarter(e,-2):x?e=_xeUtils.default.getWhatQuarter(e,1):d&&(e=_xeUtils.default.getWhatQuarter(e,2)),xt(e)}else if("month"===f){let e=_xeUtils.default.getWhatMonth(m||Date.now(),0,"first");v?e=_xeUtils.default.getWhatMonth(e,-1):h?e=_xeUtils.default.getWhatMonth(e,-4):x?e=_xeUtils.default.getWhatMonth(e,1):d&&(e=_xeUtils.default.getWhatMonth(e,4)),gt(e)}else{let e=m||_xeUtils.default.getWhatDay(Date.now(),0,"first");f=g.value;v?e=_xeUtils.default.getWhatDay(e,-1):h?e=_xeUtils.default.getWhatWeek(e,-1,f):x?e=_xeUtils.default.getWhatDay(e,1):d&&(e=_xeUtils.default.getWhatWeek(e,1,f)),ft(e)}}}else(o||p)&&Nt(t)}else r?i&&(l?L.datePanelValue?mt(L.datePanelValue):y():e&&Nt(t)):(_||c)&&i&&e&&(m=t,v=L.isActivated)&&(v=_ui.globalEvents.hasKey(m,_ui.GLOBAL_EVENT_KEYS.PAGE_UP),m.preventDefault(),(v?pt:ct)(m));u||s?l&&y():n&&a&&e&&Ge(t,null)}},Tt=e=>{var t=L["visiblePanel"];C.value||t&&(t=M.value,((0,_dom.getEventTargetNode)(e,t).flag?Et:(y(),b))())},kt=()=>{var{isActivated:e,visiblePanel:t}=L;t?(y(),b()):e&&b()},H=(e,t)=>{var a,l=A["festivalMethod"];return l?(a=L["datePanelType"],e=(a=(l=l({type:a,viewType:a,date:e.date,$input:i}))?_xeUtils.default.isString(l)?{label:l}:l:{}).extra?_xeUtils.default.isString(a.extra)?{label:a.extra}:a.extra:null,l=[(0,_vue.h)("span",{class:["vxe-input--date-label",{"is-notice":a.notice}]},e&&e.label?[(0,_vue.h)("span",""+(t||"")),(0,_vue.h)("span",{class:["vxe-input--date-label--extra",e.important?"is-important":"",e.className],style:e.style},_xeUtils.default.toValueString(e.label))]:[""+(t||"")])],(e=a.label)&&(e=_xeUtils.default.toValueString(e).split(","),l.push((0,_vue.h)("span",{class:["vxe-input--date-festival",a.important?"is-important":"",a.className],style:a.style},[1<e.length?(0,_vue.h)("span",{class:["vxe-input--date-festival--overlap","overlap--"+e.length]},e.map(e=>(0,_vue.h)("span",e.substring(0,3)))):(0,_vue.h)("span",{class:"vxe-input--date-festival--label"},e[0].substring(0,3))]))),l):[""+(t||"")]},wt=()=>{var e=L["datePanelType"];switch(e){case"week":{const i=A["multiple"],{datePanelType:n,datePanelValue:s}=L,r=q.value;var t=he.value,a=Ne.value;const v=K.value,o="yyyyMMdd";return[(0,_vue.h)("table",{class:`vxe-input--date-${n}-view`,cellspacing:0,cellpadding:0,border:0},[(0,_vue.h)("thead",[(0,_vue.h)("tr",t.map(e=>(0,_vue.h)("th",e.label)))]),(0,_vue.h)("tbody",a.map(e=>{const t=i?e.some(t=>v.some(e=>_xeUtils.default.isDateSame(e,t.date,o))):e.some(e=>_xeUtils.default.isDateSame(r,e.date,o)),a=e.some(e=>_xeUtils.default.isDateSame(s,e.date,o));return(0,_vue.h)("tr",e.map(e=>(0,_vue.h)("td",{class:{"is--prev":e.isPrev,"is--current":e.isCurrent,"is--now":e.isNow,"is--next":e.isNext,"is--disabled":B(e),"is--selected":t,"is--hover":a},onClick:()=>R(e),onMouseenter:()=>F(e)},H(e,e.label))))}))])];return}case"month":{const d=A["multiple"],{datePanelType:p,datePanelValue:_}=L,c=q.value;t=Ue.value;const m=K.value,f="yyyyMM";return[(0,_vue.h)("table",{class:`vxe-input--date-${p}-view`,cellspacing:0,cellpadding:0,border:0},[(0,_vue.h)("tbody",t.map(e=>(0,_vue.h)("tr",e.map(t=>(0,_vue.h)("td",{class:{"is--prev":t.isPrev,"is--current":t.isCurrent,"is--now":t.isNow,"is--next":t.isNext,"is--disabled":B(t),"is--selected":d?m.some(e=>_xeUtils.default.isDateSame(e,t.date,f)):_xeUtils.default.isDateSame(c,t.date,f),"is--hover":_xeUtils.default.isDateSame(_,t.date,f)},onClick:()=>R(t),onMouseenter:()=>F(t)},H(t,(0,_ui.getI18n)("vxe.input.date.months.m"+t.month)))))))])];return}case"quarter":{const h=A["multiple"],{datePanelType:x,datePanelValue:g}=L,y=q.value;a=ye.value;const b=K.value,U="yyyyq";return[(0,_vue.h)("table",{class:`vxe-input--date-${x}-view`,cellspacing:0,cellpadding:0,border:0},[(0,_vue.h)("tbody",a.map(e=>(0,_vue.h)("tr",e.map(t=>(0,_vue.h)("td",{class:{"is--prev":t.isPrev,"is--current":t.isCurrent,"is--now":t.isNow,"is--next":t.isNext,"is--disabled":B(t),"is--selected":h?b.some(e=>_xeUtils.default.isDateSame(e,t.date,U)):_xeUtils.default.isDateSame(y,t.date,U),"is--hover":_xeUtils.default.isDateSame(g,t.date,U)},onClick:()=>R(t),onMouseenter:()=>F(t)},H(t,(0,_ui.getI18n)("vxe.input.date.quarters.q"+t.quarter)))))))])];return}case"year":{const E=A["multiple"],{datePanelType:S,datePanelValue:N}=L,D=q.value;var l=xe.value;const V=K.value,P="yyyy";return[(0,_vue.h)("table",{class:`vxe-input--date-${S}-view`,cellspacing:0,cellpadding:0,border:0},[(0,_vue.h)("tbody",l.map(e=>(0,_vue.h)("tr",e.map(t=>(0,_vue.h)("td",{class:{"is--prev":t.isPrev,"is--current":t.isCurrent,"is--now":t.isNow,"is--next":t.isNext,"is--disabled":B(t),"is--selected":E?V.some(e=>_xeUtils.default.isDateSame(e,t.date,P)):_xeUtils.default.isDateSame(D,t.date,P),"is--hover":_xeUtils.default.isDateSame(N,t.date,P)},onClick:()=>R(t),onMouseenter:()=>F(t)},H(t,t.year))))))])];return}}{const T=A["multiple"],{datePanelType:k,datePanelValue:w}=L,W=q.value;var e=fe.value,u=Se.value;const M=K.value,C="yyyyMMdd";return[(0,_vue.h)("table",{class:`vxe-input--date-${k}-view`,cellspacing:0,cellpadding:0,border:0},[(0,_vue.h)("thead",[(0,_vue.h)("tr",e.map(e=>(0,_vue.h)("th",e.label)))]),(0,_vue.h)("tbody",u.map(e=>(0,_vue.h)("tr",e.map(t=>(0,_vue.h)("td",{class:{"is--prev":t.isPrev,"is--current":t.isCurrent,"is--now":t.isNow,"is--next":t.isNext,"is--disabled":B(t),"is--selected":T?M.some(e=>_xeUtils.default.isDateSame(e,t.date,C)):_xeUtils.default.isDateSame(W,t.date,C),"is--hover":_xeUtils.default.isDateSame(w,t.date,C)},onClick:()=>R(t),onMouseenter:()=>F(t)},H(t,t.label))))))])]}},Wt=()=>{var e=A["multiple"],t=L["datePanelType"],a=ve.value,l=oe.value,u=ce.value;return[(0,_vue.h)("div",{class:"vxe-input--date-picker-header"},[(0,_vue.h)("div",{class:"vxe-input--date-picker-type-wrapper"},["year"===t?(0,_vue.h)("span",{class:"vxe-input--date-picker-label"},u):(0,_vue.h)("span",{class:"vxe-input--date-picker-btn",onClick:dt},u)]),(0,_vue.h)("div",{class:"vxe-input--date-picker-btn-wrapper"},[(0,_vue.h)("span",{class:["vxe-input--date-picker-btn vxe-input--date-picker-prev-btn",{"is--disabled":a}],onClick:pt},[(0,_vue.h)("i",{class:"vxe-icon-caret-left"})]),(0,_vue.h)("span",{class:"vxe-input--date-picker-btn vxe-input--date-picker-current-btn",onClick:_t},[(0,_vue.h)("i",{class:"vxe-icon-dot"})]),(0,_vue.h)("span",{class:["vxe-input--date-picker-btn vxe-input--date-picker-next-btn",{"is--disabled":l}],onClick:ct},[(0,_vue.h)("i",{class:"vxe-icon-caret-right"})]),e&&ne.value?(0,_vue.h)("span",{class:"vxe-input--date-picker-btn vxe-input--date-picker-confirm-btn"},[(0,_vue.h)("button",{class:"vxe-input--date-picker-confirm",type:"button",onClick:Ut},(0,_ui.getI18n)("vxe.button.confirm"))]):null])]),(0,_vue.h)("div",{class:"vxe-input--date-picker-body"},wt())]},Mt=()=>{const t=L["datetimePanelValue"];var e=de.value,a=De.value,l=Pe.value,u=Ve.value,i=Te.value,n=ke.value;return[(0,_vue.h)("div",{class:"vxe-input--time-picker-header"},[l?(0,_vue.h)("span",{class:"vxe-input--time-picker-title"},e):(0,_vue.createCommentVNode)(),(0,_vue.h)("div",{class:"vxe-input--time-picker-btn"},[(0,_vue.h)("button",{class:"vxe-input--time-picker-confirm",type:"button",onClick:Ut},(0,_ui.getI18n)("vxe.button.confirm"))])]),(0,_vue.h)("div",{ref:T,class:"vxe-input--time-picker-body"},[(0,_vue.h)("ul",{class:"vxe-input--time-picker-hour-list"},a.map((a,e)=>(0,_vue.h)("li",{key:e,class:{"is--selected":t&&t.getHours()===a.value},onClick:e=>{return e=e,t=a,L.datetimePanelValue.setHours(t.value),void bt(e);var t}},a.label))),l?(0,_vue.h)("ul",{class:"vxe-input--time-picker-minute-list"},u.map((a,e)=>(0,_vue.h)("li",{key:e,class:{"is--selected":t&&t.getMinutes()===a.value},onClick:e=>{return e=e,t=a,L.datetimePanelValue.setMinutes(t.value),void bt(e);var t}},a.label))):(0,_vue.createCommentVNode)(),l&&i?(0,_vue.h)("ul",{class:"vxe-input--time-picker-second-list"},n.map((a,e)=>(0,_vue.h)("li",{key:e,class:{"is--selected":t&&t.getSeconds()===a.value},onClick:e=>{return e=e,t=a,L.datetimePanelValue.setSeconds(t.value),void bt(e);var t}},a.label))):(0,_vue.createCommentVNode)()])]},Ct=()=>{var e=A["controls"],t=Y.value,a=I.value,l=O.value,u=ee.value;return l?(l=L.showPwd,(0,_vue.h)("div",{class:"vxe-input--control-icon",onClick:Je},[(0,_vue.h)("i",{class:["vxe-input--password-icon",l?(0,_ui.getIcon)().PASSWORD_INPUT_SHOW_PWD:(0,_ui.getIcon)().PASSWORD_INPUT_HIDE_PWD]})])):t&&e?(l=Ye.value,t=Le.value,(0,_vue.h)("div",{class:"vxe-input--control-icon"},[(0,_vue.h)("div",{class:"vxe-input--number-icon"},[(0,_vue.h)("div",{class:["vxe-input--number-btn is--prev",{"is--disabled":l}],onMousedown:st,onMouseup:U,onMouseleave:U},[(0,_vue.h)("i",{class:(0,_ui.getIcon)().NUMBER_INPUT_PREV_NUM})]),(0,_vue.h)("div",{class:["vxe-input--number-btn is--next",{"is--disabled":t}],onMousedown:st,onMouseup:U,onMouseleave:U},[(0,_vue.h)("i",{class:(0,_ui.getIcon)().NUMBER_INPUT_NEXT_NUM})])])])):a?(0,_vue.h)("div",{class:"vxe-input--control-icon",onClick:Nt},[(0,_vue.h)("i",{class:["vxe-input--date-picker-icon",(0,_ui.getIcon)().DATE_PICKER_DATE]})]):u?(0,_vue.h)("div",{class:"vxe-input--control-icon",onClick:et},[(0,_vue.h)("i",{class:["vxe-input--search-icon",(0,_ui.getIcon)().INPUT_SEARCH]})]):(0,_vue.createCommentVNode)()};s={dispatchEvent:(e,t,a)=>{E(e,(0,_ui.createEvent)(a,{$input:i},t))},focus(){var e=W.value;return L.isActivated=!0,e.focus(),(0,_vue.nextTick)()},blur(){return W.value.blur(),(L.isActivated=!1,_vue.nextTick)()},select(){return W.value.select(),(L.isActivated=!1,_vue.nextTick)()},showPanel:St,hidePanel:y,updatePlacement:Et},Object.assign(i,s);return(0,_vue.watch)(()=>A.modelValue,e=>{L.inputValue=e,je()}),(0,_vue.watch)(()=>A.type,()=>{Object.assign(L,{inputValue:A.modelValue,datetimePanelValue:null,datePanelValue:null,datePanelLabel:"",datePanelType:"day",selectMonth:null,currentDate:null}),$e()}),(0,_vue.watch)(_,()=>{I.value&&(n(L.datePanelValue),L.inputValue=A.multiple?re.value:L.datePanelLabel)}),(0,_vue.onMounted)(()=>{_ui.globalEvents.on(i,"mousewheel",Tt),_ui.globalEvents.on(i,"mousedown",Vt),_ui.globalEvents.on(i,"keydown",Pt),_ui.globalEvents.on(i,"blur",kt)}),(0,_vue.onBeforeUnmount)(()=>{U(),b(),_ui.globalEvents.off(i,"mousewheel"),_ui.globalEvents.off(i,"mousedown"),_ui.globalEvents.off(i,"keydown"),_ui.globalEvents.off(i,"blur")}),$e(),i.renderVN=()=>{var e,t,a,l,u,i,n,s,r,v,o,d,p,_,c,m,f,{className:h,controls:x,type:g,align:y,showWordCount:b,countMethod:U,name:E,autoComplete:S,autocomplete:N}=A,{inputValue:D,visiblePanel:V,isActivated:P}=L,T=z.value,k=C.value;return Q.value?(0,_vue.h)("div",{ref:w,class:["vxe-input--readonly","type--"+g,h]},D):(e=J.value,t=X.value,a=we.value,l=Z.value,u=We.value,i=Me.value,n=le.value,b=b&&["text","search"].includes(g),r=A.prefixIcon,s=(s=G.prefix)||r?(0,_vue.h)("div",{class:"vxe-input--prefix",onClick:He},[(0,_vue.h)("div",{class:"vxe-input--prefix-icon"},s?(0,_vn.getSlotVNs)(s({})):[(0,_vue.h)("i",{class:r})])]):null,r=A.suffixIcon,v=L.inputValue,o=G.suffix,d=C.value,p=Y.value,_=I.value,c=O.value,m=ee.value,f=le.value,c=c||p||_||m,p=f||o||r||c?(0,_vue.h)("div",{class:["vxe-input--suffix",{"is--clear":f&&!d&&!(""===v||_xeUtils.default.eqNull(v))}]},[f?(0,_vue.h)("div",{class:"vxe-input--clear-icon",onClick:Ge},[(0,_vue.h)("i",{class:(0,_ui.getIcon)().INPUT_CLEAR})]):(0,_vue.createCommentVNode)(),(c?Ct:(0,_vue.createCommentVNode))(),o||r?(0,_vue.h)("div",{class:"vxe-input--suffix-icon",onClick:ze},o?(0,_vn.getSlotVNs)(o({})):[(0,_vue.h)("i",{class:r})]):(0,_vue.createCommentVNode)()]):null,(0,_vue.h)("div",{ref:w,class:["vxe-input","type--"+g,h,{["size--"+T]:T,["is--"+y]:y,"is--controls":x,"is--prefix":!!s,"is--suffix":!!p,"is--visible":V,"is--count":b,"is--disabled":k,"is--active":P,"show--clear":n&&!k&&!(""===D||_xeUtils.default.eqNull(D))}],spellcheck:!1},[s||(0,_vue.createCommentVNode)(),(0,_vue.h)("div",{class:"vxe-input--wrapper"},[(0,_vue.h)("input",{ref:W,class:"vxe-input--inner",value:D,name:E,type:u,placeholder:i,maxlength:l,readonly:a,disabled:k,autocomplete:S||N,onKeydown:ut,onKeyup:it,onWheel:rt,onClick:Dt,onInput:qe,onChange:Be,onFocus:Fe,onBlur:Re})]),p||(0,_vue.createCommentVNode)(),(()=>{var e=A["type"],{initialized:t,isAniVisible:a,visiblePanel:l,panelPlacement:u,panelStyle:i}=L,n=z.value,s=$.value,r=[];return I.value?(r.push("datetime"===e?(0,_vue.h)("div",{key:e,ref:M,class:"vxe-input--panel-layout-wrapper"},[(0,_vue.h)("div",{class:"vxe-input--panel-left-wrapper"},Wt()),(0,_vue.h)("div",{class:"vxe-input--panel-right-wrapper"},Mt())]):"time"===e?(0,_vue.h)("div",{key:e,ref:M,class:"vxe-input--panel-wrapper"},Mt()):(0,_vue.h)("div",{key:e||"default",ref:M,class:"vxe-input--panel-wrapper"},Wt())),(0,_vue.h)(_vue.Teleport,{to:"body",disabled:!s||!t},[(0,_vue.h)("div",{ref:j,class:["vxe-table--ignore-clear vxe-input--panel","type--"+e,{["size--"+n]:n,"is--transfer":s,"ani--leave":a,"ani--enter":l}],placement:u,style:i},l||a?r:[])])):(0,_vue.createCommentVNode)()})(),b?(0,_vue.h)("span",{class:["vxe-input--count",{"is--error":e}]},U?""+U({value:D}):t+(l?"/"+l:"")):(0,_vue.createCommentVNode)()]))},i},render(){return this.renderVN()}});
|
|
@@ -584,7 +584,7 @@ var _default = exports.default = (0, _vue.defineComponent)({
|
|
|
584
584
|
}, evnt);
|
|
585
585
|
};
|
|
586
586
|
const numberDownNextEvent = evnt => {
|
|
587
|
-
internalData.dnTimeout =
|
|
587
|
+
internalData.dnTimeout = setTimeout(() => {
|
|
588
588
|
numberNextEvent(evnt);
|
|
589
589
|
numberDownNextEvent(evnt);
|
|
590
590
|
}, 60);
|
|
@@ -652,7 +652,7 @@ var _default = exports.default = (0, _vue.defineComponent)({
|
|
|
652
652
|
}
|
|
653
653
|
};
|
|
654
654
|
const numberDownPrevEvent = evnt => {
|
|
655
|
-
internalData.dnTimeout =
|
|
655
|
+
internalData.dnTimeout = setTimeout(() => {
|
|
656
656
|
numberPrevEvent(evnt);
|
|
657
657
|
numberDownPrevEvent(evnt);
|
|
658
658
|
}, 60);
|
|
@@ -666,7 +666,7 @@ var _default = exports.default = (0, _vue.defineComponent)({
|
|
|
666
666
|
} else {
|
|
667
667
|
numberNextEvent(evnt);
|
|
668
668
|
}
|
|
669
|
-
internalData.dnTimeout =
|
|
669
|
+
internalData.dnTimeout = setTimeout(() => {
|
|
670
670
|
if (isPrevNumber) {
|
|
671
671
|
numberDownPrevEvent(evnt);
|
|
672
672
|
} else {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var _vue=require("vue"),_xeUtils=_interopRequireDefault(require("xe-utils")),_ui=require("../../ui"),_utils=require("../../ui/src/utils"),_dom=require("../../ui/src/dom"),_vn=require("../..//ui/src/vn"),_util=require("./util");function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}var _default=exports.default=(0,_vue.defineComponent)({name:"VxeNumberInput",props:{modelValue:[String,Number],immediate:{type:Boolean,default:!0},name:String,type:{type:String,default:"number"},clearable:{type:Boolean,default:()=>(0,_ui.getConfig)().numberInput.clearable},readonly:{type:Boolean,default:null},disabled:{type:Boolean,default:null},placeholder:String,maxLength:{type:[String,Number],default:()=>(0,_ui.getConfig)().numberInput.maxLength},autoComplete:{type:String,default:"off"},align:String,form:String,className:String,size:{type:String,default:()=>(0,_ui.getConfig)().numberInput.size||(0,_ui.getConfig)().size},multiple:Boolean,min:{type:[String,Number],default:null},max:{type:[String,Number],default:null},step:[String,Number],exponential:{type:Boolean,default:()=>(0,_ui.getConfig)().numberInput.exponential},showCurrency:{type:Boolean,default:()=>(0,_ui.getConfig)().numberInput.showCurrency},currencySymbol:{type:String,default:()=>(0,_ui.getConfig)().numberInput.currencySymbol},controls:{type:Boolean,default:()=>(0,_ui.getConfig)().numberInput.controls},digits:{type:[String,Number],default:null},autoFill:{type:Boolean,default:()=>(0,_ui.getConfig)().numberInput.autoFill},prefixIcon:String,suffixIcon:String,maxlength:[String,Number],autocomplete:String},emits:["update:modelValue","input","change","keydown","keyup","wheel","click","focus","blur","clear","prev-number","next-number","prefix-click","suffix-click"],setup(h,e){const{slots:V,emit:a}=e,i=(0,_vue.inject)("$xeForm",null),n=(0,_vue.inject)("xeFormItemInfo",null);var u=_xeUtils.default.uniqueId();const q=(0,_ui.useSize)(h)["computeSize"],U=(0,_vue.reactive)({isFocus:!1,isActivated:!1,inputValue:h.modelValue}),r={},I=(0,_vue.ref)(),S=(0,_vue.ref)(),M=(0,_vue.ref)(),O={refElem:I,refInput:S},l={xID:u,props:h,context:e,reactData:U,internalData:r,getRefMaps:()=>O};let o={};const C=(0,_vue.computed)(()=>{var e=h["readonly"];return null===e?!!i&&i.props.readonly:e}),A=(0,_vue.computed)(()=>{var e=h["disabled"];return null===e?!!i&&i.props.disabled:e}),s=(0,_vue.computed)(()=>{var{type:e,digits:t}=h;let u=t;return null===u&&null===(u=(0,_ui.getConfig)().numberInput.digits)&&"amount"===e&&(u=2),_xeUtils.default.toInteger(u)||1}),v=(0,_vue.computed)(()=>{var e=h["type"];return"float"===e||"amount"===e}),R=(0,_vue.computed)(()=>{var e=h["type"],t=s.value,u=v.value,l=h.step;return"integer"===e?_xeUtils.default.toInteger(l)||1:u?_xeUtils.default.toNumber(l)||1/Math.pow(10,t):_xeUtils.default.toNumber(l)||1}),T=(0,_vue.computed)(()=>h.clearable),w=(0,_vue.computed)(()=>{var e=h["multiple"];return C.value||e}),D=(0,_vue.computed)(()=>{var e=h["placeholder"];return(e=e||(0,_ui.getConfig)().numberInput.placeholder)?(0,_utils.getFuncText)(e):(0,_ui.getI18n)("vxe.base.pleaseInput")}),B=(0,_vue.computed)(()=>{var{maxLength:e,maxlength:t}=h;return _xeUtils.default.toNumber(e||t)||16}),d=(0,_vue.computed)(()=>{var e=h["immediate"];return e}),p=(0,_vue.computed)(()=>{var e=h["type"],t=U["inputValue"];return"integer"===e?_xeUtils.default.toInteger((0,_util.handleNumber)(t)):_xeUtils.default.toNumber((0,_util.handleNumber)(t))}),P=(0,_vue.computed)(()=>{var{type:t,showCurrency:u,currencySymbol:l,autoFill:a}=h,i=U["inputValue"],n=s.value;if("amount"!==t)return _xeUtils.default.toString(i);{var t=_xeUtils.default.toNumber(i);let e=_xeUtils.default.commafy(t,{digits:n});return a||([i,t]=e.split("."),t&&(n=t.replace(/0+$/,""),e=n?[i,".",n].join(""):i)),u?""+(l||(0,_ui.getI18n)("vxe.numberInput.currencySymbol")||"")+e:e}}),_=(0,_vue.computed)(()=>{var e=h["min"],t=U["inputValue"],u=p.value;return!(!t&&0!==t||null===e)&&u<=_xeUtils.default.toNumber(e)}),c=(0,_vue.computed)(()=>{var e=h["max"],t=U["inputValue"],u=p.value;return!(!t&&0!==t||null===e)&&u>=_xeUtils.default.toNumber(e)}),m=e=>_xeUtils.default.eqNull(e)?"":""+e,f=e=>{var{exponential:t,autoFill:u}=h,l=B.value,a=s.value;let i="";return v.value?(i=(0,_util.toFloatValueFixed)(e,a),u||(i=m(_xeUtils.default.toNumber(i)))):i=m(e),!t||e!==i&&m(e).toLowerCase()!==_xeUtils.default.toNumber(i).toExponential()?i.slice(0,l):e},b=e=>{var t=U["inputValue"];o.dispatchEvent(e.type,{value:t},e)},g=(e,t,u)=>{var e=(0,_utils.eqEmptyValue)(e)?null:Number(e),l=e!==h.modelValue;l&&(r.isUM=!0,a("update:modelValue",e)),U.inputValue!==t&&(0,_vue.nextTick)(()=>{U.inputValue=t||""}),o.dispatchEvent("input",{value:e},u),l&&(o.dispatchEvent("change",{value:e},u),i)&&n&&i.triggerItemEvent(u,n.itemConfig.field,e)},x=(e,t)=>{var u=d.value,l=(0,_utils.eqEmptyValue)(e)?null:_xeUtils.default.toNumber(e);U.inputValue=e,u?g(l,e,t):o.dispatchEvent("input",{value:l},t)},Y=e=>{var t=e.target.value;x(t,e)},G=e=>{d.value||b(e)},W=e=>{var t=U["inputValue"];U.inputValue=(0,_utils.eqEmptyValue)(t)?"":""+_xeUtils.default.toNumber(t),U.isFocus=!0,U.isActivated=!0,b(e)},j=e=>{var t;A.value||(t=U["inputValue"],o.dispatchEvent("prefix-click",{value:t},e))},L=(e,t)=>{focus(),g(null,"",e),o.dispatchEvent("clear",{value:t},e)},z=e=>{var t;A.value||(t=U["inputValue"],o.dispatchEvent("suffix-click",{value:t},e))},t=()=>{var u=h["autoFill"],l=U["inputValue"],a=s.value,e=v.value;if(e&&l){let e="",t=null;l&&(e=(0,_util.toFloatValueFixed)(l,a),t=_xeUtils.default.toNumber(e),u||(e=""+t)),l!==t?g(t,e,{type:"init"}):U.inputValue=e}},y=e=>null===h.max||_xeUtils.default.toNumber(e)<=_xeUtils.default.toNumber(h.max),E=e=>null===h.min||_xeUtils.default.toNumber(e)>=_xeUtils.default.toNumber(h.min),N=()=>{var{type:t,min:u,max:l,exponential:a}=h,i=U["inputValue"];if(!w.value)if((0,_utils.eqEmptyValue)(i)){let e=null,t=i;!u&&0!==u||(e=_xeUtils.default.toNumber(u),t=""+e),void g(e,""+(t||""),{type:"check"})}else if(i||u||l){let e="integer"===t?_xeUtils.default.toInteger((0,_util.handleNumber)(i)):_xeUtils.default.toNumber((0,_util.handleNumber)(i));E(e)?y(e)||(e=l):e=u,a&&(t=m(i).toLowerCase())===_xeUtils.default.toNumber(e).toExponential()&&(e=t);l=f(e);g((0,_utils.eqEmptyValue)(l)?null:Number(l),l,{type:"check"})}},$=e=>{var t=U["inputValue"],u=d.value,l=t?Number(t):null;u||g(l,m(t),e),N(),U.isFocus=!1,U.isActivated=!1,o.dispatchEvent("blur",{value:l},e),i&&n&&i.triggerItemEvent(e,n.itemConfig.field,l)},X=(e,t)=>{var{min:u,max:l,type:a}=h,i=U["inputValue"],n=R.value,a="integer"===a?_xeUtils.default.toInteger((0,_util.handleNumber)(i)):_xeUtils.default.toNumber((0,_util.handleNumber)(i)),i=e?_xeUtils.default.add(a,n):_xeUtils.default.subtract(a,n);let r;r=E(i)?y(i)?i:l:u,x(f(r),t)},k=e=>{var t=A.value,u=C.value,l=_.value;K(),t||u||l||X(!1,e),U.isActivated=!0,o.dispatchEvent("next-number",{value:U.inputValue},e)},H=e=>{r.dnTimeout=window.setTimeout(()=>{k(e),H(e)},60)},F=e=>{var t=A.value,u=C.value,l=c.value;K(),t||u||l||X(!0,e),U.isActivated=!0,o.dispatchEvent("prev-number",{value:U.inputValue},e)},J=e=>{var t=_ui.globalEvents.hasKey(e,_ui.GLOBAL_EVENT_KEYS.ARROW_UP),u=_ui.globalEvents.hasKey(e,_ui.GLOBAL_EVENT_KEYS.ARROW_DOWN);(t||u)&&(e.preventDefault(),(t?F:k)(e))},Q=e=>{var{exponential:t,controls:u}=h,l=e.ctrlKey,a=e.shiftKey,i=e.altKey,n=e.keyCode,r=_ui.globalEvents.hasKey(e,_ui.GLOBAL_EVENT_KEYS.ESCAPE),o=_ui.globalEvents.hasKey(e,_ui.GLOBAL_EVENT_KEYS.ARROW_UP),s=_ui.globalEvents.hasKey(e,_ui.GLOBAL_EVENT_KEYS.ARROW_DOWN);l||a||i||!(_ui.globalEvents.hasKey(e,_ui.GLOBAL_EVENT_KEYS.SPACEBAR)||(!t||69!==n)&&65<=n&&n<=90||186<=n&&n<=188||191<=n)||e.preventDefault(),r?N():(o||s)&&u&&J(e),b(e)},Z=e=>{b(e)},K=()=>{var e=r["dnTimeout"];e&&(clearTimeout(e),r.dnTimeout=void 0)},ee=e=>{r.dnTimeout=window.setTimeout(()=>{F(e),ee(e)},60)},te=e=>{if(K(),0===e.button){const t=(0,_dom.hasClass)(e.currentTarget,"is--prev");(t?F:k)(e),r.dnTimeout=window.setTimeout(()=>{(t?ee:H)(e)},500)}},ue=e=>{var t;h.controls&&U.isActivated&&(e.stopPropagation(),e.preventDefault(),0<(t=e.deltaY)?k(e):t<0&&F(e)),b(e)},le=e=>{b(e)},ae=e=>{var t=U["isActivated"],u=I.value,l=M.value,a=A.value,i=d.value;!a&&t&&(U.isActivated=(0,_dom.getEventTargetNode)(e,u).flag||(0,_dom.getEventTargetNode)(e,l).flag,U.isActivated||(i||(a=U["inputValue"],t=a?Number(a):null,g(t,m(a),e)),N()))},ie=t=>{var u=h["clearable"];if(!A.value){var l=_ui.globalEvents.hasKey(t,_ui.GLOBAL_EVENT_KEYS.TAB),a=_ui.globalEvents.hasKey(t,_ui.GLOBAL_EVENT_KEYS.DELETE);let e=U.isActivated;l&&(e&&N(),e=!1,U.isActivated=e),a&&u&&e&&L(t,null)}},ne=()=>{var e=U["isActivated"];e&&N()},re=()=>{var e,t=h["controls"];return t?(t=c.value,e=_.value,(0,_vue.h)("div",{class:"vxe-input--control-icon"},[(0,_vue.h)("div",{class:"vxe-input--number-icon"},[(0,_vue.h)("div",{class:["vxe-input--number-btn is--prev",{"is--disabled":t}],onMousedown:te,onMouseup:K,onMouseleave:K},[(0,_vue.h)("i",{class:(0,_ui.getIcon)().NUMBER_INPUT_PREV_NUM})]),(0,_vue.h)("div",{class:["vxe-input--number-btn is--next",{"is--disabled":e}],onMousedown:te,onMouseup:K,onMouseleave:K},[(0,_vue.h)("i",{class:(0,_ui.getIcon)().NUMBER_INPUT_NEXT_NUM})])])])):(0,_vue.createCommentVNode)()};o={dispatchEvent:(e,t,u)=>{a(e,(0,_ui.createEvent)(u,{$numberInput:l},t))},focus(){var e=S.value;return U.isActivated=!0,e.focus(),(0,_vue.nextTick)()},blur(){return S.value.blur(),(U.isActivated=!1,_vue.nextTick)()},select(){return S.value.select(),(U.isActivated=!1,_vue.nextTick)()}},Object.assign(l,o);return l.renderVN=()=>{var e,t,u,l,a,i,n,r,o,{className:s,controls:v,type:d,align:p,name:_,autocomplete:c,autoComplete:m}=h,{inputValue:f,isFocus:b,isActivated:g}=U,x=q.value,y=A.value,E=C.value,N=P.value;return E?(0,_vue.h)("div",{ref:I,class:["vxe-number-input--readonly","type--"+d,s]},N):(E=w.value,e=B.value,t=D.value,u=T.value,a=h.prefixIcon,l=(l=V.prefix)||a?(0,_vue.h)("div",{class:"vxe-number-input--prefix",onClick:j},[(0,_vue.h)("div",{class:"vxe-number-input--prefix-icon"},l?(0,_vn.getSlotVNs)(l({})):[(0,_vue.h)("i",{class:a})])]):null,a=h.suffixIcon,i=U.inputValue,n=V.suffix,r=A.value,o=T.value,r=(0,_vue.h)("div",{class:["vxe-number-input--suffix",{"is--clear":o&&!r&&!(""===i||_xeUtils.default.eqNull(i))}]},[o?(0,_vue.h)("div",{class:"vxe-number-input--clear-icon",onClick:L},[(0,_vue.h)("i",{class:(0,_ui.getIcon)().INPUT_CLEAR})]):(0,_vue.createCommentVNode)(),re(),n||a?(0,_vue.h)("div",{class:"vxe-number-input--suffix-icon",onClick:z},n?(0,_vn.getSlotVNs)(n({})):[(0,_vue.h)("i",{class:a})]):(0,_vue.createCommentVNode)()]),(0,_vue.h)("div",{ref:I,class:["vxe-number-input","type--"+d,s,{["size--"+x]:x,["is--"+p]:p,"is--controls":v,"is--prefix":!!l,"is--suffix":!!r,"is--disabled":y,"is--active":g,"show--clear":u&&!y&&!(""===f||_xeUtils.default.eqNull(f))}],spellcheck:!1},[l||(0,_vue.createCommentVNode)(),(0,_vue.h)("div",{class:"vxe-number-input--wrapper"},[(0,_vue.h)("input",{ref:S,class:"vxe-number-input--inner",value:b||"amount"!==d?f:N,name:_,type:"text",placeholder:t,maxlength:e,readonly:E,disabled:y,autocomplete:m||c,onKeydown:Q,onKeyup:Z,onWheel:ue,onClick:le,onInput:Y,onChange:G,onFocus:W,onBlur:$})]),r||(0,_vue.createCommentVNode)()]))},(0,_vue.watch)(()=>h.modelValue,t=>{if(!r.isUM){var u=h["autoFill"],l=U["inputValue"],a=s.value,i=v.value;if((0,_utils.eqEmptyValue)(t))U.inputValue="";else{let e=""+t;i&&(e=(0,_util.toFloatValueFixed)(t,a),u||(e=""+_xeUtils.default.toNumber(e))),e!==l&&(U.inputValue=e)}}r.isUM=!1}),(0,_vue.watch)(()=>h.type,()=>{Object.assign(U,{inputValue:h.modelValue}),t()}),(0,_vue.onMounted)(()=>{_ui.globalEvents.on(l,"mousedown",ae),_ui.globalEvents.on(l,"keydown",ie),_ui.globalEvents.on(l,"blur",ne)}),(0,_vue.onBeforeUnmount)(()=>{U.isFocus=!1,K(),N(),_ui.globalEvents.off(l,"mousedown"),_ui.globalEvents.off(l,"keydown"),_ui.globalEvents.off(l,"blur")}),t(),l},render(){return this.renderVN()}});
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var _vue=require("vue"),_xeUtils=_interopRequireDefault(require("xe-utils")),_ui=require("../../ui"),_utils=require("../../ui/src/utils"),_dom=require("../../ui/src/dom"),_vn=require("../..//ui/src/vn"),_util=require("./util");function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}var _default=exports.default=(0,_vue.defineComponent)({name:"VxeNumberInput",props:{modelValue:[String,Number],immediate:{type:Boolean,default:!0},name:String,type:{type:String,default:"number"},clearable:{type:Boolean,default:()=>(0,_ui.getConfig)().numberInput.clearable},readonly:{type:Boolean,default:null},disabled:{type:Boolean,default:null},placeholder:String,maxLength:{type:[String,Number],default:()=>(0,_ui.getConfig)().numberInput.maxLength},autoComplete:{type:String,default:"off"},align:String,form:String,className:String,size:{type:String,default:()=>(0,_ui.getConfig)().numberInput.size||(0,_ui.getConfig)().size},multiple:Boolean,min:{type:[String,Number],default:null},max:{type:[String,Number],default:null},step:[String,Number],exponential:{type:Boolean,default:()=>(0,_ui.getConfig)().numberInput.exponential},showCurrency:{type:Boolean,default:()=>(0,_ui.getConfig)().numberInput.showCurrency},currencySymbol:{type:String,default:()=>(0,_ui.getConfig)().numberInput.currencySymbol},controls:{type:Boolean,default:()=>(0,_ui.getConfig)().numberInput.controls},digits:{type:[String,Number],default:null},autoFill:{type:Boolean,default:()=>(0,_ui.getConfig)().numberInput.autoFill},prefixIcon:String,suffixIcon:String,maxlength:[String,Number],autocomplete:String},emits:["update:modelValue","input","change","keydown","keyup","wheel","click","focus","blur","clear","prev-number","next-number","prefix-click","suffix-click"],setup(h,e){const{slots:V,emit:a}=e,i=(0,_vue.inject)("$xeForm",null),n=(0,_vue.inject)("xeFormItemInfo",null);var u=_xeUtils.default.uniqueId();const w=(0,_ui.useSize)(h)["computeSize"],U=(0,_vue.reactive)({isFocus:!1,isActivated:!1,inputValue:h.modelValue}),r={},I=(0,_vue.ref)(),S=(0,_vue.ref)(),M=(0,_vue.ref)(),O={refElem:I,refInput:S},l={xID:u,props:h,context:e,reactData:U,internalData:r,getRefMaps:()=>O};let o={};const C=(0,_vue.computed)(()=>{var e=h["readonly"];return null===e?!!i&&i.props.readonly:e}),A=(0,_vue.computed)(()=>{var e=h["disabled"];return null===e?!!i&&i.props.disabled:e}),s=(0,_vue.computed)(()=>{var{type:e,digits:t}=h;let u=t;return null===u&&null===(u=(0,_ui.getConfig)().numberInput.digits)&&"amount"===e&&(u=2),_xeUtils.default.toInteger(u)||1}),v=(0,_vue.computed)(()=>{var e=h["type"];return"float"===e||"amount"===e}),R=(0,_vue.computed)(()=>{var e=h["type"],t=s.value,u=v.value,l=h.step;return"integer"===e?_xeUtils.default.toInteger(l)||1:u?_xeUtils.default.toNumber(l)||1/Math.pow(10,t):_xeUtils.default.toNumber(l)||1}),T=(0,_vue.computed)(()=>h.clearable),B=(0,_vue.computed)(()=>{var e=h["multiple"];return C.value||e}),D=(0,_vue.computed)(()=>{var e=h["placeholder"];return(e=e||(0,_ui.getConfig)().numberInput.placeholder)?(0,_utils.getFuncText)(e):(0,_ui.getI18n)("vxe.base.pleaseInput")}),L=(0,_vue.computed)(()=>{var{maxLength:e,maxlength:t}=h;return _xeUtils.default.toNumber(e||t)||16}),d=(0,_vue.computed)(()=>{var e=h["immediate"];return e}),p=(0,_vue.computed)(()=>{var e=h["type"],t=U["inputValue"];return"integer"===e?_xeUtils.default.toInteger((0,_util.handleNumber)(t)):_xeUtils.default.toNumber((0,_util.handleNumber)(t))}),P=(0,_vue.computed)(()=>{var{type:t,showCurrency:u,currencySymbol:l,autoFill:a}=h,i=U["inputValue"],n=s.value;if("amount"!==t)return _xeUtils.default.toString(i);{var t=_xeUtils.default.toNumber(i);let e=_xeUtils.default.commafy(t,{digits:n});return a||([i,t]=e.split("."),t&&(n=t.replace(/0+$/,""),e=n?[i,".",n].join(""):i)),u?""+(l||(0,_ui.getI18n)("vxe.numberInput.currencySymbol")||"")+e:e}}),_=(0,_vue.computed)(()=>{var e=h["min"],t=U["inputValue"],u=p.value;return!(!t&&0!==t||null===e)&&u<=_xeUtils.default.toNumber(e)}),c=(0,_vue.computed)(()=>{var e=h["max"],t=U["inputValue"],u=p.value;return!(!t&&0!==t||null===e)&&u>=_xeUtils.default.toNumber(e)}),m=e=>_xeUtils.default.eqNull(e)?"":""+e,f=e=>{var{exponential:t,autoFill:u}=h,l=L.value,a=s.value;let i="";return v.value?(i=(0,_util.toFloatValueFixed)(e,a),u||(i=m(_xeUtils.default.toNumber(i)))):i=m(e),!t||e!==i&&m(e).toLowerCase()!==_xeUtils.default.toNumber(i).toExponential()?i.slice(0,l):e},b=e=>{var t=U["inputValue"];o.dispatchEvent(e.type,{value:t},e)},g=(e,t,u)=>{var e=(0,_utils.eqEmptyValue)(e)?null:Number(e),l=e!==h.modelValue;l&&(r.isUM=!0,a("update:modelValue",e)),U.inputValue!==t&&(0,_vue.nextTick)(()=>{U.inputValue=t||""}),o.dispatchEvent("input",{value:e},u),l&&(o.dispatchEvent("change",{value:e},u),i)&&n&&i.triggerItemEvent(u,n.itemConfig.field,e)},x=(e,t)=>{var u=d.value,l=(0,_utils.eqEmptyValue)(e)?null:_xeUtils.default.toNumber(e);U.inputValue=e,u?g(l,e,t):o.dispatchEvent("input",{value:l},t)},Y=e=>{var t=e.target.value;x(t,e)},G=e=>{d.value||b(e)},W=e=>{var t=U["inputValue"];U.inputValue=(0,_utils.eqEmptyValue)(t)?"":""+_xeUtils.default.toNumber(t),U.isFocus=!0,U.isActivated=!0,b(e)},j=e=>{var t;A.value||(t=U["inputValue"],o.dispatchEvent("prefix-click",{value:t},e))},k=(e,t)=>{focus(),g(null,"",e),o.dispatchEvent("clear",{value:t},e)},z=e=>{var t;A.value||(t=U["inputValue"],o.dispatchEvent("suffix-click",{value:t},e))},t=()=>{var u=h["autoFill"],l=U["inputValue"],a=s.value,e=v.value;if(e&&l){let e="",t=null;l&&(e=(0,_util.toFloatValueFixed)(l,a),t=_xeUtils.default.toNumber(e),u||(e=""+t)),l!==t?g(t,e,{type:"init"}):U.inputValue=e}},y=e=>null===h.max||_xeUtils.default.toNumber(e)<=_xeUtils.default.toNumber(h.max),E=e=>null===h.min||_xeUtils.default.toNumber(e)>=_xeUtils.default.toNumber(h.min),N=()=>{var{type:t,min:u,max:l,exponential:a}=h,i=U["inputValue"];if(!B.value)if((0,_utils.eqEmptyValue)(i)){let e=null,t=i;!u&&0!==u||(e=_xeUtils.default.toNumber(u),t=""+e),void g(e,""+(t||""),{type:"check"})}else if(i||u||l){let e="integer"===t?_xeUtils.default.toInteger((0,_util.handleNumber)(i)):_xeUtils.default.toNumber((0,_util.handleNumber)(i));E(e)?y(e)||(e=l):e=u,a&&(t=m(i).toLowerCase())===_xeUtils.default.toNumber(e).toExponential()&&(e=t);l=f(e);g((0,_utils.eqEmptyValue)(l)?null:Number(l),l,{type:"check"})}},$=e=>{var t=U["inputValue"],u=d.value,l=t?Number(t):null;u||g(l,m(t),e),N(),U.isFocus=!1,U.isActivated=!1,o.dispatchEvent("blur",{value:l},e),i&&n&&i.triggerItemEvent(e,n.itemConfig.field,l)},X=(e,t)=>{var{min:u,max:l,type:a}=h,i=U["inputValue"],n=R.value,a="integer"===a?_xeUtils.default.toInteger((0,_util.handleNumber)(i)):_xeUtils.default.toNumber((0,_util.handleNumber)(i)),i=e?_xeUtils.default.add(a,n):_xeUtils.default.subtract(a,n);let r;r=E(i)?y(i)?i:l:u,x(f(r),t)},F=e=>{var t=A.value,u=C.value,l=_.value;q(),t||u||l||X(!1,e),U.isActivated=!0,o.dispatchEvent("next-number",{value:U.inputValue},e)},H=e=>{r.dnTimeout=setTimeout(()=>{F(e),H(e)},60)},K=e=>{var t=A.value,u=C.value,l=c.value;q(),t||u||l||X(!0,e),U.isActivated=!0,o.dispatchEvent("prev-number",{value:U.inputValue},e)},J=e=>{var t=_ui.globalEvents.hasKey(e,_ui.GLOBAL_EVENT_KEYS.ARROW_UP),u=_ui.globalEvents.hasKey(e,_ui.GLOBAL_EVENT_KEYS.ARROW_DOWN);(t||u)&&(e.preventDefault(),(t?K:F)(e))},Q=e=>{var{exponential:t,controls:u}=h,l=e.ctrlKey,a=e.shiftKey,i=e.altKey,n=e.keyCode,r=_ui.globalEvents.hasKey(e,_ui.GLOBAL_EVENT_KEYS.ESCAPE),o=_ui.globalEvents.hasKey(e,_ui.GLOBAL_EVENT_KEYS.ARROW_UP),s=_ui.globalEvents.hasKey(e,_ui.GLOBAL_EVENT_KEYS.ARROW_DOWN);l||a||i||!(_ui.globalEvents.hasKey(e,_ui.GLOBAL_EVENT_KEYS.SPACEBAR)||(!t||69!==n)&&65<=n&&n<=90||186<=n&&n<=188||191<=n)||e.preventDefault(),r?N():(o||s)&&u&&J(e),b(e)},Z=e=>{b(e)},q=()=>{var e=r["dnTimeout"];e&&(clearTimeout(e),r.dnTimeout=void 0)},ee=e=>{r.dnTimeout=setTimeout(()=>{K(e),ee(e)},60)},te=e=>{if(q(),0===e.button){const t=(0,_dom.hasClass)(e.currentTarget,"is--prev");(t?K:F)(e),r.dnTimeout=setTimeout(()=>{(t?ee:H)(e)},500)}},ue=e=>{var t;h.controls&&U.isActivated&&(e.stopPropagation(),e.preventDefault(),0<(t=e.deltaY)?F(e):t<0&&K(e)),b(e)},le=e=>{b(e)},ae=e=>{var t=U["isActivated"],u=I.value,l=M.value,a=A.value,i=d.value;!a&&t&&(U.isActivated=(0,_dom.getEventTargetNode)(e,u).flag||(0,_dom.getEventTargetNode)(e,l).flag,U.isActivated||(i||(a=U["inputValue"],t=a?Number(a):null,g(t,m(a),e)),N()))},ie=t=>{var u=h["clearable"];if(!A.value){var l=_ui.globalEvents.hasKey(t,_ui.GLOBAL_EVENT_KEYS.TAB),a=_ui.globalEvents.hasKey(t,_ui.GLOBAL_EVENT_KEYS.DELETE);let e=U.isActivated;l&&(e&&N(),e=!1,U.isActivated=e),a&&u&&e&&k(t,null)}},ne=()=>{var e=U["isActivated"];e&&N()},re=()=>{var e,t=h["controls"];return t?(t=c.value,e=_.value,(0,_vue.h)("div",{class:"vxe-input--control-icon"},[(0,_vue.h)("div",{class:"vxe-input--number-icon"},[(0,_vue.h)("div",{class:["vxe-input--number-btn is--prev",{"is--disabled":t}],onMousedown:te,onMouseup:q,onMouseleave:q},[(0,_vue.h)("i",{class:(0,_ui.getIcon)().NUMBER_INPUT_PREV_NUM})]),(0,_vue.h)("div",{class:["vxe-input--number-btn is--next",{"is--disabled":e}],onMousedown:te,onMouseup:q,onMouseleave:q},[(0,_vue.h)("i",{class:(0,_ui.getIcon)().NUMBER_INPUT_NEXT_NUM})])])])):(0,_vue.createCommentVNode)()};o={dispatchEvent:(e,t,u)=>{a(e,(0,_ui.createEvent)(u,{$numberInput:l},t))},focus(){var e=S.value;return U.isActivated=!0,e.focus(),(0,_vue.nextTick)()},blur(){return S.value.blur(),(U.isActivated=!1,_vue.nextTick)()},select(){return S.value.select(),(U.isActivated=!1,_vue.nextTick)()}},Object.assign(l,o);return l.renderVN=()=>{var e,t,u,l,a,i,n,r,o,{className:s,controls:v,type:d,align:p,name:_,autocomplete:c,autoComplete:m}=h,{inputValue:f,isFocus:b,isActivated:g}=U,x=w.value,y=A.value,E=C.value,N=P.value;return E?(0,_vue.h)("div",{ref:I,class:["vxe-number-input--readonly","type--"+d,s]},N):(E=B.value,e=L.value,t=D.value,u=T.value,a=h.prefixIcon,l=(l=V.prefix)||a?(0,_vue.h)("div",{class:"vxe-number-input--prefix",onClick:j},[(0,_vue.h)("div",{class:"vxe-number-input--prefix-icon"},l?(0,_vn.getSlotVNs)(l({})):[(0,_vue.h)("i",{class:a})])]):null,a=h.suffixIcon,i=U.inputValue,n=V.suffix,r=A.value,o=T.value,r=(0,_vue.h)("div",{class:["vxe-number-input--suffix",{"is--clear":o&&!r&&!(""===i||_xeUtils.default.eqNull(i))}]},[o?(0,_vue.h)("div",{class:"vxe-number-input--clear-icon",onClick:k},[(0,_vue.h)("i",{class:(0,_ui.getIcon)().INPUT_CLEAR})]):(0,_vue.createCommentVNode)(),re(),n||a?(0,_vue.h)("div",{class:"vxe-number-input--suffix-icon",onClick:z},n?(0,_vn.getSlotVNs)(n({})):[(0,_vue.h)("i",{class:a})]):(0,_vue.createCommentVNode)()]),(0,_vue.h)("div",{ref:I,class:["vxe-number-input","type--"+d,s,{["size--"+x]:x,["is--"+p]:p,"is--controls":v,"is--prefix":!!l,"is--suffix":!!r,"is--disabled":y,"is--active":g,"show--clear":u&&!y&&!(""===f||_xeUtils.default.eqNull(f))}],spellcheck:!1},[l||(0,_vue.createCommentVNode)(),(0,_vue.h)("div",{class:"vxe-number-input--wrapper"},[(0,_vue.h)("input",{ref:S,class:"vxe-number-input--inner",value:b||"amount"!==d?f:N,name:_,type:"text",placeholder:t,maxlength:e,readonly:E,disabled:y,autocomplete:m||c,onKeydown:Q,onKeyup:Z,onWheel:ue,onClick:le,onInput:Y,onChange:G,onFocus:W,onBlur:$})]),r||(0,_vue.createCommentVNode)()]))},(0,_vue.watch)(()=>h.modelValue,t=>{if(!r.isUM){var u=h["autoFill"],l=U["inputValue"],a=s.value,i=v.value;if((0,_utils.eqEmptyValue)(t))U.inputValue="";else{let e=""+t;i&&(e=(0,_util.toFloatValueFixed)(t,a),u||(e=""+_xeUtils.default.toNumber(e))),e!==l&&(U.inputValue=e)}}r.isUM=!1}),(0,_vue.watch)(()=>h.type,()=>{Object.assign(U,{inputValue:h.modelValue}),t()}),(0,_vue.onMounted)(()=>{_ui.globalEvents.on(l,"mousedown",ae),_ui.globalEvents.on(l,"keydown",ie),_ui.globalEvents.on(l,"blur",ne)}),(0,_vue.onBeforeUnmount)(()=>{U.isFocus=!1,q(),N(),_ui.globalEvents.off(l,"mousedown"),_ui.globalEvents.off(l,"keydown"),_ui.globalEvents.off(l,"blur")}),t(),l},render(){return this.renderVN()}});
|
|
@@ -233,7 +233,7 @@ var _default = exports.default = (0, _vue.defineComponent)({
|
|
|
233
233
|
emit('update:modelValue', false);
|
|
234
234
|
return new Promise(resolve => {
|
|
235
235
|
if (reactData.isAniVisible) {
|
|
236
|
-
internalData.hpTimeout =
|
|
236
|
+
internalData.hpTimeout = setTimeout(() => {
|
|
237
237
|
reactData.isAniVisible = false;
|
|
238
238
|
(0, _vue.nextTick)(() => {
|
|
239
239
|
resolve();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var _vue=require("vue"),_xeUtils=_interopRequireDefault(require("xe-utils")),_ui=require("../../ui"),_dom=require("../../ui/src/dom"),_utils=require("../../ui/src/utils");function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}var _default=exports.default=(0,_vue.defineComponent)({name:"VxePulldown",props:{modelValue:Boolean,disabled:Boolean,placement:String,trigger:{type:String,default:(0,_ui.getConfig)().pulldown.trigger},size:{type:String,default:()=>(0,_ui.getConfig)().size},options:Array,className:{type:[String,Function],default:(0,_ui.getConfig)().pulldown.className},popupClassName:[String,Function],showPopupShadow:Boolean,destroyOnClose:{type:Boolean,default:(0,_ui.getConfig)().pulldown.destroyOnClose},transfer:{type:Boolean,default:null}},emits:["update:modelValue","click","option-click","show-panel","hide-panel","visible-change"],setup(g,e){const{slots:h,emit:t}=e,i=(0,_vue.inject)("$xeModal",null),n=(0,_vue.inject)("$xeDrawer",null),a=(0,_vue.inject)("$xeTable",null),o=(0,_vue.inject)("$xeForm",null);var l=_xeUtils.default.uniqueId();const x=(0,_ui.useSize)(g)["computeSize"],w=(0,_vue.reactive)({initialized:!1,panelIndex:0,panelStyle:{},panelPlacement:null,visiblePanel:!1,isAniVisible:!1,isActivated:!1}),u={hpTimeout:void 0},P=(0,_vue.ref)(),T=(0,_vue.ref)(),V=(0,_vue.ref)(),y=(0,_vue.computed)(()=>{var e=g["transfer"];if(null===e){var l=(0,_ui.getConfig)().pulldown.transfer;if(_xeUtils.default.isBoolean(l))return l;if(a||i||n||o)return!0}return e}),s={refElem:P},C={xID:l,props:g,context:e,reactData:w,internalData:u,getRefMaps:()=>s};const d=()=>{w.panelIndex<(0,_utils.getLastZIndex)()&&(w.panelIndex=(0,_utils.nextZIndex)())};const r=()=>(0,_vue.nextTick)().then(()=>{var t=g["placement"],{panelIndex:n,visiblePanel:a}=w,e=y.value;if(a){var a=T.value,o=V.value;if(o&&a){var u=a.offsetHeight,s=a.offsetWidth,d=o.offsetHeight,o=o.offsetWidth,n={zIndex:n},{boundingTop:a,boundingLeft:r,visibleHeight:v,visibleWidth:p}=(0,_dom.getAbsolutePos)(a);let i="bottom";if(e){let e=r,l=a+u;"top"===t?(i="top",l=a-d):t||(l+d+5>v&&(i="top",l=a-d),l<5&&(i="bottom",l=a+u)),e+o+5>p&&(e-=e+o+5-p),e<5&&(e=5),Object.assign(n,{left:e+"px",top:l+"px",minWidth:s+"px"})}else"top"===t?(i="top",n.bottom=u+"px"):t||v<a+u+d&&5<a-u-d&&(i="top",n.bottom=u+"px");w.panelStyle=n,w.panelPlacement=i}}return(0,_vue.nextTick)()}),v=()=>(w.initialized||(w.initialized=!0),new Promise(e=>{g.disabled?(0,_vue.nextTick)(()=>{e()}):(u.hpTimeout&&clearTimeout(u.hpTimeout),w.isActivated=!0,w.isAniVisible=!0,setTimeout(()=>{w.visiblePanel=!0,t("update:modelValue",!0),r(),setTimeout(()=>{e(r())},40)},10),d(),b("visible-change",{visible:!0},null))})),p=()=>(w.visiblePanel=!1,b("visible-change",{visible:!1},null),t("update:modelValue",!1),new Promise(e=>{w.isAniVisible?u.hpTimeout=
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var _vue=require("vue"),_xeUtils=_interopRequireDefault(require("xe-utils")),_ui=require("../../ui"),_dom=require("../../ui/src/dom"),_utils=require("../../ui/src/utils");function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}var _default=exports.default=(0,_vue.defineComponent)({name:"VxePulldown",props:{modelValue:Boolean,disabled:Boolean,placement:String,trigger:{type:String,default:(0,_ui.getConfig)().pulldown.trigger},size:{type:String,default:()=>(0,_ui.getConfig)().size},options:Array,className:{type:[String,Function],default:(0,_ui.getConfig)().pulldown.className},popupClassName:[String,Function],showPopupShadow:Boolean,destroyOnClose:{type:Boolean,default:(0,_ui.getConfig)().pulldown.destroyOnClose},transfer:{type:Boolean,default:null}},emits:["update:modelValue","click","option-click","show-panel","hide-panel","visible-change"],setup(g,e){const{slots:h,emit:t}=e,i=(0,_vue.inject)("$xeModal",null),n=(0,_vue.inject)("$xeDrawer",null),a=(0,_vue.inject)("$xeTable",null),o=(0,_vue.inject)("$xeForm",null);var l=_xeUtils.default.uniqueId();const x=(0,_ui.useSize)(g)["computeSize"],w=(0,_vue.reactive)({initialized:!1,panelIndex:0,panelStyle:{},panelPlacement:null,visiblePanel:!1,isAniVisible:!1,isActivated:!1}),u={hpTimeout:void 0},P=(0,_vue.ref)(),T=(0,_vue.ref)(),V=(0,_vue.ref)(),y=(0,_vue.computed)(()=>{var e=g["transfer"];if(null===e){var l=(0,_ui.getConfig)().pulldown.transfer;if(_xeUtils.default.isBoolean(l))return l;if(a||i||n||o)return!0}return e}),s={refElem:P},C={xID:l,props:g,context:e,reactData:w,internalData:u,getRefMaps:()=>s};const d=()=>{w.panelIndex<(0,_utils.getLastZIndex)()&&(w.panelIndex=(0,_utils.nextZIndex)())};const r=()=>(0,_vue.nextTick)().then(()=>{var t=g["placement"],{panelIndex:n,visiblePanel:a}=w,e=y.value;if(a){var a=T.value,o=V.value;if(o&&a){var u=a.offsetHeight,s=a.offsetWidth,d=o.offsetHeight,o=o.offsetWidth,n={zIndex:n},{boundingTop:a,boundingLeft:r,visibleHeight:v,visibleWidth:p}=(0,_dom.getAbsolutePos)(a);let i="bottom";if(e){let e=r,l=a+u;"top"===t?(i="top",l=a-d):t||(l+d+5>v&&(i="top",l=a-d),l<5&&(i="bottom",l=a+u)),e+o+5>p&&(e-=e+o+5-p),e<5&&(e=5),Object.assign(n,{left:e+"px",top:l+"px",minWidth:s+"px"})}else"top"===t?(i="top",n.bottom=u+"px"):t||v<a+u+d&&5<a-u-d&&(i="top",n.bottom=u+"px");w.panelStyle=n,w.panelPlacement=i}}return(0,_vue.nextTick)()}),v=()=>(w.initialized||(w.initialized=!0),new Promise(e=>{g.disabled?(0,_vue.nextTick)(()=>{e()}):(u.hpTimeout&&clearTimeout(u.hpTimeout),w.isActivated=!0,w.isAniVisible=!0,setTimeout(()=>{w.visiblePanel=!0,t("update:modelValue",!0),r(),setTimeout(()=>{e(r())},40)},10),d(),b("visible-change",{visible:!0},null))})),p=()=>(w.visiblePanel=!1,b("visible-change",{visible:!1},null),t("update:modelValue",!1),new Promise(e=>{w.isAniVisible?u.hpTimeout=setTimeout(()=>{(w.isAniVisible=!1,_vue.nextTick)(()=>{e()})},350):(0,_vue.nextTick)(()=>{e()})}));const A=(e,l)=>{l.disabled||(w.visiblePanel&&(p(),b("hide-panel",{},e)),b("option-click",{option:l},e))},k=e=>{var l=g["trigger"];"click"===l&&(w.visiblePanel?(p(),b("hide-panel",{},e)):(v(),b("show-panel",{},e))),b("click",{$pulldown:C},e)},c=e=>{var l=g["disabled"],i=w["visiblePanel"],t=V.value;l||i&&((0,_dom.getEventTargetNode)(e,t).flag?r():(p(),b("hide-panel",{},e)))},_=e=>{var l=g["disabled"],i=w["visiblePanel"],t=P.value,n=V.value;l||(w.isActivated=(0,_dom.getEventTargetNode)(e,t).flag||(0,_dom.getEventTargetNode)(e,n).flag,i&&!w.isActivated&&(p(),b("hide-panel",{},e)))},f=e=>{w.visiblePanel&&(w.isActivated=!1,p(),b("hide-panel",{},e))},b=(e,l,i)=>{t(e,(0,_ui.createEvent)(i,{$pulldown:C},l))};l={dispatchEvent:b,isPanelVisible:()=>w.visiblePanel,togglePanel:()=>(w.visiblePanel?p:v)(),showPanel:v,hidePanel:p},Object.assign(C,l),(0,_vue.watch)(()=>g.modelValue,e=>{w.isActivated=!!e,(e?v:p)()}),(0,_vue.nextTick)(()=>{g.modelValue&&v(),_ui.globalEvents.on(C,"mousewheel",c),_ui.globalEvents.on(C,"mousedown",_),_ui.globalEvents.on(C,"blur",f)}),(0,_vue.onUnmounted)(()=>{_ui.globalEvents.off(C,"mousewheel"),_ui.globalEvents.off(C,"mousedown"),_ui.globalEvents.off(C,"blur")});return C.renderVN=()=>{var{className:e,options:l,popupClassName:i,showPopupShadow:t,destroyOnClose:n,disabled:a}=g,{initialized:o,isActivated:u,isAniVisible:s,visiblePanel:d,panelStyle:r,panelPlacement:v}=w,p=y.value,c=x.value,_=h.default,f=h.header,b=h.footer,m=h.dropdown;return(0,_vue.h)("div",{ref:P,class:["vxe-pulldown",e?_xeUtils.default.isFunction(e)?e({$pulldown:C}):e:"",{["size--"+c]:c,"is--visible":d,"is--disabled":a,"is--active":u}]},[(0,_vue.h)("div",{ref:T,class:"vxe-pulldown--content",onClick:k},_?_({$pulldown:C}):[]),(0,_vue.h)(_vue.Teleport,{to:"body",disabled:!p||!o},[(0,_vue.h)("div",{ref:V,class:["vxe-table--ignore-clear vxe-pulldown--panel",i?_xeUtils.default.isFunction(i)?i({$pulldown:C}):i:"",{["size--"+c]:c,"is--shadow":t,"is--transfer":p,"ani--leave":s,"ani--enter":d}],placement:v,style:r},[(0,_vue.h)("div",{class:"vxe-pulldown--panel-wrapper"},o&&(!n||d||s)?[f?(0,_vue.h)("div",{class:"vxe-pulldown--panel-header"},f({$pulldown:C})):(0,_vue.createCommentVNode)(),(0,_vue.h)("div",{class:"vxe-pulldown--panel-body"},m?m({$pulldown:C}):[(e=>{const i=h.option;return(0,_vue.h)("div",{class:"vxe-pulldown--panel-list"},e?e.map(l=>(0,_vue.h)("div",{class:"vxe-pulldown--panel-item",onClick(e){A(e,l)}},i?i({$pulldown:C,option:l}):""+(l.label||""))):[])})(l)]),b?(0,_vue.h)("div",{class:"vxe-pulldown--panel-footer"},b({$pulldown:C})):(0,_vue.createCommentVNode)()]:[])])])])},C},render(){return this.renderVN()}});
|
package/lib/select/src/select.js
CHANGED
|
@@ -40,6 +40,10 @@ var _default = exports.default = (0, _vue.defineComponent)({
|
|
|
40
40
|
default: () => (0, _ui.getConfig)().select.multiCharOverflow
|
|
41
41
|
},
|
|
42
42
|
prefixIcon: String,
|
|
43
|
+
allowCreate: {
|
|
44
|
+
type: Boolean,
|
|
45
|
+
default: () => (0, _ui.getConfig)().select.allowCreate
|
|
46
|
+
},
|
|
43
47
|
placement: String,
|
|
44
48
|
options: Array,
|
|
45
49
|
optionProps: Object,
|
|
@@ -74,7 +78,7 @@ var _default = exports.default = (0, _vue.defineComponent)({
|
|
|
74
78
|
// 已废弃,被 option-config.useKey 替换
|
|
75
79
|
optionKey: Boolean
|
|
76
80
|
},
|
|
77
|
-
emits: ['update:modelValue', 'change', 'clear', 'blur', 'focus', 'click', 'scroll'],
|
|
81
|
+
emits: ['update:modelValue', 'change', 'clear', 'blur', 'focus', 'click', 'scroll', 'visible-change'],
|
|
78
82
|
setup(props, context) {
|
|
79
83
|
const {
|
|
80
84
|
slots,
|
|
@@ -118,6 +122,7 @@ var _default = exports.default = (0, _vue.defineComponent)({
|
|
|
118
122
|
const internalData = {
|
|
119
123
|
synchData: [],
|
|
120
124
|
fullData: [],
|
|
125
|
+
optAddMaps: {},
|
|
121
126
|
optGroupKeyMaps: {},
|
|
122
127
|
optFullValMaps: {},
|
|
123
128
|
remoteValMaps: {},
|
|
@@ -501,15 +506,21 @@ var _default = exports.default = (0, _vue.defineComponent)({
|
|
|
501
506
|
}, 100);
|
|
502
507
|
updateZIndex();
|
|
503
508
|
updatePlacement();
|
|
509
|
+
dispatchEvent('visible-change', {
|
|
510
|
+
visible: true
|
|
511
|
+
}, null);
|
|
504
512
|
}
|
|
505
513
|
};
|
|
506
514
|
const hideOptionPanel = () => {
|
|
507
515
|
reactData.searchValue = '';
|
|
508
516
|
reactData.searchLoading = false;
|
|
509
517
|
reactData.visiblePanel = false;
|
|
510
|
-
internalData.hpTimeout =
|
|
518
|
+
internalData.hpTimeout = setTimeout(() => {
|
|
511
519
|
reactData.isAniVisible = false;
|
|
512
520
|
}, 350);
|
|
521
|
+
dispatchEvent('visible-change', {
|
|
522
|
+
visible: false
|
|
523
|
+
}, null);
|
|
513
524
|
};
|
|
514
525
|
const changeEvent = (evnt, selectValue) => {
|
|
515
526
|
emitModel(selectValue);
|
|
@@ -718,19 +729,29 @@ var _default = exports.default = (0, _vue.defineComponent)({
|
|
|
718
729
|
showOptionPanel();
|
|
719
730
|
setTimeout(() => {
|
|
720
731
|
reactData.triggerFocusPanel = false;
|
|
721
|
-
},
|
|
732
|
+
}, 500);
|
|
722
733
|
}
|
|
723
734
|
}
|
|
724
735
|
dispatchEvent('focus', {}, evnt);
|
|
725
736
|
};
|
|
726
737
|
const clickEvent = evnt => {
|
|
727
738
|
togglePanelEvent(evnt);
|
|
728
|
-
dispatchEvent('click', {
|
|
739
|
+
dispatchEvent('click', {
|
|
740
|
+
triggerButton: false,
|
|
741
|
+
visible: reactData.visiblePanel
|
|
742
|
+
}, evnt);
|
|
729
743
|
};
|
|
730
744
|
const blurEvent = evnt => {
|
|
731
745
|
reactData.isActivated = false;
|
|
732
746
|
dispatchEvent('blur', {}, evnt);
|
|
733
747
|
};
|
|
748
|
+
const suffixClickEvent = evnt => {
|
|
749
|
+
togglePanelEvent(evnt);
|
|
750
|
+
dispatchEvent('click', {
|
|
751
|
+
triggerButton: true,
|
|
752
|
+
visible: reactData.visiblePanel
|
|
753
|
+
}, evnt);
|
|
754
|
+
};
|
|
734
755
|
const modelSearchEvent = value => {
|
|
735
756
|
reactData.searchValue = value;
|
|
736
757
|
};
|
|
@@ -802,14 +823,34 @@ var _default = exports.default = (0, _vue.defineComponent)({
|
|
|
802
823
|
reactData.topSpaceHeight = scrollYLoad ? Math.max(scrollYStore.startIndex * scrollYStore.rowHeight, 0) : 0;
|
|
803
824
|
};
|
|
804
825
|
const handleData = () => {
|
|
826
|
+
const {
|
|
827
|
+
filterable,
|
|
828
|
+
allowCreate
|
|
829
|
+
} = props;
|
|
805
830
|
const {
|
|
806
831
|
scrollYLoad,
|
|
807
|
-
afterVisibleList
|
|
832
|
+
afterVisibleList,
|
|
833
|
+
searchValue
|
|
808
834
|
} = reactData;
|
|
809
835
|
const {
|
|
836
|
+
optAddMaps,
|
|
810
837
|
scrollYStore
|
|
811
838
|
} = internalData;
|
|
812
|
-
|
|
839
|
+
const labelField = computeLabelField.value;
|
|
840
|
+
const valueField = computeValueField.value;
|
|
841
|
+
const restList = scrollYLoad ? afterVisibleList.slice(scrollYStore.startIndex, scrollYStore.endIndex) : afterVisibleList.slice(0);
|
|
842
|
+
if (filterable && allowCreate && searchValue) {
|
|
843
|
+
if (!restList.some(option => option[labelField] === searchValue)) {
|
|
844
|
+
const addItem = optAddMaps[searchValue] || {
|
|
845
|
+
[getOptKey()]: searchValue,
|
|
846
|
+
[labelField]: searchValue,
|
|
847
|
+
[valueField]: searchValue
|
|
848
|
+
};
|
|
849
|
+
optAddMaps[searchValue] = addItem;
|
|
850
|
+
restList.unshift(addItem);
|
|
851
|
+
}
|
|
852
|
+
}
|
|
853
|
+
reactData.optList = restList;
|
|
813
854
|
return (0, _vue.nextTick)();
|
|
814
855
|
};
|
|
815
856
|
const updateYData = () => {
|
|
@@ -1114,12 +1155,16 @@ var _default = exports.default = (0, _vue.defineComponent)({
|
|
|
1114
1155
|
Object.assign($xeSelect, selectMethods);
|
|
1115
1156
|
const renderOption = (list, group) => {
|
|
1116
1157
|
const {
|
|
1158
|
+
allowCreate,
|
|
1117
1159
|
optionKey,
|
|
1118
1160
|
modelValue
|
|
1119
1161
|
} = props;
|
|
1120
1162
|
const {
|
|
1121
1163
|
currentOption
|
|
1122
1164
|
} = reactData;
|
|
1165
|
+
const {
|
|
1166
|
+
optAddMaps
|
|
1167
|
+
} = internalData;
|
|
1123
1168
|
const optionOpts = computeOptionOpts.value;
|
|
1124
1169
|
const labelField = computeLabelField.value;
|
|
1125
1170
|
const valueField = computeValueField.value;
|
|
@@ -1136,21 +1181,24 @@ var _default = exports.default = (0, _vue.defineComponent)({
|
|
|
1136
1181
|
const optid = getOptId(option);
|
|
1137
1182
|
const optionValue = option[valueField];
|
|
1138
1183
|
const isOptGroup = hasOptGroupById(optid);
|
|
1139
|
-
const
|
|
1140
|
-
const
|
|
1141
|
-
const
|
|
1184
|
+
const isAdd = !!(allowCreate && optAddMaps[optid]);
|
|
1185
|
+
const isSelected = !isAdd && (_xeUtils.default.isArray(modelValue) ? modelValue.indexOf(optionValue) > -1 : modelValue === optionValue);
|
|
1186
|
+
const isVisible = isAdd || !isOptGroup || isOptionVisible(option);
|
|
1187
|
+
const isDisabled = !isAdd && checkOptionDisabled(isSelected, option, group);
|
|
1142
1188
|
const defaultSlot = slots ? slots.default : null;
|
|
1143
1189
|
const optParams = {
|
|
1144
1190
|
option,
|
|
1145
1191
|
group: null,
|
|
1146
1192
|
$select: $xeSelect
|
|
1147
1193
|
};
|
|
1194
|
+
const optVNs = optionSlot ? callSlot(optionSlot, optParams) : defaultSlot ? callSlot(defaultSlot, optParams) : (0, _utils.getFuncText)(option[isOptGroup ? groupLabelField : labelField]);
|
|
1148
1195
|
return isVisible ? (0, _vue.h)('div', {
|
|
1149
1196
|
key: useKey || optionKey ? optid : cIndex,
|
|
1150
1197
|
class: ['vxe-select-option', className ? _xeUtils.default.isFunction(className) ? className(optParams) : className : '', {
|
|
1151
1198
|
'vxe-select-optgroup': isOptGroup,
|
|
1152
1199
|
'is--disabled': isDisabled,
|
|
1153
1200
|
'is--selected': isSelected,
|
|
1201
|
+
'is--add': isAdd,
|
|
1154
1202
|
'is--hover': currentOption && getOptId(currentOption) === optid
|
|
1155
1203
|
}],
|
|
1156
1204
|
// attrs
|
|
@@ -1172,7 +1220,15 @@ var _default = exports.default = (0, _vue.defineComponent)({
|
|
|
1172
1220
|
setCurrentOption(option);
|
|
1173
1221
|
}
|
|
1174
1222
|
}
|
|
1175
|
-
},
|
|
1223
|
+
}, allowCreate ? [(0, _vue.h)('span', {
|
|
1224
|
+
key: 1,
|
|
1225
|
+
class: 'vxe-select-option--label'
|
|
1226
|
+
}, optVNs), isAdd ? (0, _vue.h)('span', {
|
|
1227
|
+
key: 2,
|
|
1228
|
+
class: 'vxe-select-option--add-icon'
|
|
1229
|
+
}, [(0, _vue.h)('i', {
|
|
1230
|
+
class: (0, _ui.getIcon)().ADD_OPTION
|
|
1231
|
+
})]) : (0, _ui.renderEmptyElement)($xeSelect)] : optVNs) : (0, _ui.renderEmptyElement)($xeSelect);
|
|
1176
1232
|
});
|
|
1177
1233
|
};
|
|
1178
1234
|
const renderOpts = () => {
|
|
@@ -1261,7 +1317,7 @@ var _default = exports.default = (0, _vue.defineComponent)({
|
|
|
1261
1317
|
onClick: clickEvent,
|
|
1262
1318
|
onFocus: focusEvent,
|
|
1263
1319
|
onBlur: blurEvent,
|
|
1264
|
-
onSuffixClick:
|
|
1320
|
+
onSuffixClick: suffixClickEvent
|
|
1265
1321
|
}, prefixSlot ? {
|
|
1266
1322
|
prefix: () => prefixSlot({})
|
|
1267
1323
|
} : {}), (0, _vue.h)(_vue.Teleport, {
|
|
@@ -1296,9 +1352,9 @@ var _default = exports.default = (0, _vue.defineComponent)({
|
|
|
1296
1352
|
onFocus: focusSearchEvent,
|
|
1297
1353
|
onChange: triggerSearchEvent,
|
|
1298
1354
|
onSearch: triggerSearchEvent
|
|
1299
|
-
})]) : (0,
|
|
1355
|
+
})]) : (0, _ui.renderEmptyElement)($xeSelect), headerSlot ? (0, _vue.h)('div', {
|
|
1300
1356
|
class: 'vxe-select--panel-header'
|
|
1301
|
-
}, headerSlot({})) : (0,
|
|
1357
|
+
}, headerSlot({})) : (0, _ui.renderEmptyElement)($xeSelect), (0, _vue.h)('div', {
|
|
1302
1358
|
class: 'vxe-select--panel-body'
|
|
1303
1359
|
}, [(0, _vue.h)('div', {
|
|
1304
1360
|
ref: refVirtualWrapper,
|
|
@@ -1317,7 +1373,7 @@ var _default = exports.default = (0, _vue.defineComponent)({
|
|
|
1317
1373
|
}
|
|
1318
1374
|
}, renderOpts())])]), footerSlot ? (0, _vue.h)('div', {
|
|
1319
1375
|
class: 'vxe-select--panel-footer'
|
|
1320
|
-
}, footerSlot({})) : (0,
|
|
1376
|
+
}, footerSlot({})) : (0, _ui.renderEmptyElement)($xeSelect)])] : [])])]);
|
|
1321
1377
|
};
|
|
1322
1378
|
(0, _vue.watch)(() => reactData.staticOptions, val => {
|
|
1323
1379
|
loadData(val);
|