vxe-pc-ui 4.17.0 → 4.17.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/all.esm.js +297 -152
- package/dist/style.css +1 -1
- package/dist/style.min.css +1 -1
- package/es/date-picker/src/date-picker.js +6 -2
- package/es/date-range-picker/src/date-range-picker.js +6 -2
- package/es/icon/style.css +1 -1
- package/es/input/src/input.js +79 -51
- package/es/number-input/src/number-input.js +31 -23
- package/es/password-input/src/password-input.js +133 -62
- package/es/password-input/style.css +5 -0
- package/es/password-input/style.min.css +1 -1
- package/es/style.css +1 -1
- package/es/style.min.css +1 -1
- package/es/textarea/src/textarea.js +43 -13
- package/es/ui/index.js +1 -1
- package/es/ui/src/log.js +1 -1
- package/es/vxe-password-input/style.css +5 -0
- package/es/vxe-password-input/style.min.css +1 -1
- package/lib/date-picker/src/date-picker.js +6 -1
- package/lib/date-picker/src/date-picker.min.js +1 -1
- package/lib/date-range-picker/src/date-range-picker.js +6 -1
- package/lib/date-range-picker/src/date-range-picker.min.js +1 -1
- package/lib/icon/style/style.css +1 -1
- package/lib/icon/style/style.min.css +1 -1
- package/lib/index.umd.js +321 -168
- package/lib/index.umd.min.js +1 -1
- package/lib/input/src/input.js +83 -53
- package/lib/input/src/input.min.js +1 -1
- package/lib/number-input/src/number-input.js +35 -25
- package/lib/number-input/src/number-input.min.js +1 -1
- package/lib/password-input/src/password-input.js +140 -71
- package/lib/password-input/src/password-input.min.js +1 -1
- package/lib/password-input/style/style.css +5 -0
- package/lib/password-input/style/style.min.css +1 -1
- package/lib/style.css +1 -1
- package/lib/style.min.css +1 -1
- package/lib/textarea/src/textarea.js +46 -13
- package/lib/textarea/src/textarea.min.js +1 -1
- package/lib/ui/index.js +1 -1
- package/lib/ui/index.min.js +1 -1
- package/lib/ui/src/log.js +1 -1
- package/lib/ui/src/log.min.js +1 -1
- package/lib/vxe-password-input/style/style.css +5 -0
- package/lib/vxe-password-input/style/style.min.css +1 -1
- package/package.json +1 -1
- package/packages/date-picker/src/date-picker.ts +6 -2
- package/packages/date-range-picker/src/date-range-picker.ts +6 -2
- package/packages/input/src/input.ts +85 -56
- package/packages/number-input/src/number-input.ts +32 -25
- package/packages/password-input/src/password-input.ts +145 -69
- package/packages/textarea/src/textarea.ts +49 -17
- package/styles/components/password-input.scss +4 -0
- package/types/components/date-picker.d.ts +2 -0
- package/types/components/date-range-picker.d.ts +2 -0
- package/types/components/input.d.ts +2 -0
- package/types/components/number-input.d.ts +2 -0
- package/types/components/password-input.d.ts +4 -0
- package/types/components/table-module/edit.d.ts +37 -4
- package/types/components/table.d.ts +9 -2
- package/types/components/textarea.d.ts +2 -0
- package/types/ui/renderer.d.ts +9 -3
- /package/es/icon/{iconfont.1786782471977.ttf → iconfont.1786868252000.ttf} +0 -0
- /package/es/icon/{iconfont.1786782471977.woff → iconfont.1786868252000.woff} +0 -0
- /package/es/icon/{iconfont.1786782471977.woff2 → iconfont.1786868252000.woff2} +0 -0
- /package/es/{iconfont.1786782471977.ttf → iconfont.1786868252000.ttf} +0 -0
- /package/es/{iconfont.1786782471977.woff → iconfont.1786868252000.woff} +0 -0
- /package/es/{iconfont.1786782471977.woff2 → iconfont.1786868252000.woff2} +0 -0
- /package/lib/icon/style/{iconfont.1786782471977.ttf → iconfont.1786868252000.ttf} +0 -0
- /package/lib/icon/style/{iconfont.1786782471977.woff → iconfont.1786868252000.woff} +0 -0
- /package/lib/icon/style/{iconfont.1786782471977.woff2 → iconfont.1786868252000.woff2} +0 -0
- /package/lib/{iconfont.1786782471977.ttf → iconfont.1786868252000.ttf} +0 -0
- /package/lib/{iconfont.1786782471977.woff → iconfont.1786868252000.woff} +0 -0
- /package/lib/{iconfont.1786782471977.woff2 → iconfont.1786868252000.woff2} +0 -0
package/dist/all.esm.js
CHANGED
|
@@ -81,7 +81,7 @@ function checkDynamic() {
|
|
|
81
81
|
}
|
|
82
82
|
|
|
83
83
|
const { log } = VxeUI;
|
|
84
|
-
const uiVersion = `ui v${"4.17.
|
|
84
|
+
const uiVersion = `ui v${"4.17.2"}`;
|
|
85
85
|
function createComponentLog(name) {
|
|
86
86
|
const tableVersion = VxeUI.tableVersion ? `table v${VxeUI.tableVersion}` : '';
|
|
87
87
|
const ganttVersion = VxeUI.ganttVersion ? `gantt v${VxeUI.ganttVersion}` : '';
|
|
@@ -95,7 +95,7 @@ function createComponentLog(name) {
|
|
|
95
95
|
const warnLog$h = log.create('warn', uiVersion);
|
|
96
96
|
log.create('error', uiVersion);
|
|
97
97
|
|
|
98
|
-
const version = "4.17.
|
|
98
|
+
const version = "4.17.2";
|
|
99
99
|
VxeUI.uiVersion = version;
|
|
100
100
|
VxeUI.dynamicApp = dynamicApp;
|
|
101
101
|
function config(options) {
|
|
@@ -9089,6 +9089,10 @@ var VxeInputComponent = defineVxeComponent({
|
|
|
9089
9089
|
align: String,
|
|
9090
9090
|
form: String,
|
|
9091
9091
|
className: String,
|
|
9092
|
+
inputClassName: {
|
|
9093
|
+
type: String,
|
|
9094
|
+
default: () => getConfig$3().input.inputClassName
|
|
9095
|
+
},
|
|
9092
9096
|
size: {
|
|
9093
9097
|
type: String,
|
|
9094
9098
|
default: () => getConfig$3().input.size || getConfig$3().size
|
|
@@ -9249,7 +9253,6 @@ var VxeInputComponent = defineVxeComponent({
|
|
|
9249
9253
|
internalData,
|
|
9250
9254
|
getRefMaps: () => refMaps
|
|
9251
9255
|
};
|
|
9252
|
-
let inputMethods = {};
|
|
9253
9256
|
const parseDate = (value, format) => {
|
|
9254
9257
|
const { type } = props;
|
|
9255
9258
|
if (type === 'time') {
|
|
@@ -9710,8 +9713,9 @@ var VxeInputComponent = defineVxeComponent({
|
|
|
9710
9713
|
return minuteList;
|
|
9711
9714
|
});
|
|
9712
9715
|
const computeInputReadonly = computed(() => {
|
|
9713
|
-
const { type, editable, multiple
|
|
9714
|
-
|
|
9716
|
+
const { type, editable, multiple } = props;
|
|
9717
|
+
const formReadonly = computeFormReadonly.value;
|
|
9718
|
+
return formReadonly || multiple || !editable || type === 'week' || type === 'quarter';
|
|
9715
9719
|
});
|
|
9716
9720
|
const computeInputType = computed(() => {
|
|
9717
9721
|
const { type } = props;
|
|
@@ -9773,6 +9777,10 @@ var VxeInputComponent = defineVxeComponent({
|
|
|
9773
9777
|
}
|
|
9774
9778
|
return false;
|
|
9775
9779
|
});
|
|
9780
|
+
const computeDomValue = computed(() => {
|
|
9781
|
+
const { inputValue } = reactData;
|
|
9782
|
+
return inputValue;
|
|
9783
|
+
});
|
|
9776
9784
|
const getNumberValue = (val) => {
|
|
9777
9785
|
const { type, exponential } = props;
|
|
9778
9786
|
const inpMaxLength = computeInpMaxLength.value;
|
|
@@ -9783,12 +9791,22 @@ var VxeInputComponent = defineVxeComponent({
|
|
|
9783
9791
|
}
|
|
9784
9792
|
return restVal.slice(0, inpMaxLength);
|
|
9785
9793
|
};
|
|
9794
|
+
const dispatchEvent = (type, params, evnt) => {
|
|
9795
|
+
emit(type, createEvent(evnt, { $input: $xeInput }, params));
|
|
9796
|
+
};
|
|
9797
|
+
const updateDomValue = () => {
|
|
9798
|
+
const domValue = computeDomValue.value;
|
|
9799
|
+
const inputElem = refInputTarget.value;
|
|
9800
|
+
if (inputElem) {
|
|
9801
|
+
inputElem.value = XEUtils.eqNull(domValue) ? '' : ('' + domValue);
|
|
9802
|
+
}
|
|
9803
|
+
};
|
|
9786
9804
|
const emitModel = (value) => {
|
|
9787
9805
|
emit('update:modelValue', value);
|
|
9788
9806
|
};
|
|
9789
9807
|
const triggerEvent = (evnt) => {
|
|
9790
9808
|
const { inputValue } = reactData;
|
|
9791
|
-
|
|
9809
|
+
dispatchEvent(evnt.type, { value: inputValue }, evnt);
|
|
9792
9810
|
};
|
|
9793
9811
|
const handleChange = (value, evnt) => {
|
|
9794
9812
|
if (props.trim) {
|
|
@@ -9796,9 +9814,9 @@ var VxeInputComponent = defineVxeComponent({
|
|
|
9796
9814
|
}
|
|
9797
9815
|
reactData.inputValue = value;
|
|
9798
9816
|
emitModel(value);
|
|
9799
|
-
|
|
9817
|
+
dispatchEvent('input', { value }, evnt);
|
|
9800
9818
|
if (XEUtils.toValueString(props.modelValue) !== value) {
|
|
9801
|
-
|
|
9819
|
+
dispatchEvent('change', { value }, evnt);
|
|
9802
9820
|
if (!$xeSelect && !$xeTreeSelect) {
|
|
9803
9821
|
// 自动更新校验状态
|
|
9804
9822
|
if ($xeForm && formItemInfo) {
|
|
@@ -9816,7 +9834,7 @@ var VxeInputComponent = defineVxeComponent({
|
|
|
9816
9834
|
handleChange(value, evnt);
|
|
9817
9835
|
}
|
|
9818
9836
|
else {
|
|
9819
|
-
|
|
9837
|
+
dispatchEvent('input', { value }, evnt);
|
|
9820
9838
|
if (!$xeSelect && !$xeTreeSelect) {
|
|
9821
9839
|
// 自动更新校验状态
|
|
9822
9840
|
if ($xeForm && formItemInfo) {
|
|
@@ -9836,7 +9854,7 @@ var VxeInputComponent = defineVxeComponent({
|
|
|
9836
9854
|
if (!inpImmediate) {
|
|
9837
9855
|
triggerEvent(evnt);
|
|
9838
9856
|
}
|
|
9839
|
-
|
|
9857
|
+
dispatchEvent('lazy-change', { value: reactData.inputValue }, evnt);
|
|
9840
9858
|
};
|
|
9841
9859
|
const blurEvent = (evnt) => {
|
|
9842
9860
|
const { inputValue } = reactData;
|
|
@@ -9849,7 +9867,7 @@ var VxeInputComponent = defineVxeComponent({
|
|
|
9849
9867
|
if (!reactData.visiblePanel) {
|
|
9850
9868
|
reactData.isActivated = false;
|
|
9851
9869
|
}
|
|
9852
|
-
|
|
9870
|
+
dispatchEvent('blur', { value }, evnt);
|
|
9853
9871
|
if (!$xeSelect && !$xeTreeSelect) {
|
|
9854
9872
|
// 自动更新校验状态
|
|
9855
9873
|
if ($xeForm && formItemInfo) {
|
|
@@ -9874,7 +9892,7 @@ var VxeInputComponent = defineVxeComponent({
|
|
|
9874
9892
|
const isDisabled = computeIsDisabled.value;
|
|
9875
9893
|
if (!isDisabled) {
|
|
9876
9894
|
const { inputValue } = reactData;
|
|
9877
|
-
|
|
9895
|
+
dispatchEvent('prefix-click', { value: inputValue }, evnt);
|
|
9878
9896
|
}
|
|
9879
9897
|
};
|
|
9880
9898
|
const hidePanel = () => {
|
|
@@ -9899,14 +9917,14 @@ var VxeInputComponent = defineVxeComponent({
|
|
|
9899
9917
|
}
|
|
9900
9918
|
}
|
|
9901
9919
|
handleChange('', evnt);
|
|
9902
|
-
|
|
9903
|
-
|
|
9920
|
+
dispatchEvent('clear', { value }, evnt);
|
|
9921
|
+
dispatchEvent('lazy-change', { value }, evnt);
|
|
9904
9922
|
};
|
|
9905
9923
|
const clickSuffixEvent = (evnt) => {
|
|
9906
9924
|
const isDisabled = computeIsDisabled.value;
|
|
9907
9925
|
if (!isDisabled) {
|
|
9908
9926
|
const { inputValue } = reactData;
|
|
9909
|
-
|
|
9927
|
+
dispatchEvent('suffix-click', { value: inputValue }, evnt);
|
|
9910
9928
|
}
|
|
9911
9929
|
};
|
|
9912
9930
|
const dateParseValue = (value) => {
|
|
@@ -10139,12 +10157,12 @@ var VxeInputComponent = defineVxeComponent({
|
|
|
10139
10157
|
if (!isDisabled && !inputReadonly) {
|
|
10140
10158
|
reactData.showPwd = !showPwd;
|
|
10141
10159
|
}
|
|
10142
|
-
|
|
10160
|
+
dispatchEvent('toggle-visible', { visible: reactData.showPwd }, evnt);
|
|
10143
10161
|
};
|
|
10144
10162
|
// 密码
|
|
10145
10163
|
// 搜索
|
|
10146
10164
|
const searchEvent = (evnt) => {
|
|
10147
|
-
|
|
10165
|
+
dispatchEvent('search-click', {}, evnt);
|
|
10148
10166
|
};
|
|
10149
10167
|
// 搜索
|
|
10150
10168
|
// 数值
|
|
@@ -10174,7 +10192,7 @@ var VxeInputComponent = defineVxeComponent({
|
|
|
10174
10192
|
if (!isDisabled && !inputReadonly && !isDisabledSubtractNumber) {
|
|
10175
10193
|
numberChange(false, evnt);
|
|
10176
10194
|
}
|
|
10177
|
-
|
|
10195
|
+
dispatchEvent('next-number', { value: reactData.inputValue }, evnt);
|
|
10178
10196
|
};
|
|
10179
10197
|
const numberDownNextEvent = (evnt) => {
|
|
10180
10198
|
internalData.dnTimeout = setTimeout(() => {
|
|
@@ -10190,7 +10208,7 @@ var VxeInputComponent = defineVxeComponent({
|
|
|
10190
10208
|
if (!isDisabled && !inputReadonly && !isDisabledAddNumber) {
|
|
10191
10209
|
numberChange(true, evnt);
|
|
10192
10210
|
}
|
|
10193
|
-
|
|
10211
|
+
dispatchEvent('prev-number', { value: reactData.inputValue }, evnt);
|
|
10194
10212
|
};
|
|
10195
10213
|
const numberKeydownEvent = (evnt) => {
|
|
10196
10214
|
const isUpArrow = globalEvents.hasKey(evnt, GLOBAL_EVENT_KEYS.ARROW_UP);
|
|
@@ -10342,7 +10360,7 @@ var VxeInputComponent = defineVxeComponent({
|
|
|
10342
10360
|
}
|
|
10343
10361
|
}
|
|
10344
10362
|
reactData.selectMonth = viewDate;
|
|
10345
|
-
|
|
10363
|
+
dispatchEvent('date-prev', { viewType: datePanelType, viewDate, value, type }, evnt);
|
|
10346
10364
|
}
|
|
10347
10365
|
};
|
|
10348
10366
|
const dateTodayMonthEvent = (evnt) => {
|
|
@@ -10351,7 +10369,7 @@ var VxeInputComponent = defineVxeComponent({
|
|
|
10351
10369
|
dateChange(reactData.currentDate);
|
|
10352
10370
|
hidePanel();
|
|
10353
10371
|
}
|
|
10354
|
-
|
|
10372
|
+
dispatchEvent('date-today', { type: props.type }, evnt);
|
|
10355
10373
|
};
|
|
10356
10374
|
const dateNextEvent = (evnt) => {
|
|
10357
10375
|
const { type } = props;
|
|
@@ -10384,7 +10402,7 @@ var VxeInputComponent = defineVxeComponent({
|
|
|
10384
10402
|
}
|
|
10385
10403
|
}
|
|
10386
10404
|
reactData.selectMonth = viewDate;
|
|
10387
|
-
|
|
10405
|
+
dispatchEvent('date-next', { viewType: datePanelType, viewDate, value, type }, evnt);
|
|
10388
10406
|
}
|
|
10389
10407
|
};
|
|
10390
10408
|
const isDateDisabled = (item) => {
|
|
@@ -10934,6 +10952,31 @@ var VxeInputComponent = defineVxeComponent({
|
|
|
10934
10952
|
}
|
|
10935
10953
|
}
|
|
10936
10954
|
};
|
|
10955
|
+
const inputMethods = {
|
|
10956
|
+
dispatchEvent,
|
|
10957
|
+
focus() {
|
|
10958
|
+
const inputElem = refInputTarget.value;
|
|
10959
|
+
reactData.isActivated = true;
|
|
10960
|
+
inputElem.focus();
|
|
10961
|
+
return nextTick();
|
|
10962
|
+
},
|
|
10963
|
+
blur() {
|
|
10964
|
+
const inputElem = refInputTarget.value;
|
|
10965
|
+
inputElem.blur();
|
|
10966
|
+
reactData.isActivated = false;
|
|
10967
|
+
return nextTick();
|
|
10968
|
+
},
|
|
10969
|
+
select() {
|
|
10970
|
+
const inputElem = refInputTarget.value;
|
|
10971
|
+
inputElem.select();
|
|
10972
|
+
reactData.isActivated = false;
|
|
10973
|
+
return nextTick();
|
|
10974
|
+
},
|
|
10975
|
+
showPanel,
|
|
10976
|
+
hidePanel,
|
|
10977
|
+
updatePlacement
|
|
10978
|
+
};
|
|
10979
|
+
Object.assign($xeInput, inputMethods);
|
|
10937
10980
|
const renderDateLabel = (item, label) => {
|
|
10938
10981
|
const { festivalMethod } = props;
|
|
10939
10982
|
if (festivalMethod) {
|
|
@@ -11555,36 +11598,8 @@ var VxeInputComponent = defineVxeComponent({
|
|
|
11555
11598
|
}
|
|
11556
11599
|
return createCommentVNode();
|
|
11557
11600
|
};
|
|
11558
|
-
const dispatchEvent = (type, params, evnt) => {
|
|
11559
|
-
emit(type, createEvent(evnt, { $input: $xeInput }, params));
|
|
11560
|
-
};
|
|
11561
|
-
inputMethods = {
|
|
11562
|
-
dispatchEvent,
|
|
11563
|
-
focus() {
|
|
11564
|
-
const inputElem = refInputTarget.value;
|
|
11565
|
-
reactData.isActivated = true;
|
|
11566
|
-
inputElem.focus();
|
|
11567
|
-
return nextTick();
|
|
11568
|
-
},
|
|
11569
|
-
blur() {
|
|
11570
|
-
const inputElem = refInputTarget.value;
|
|
11571
|
-
inputElem.blur();
|
|
11572
|
-
reactData.isActivated = false;
|
|
11573
|
-
return nextTick();
|
|
11574
|
-
},
|
|
11575
|
-
select() {
|
|
11576
|
-
const inputElem = refInputTarget.value;
|
|
11577
|
-
inputElem.select();
|
|
11578
|
-
reactData.isActivated = false;
|
|
11579
|
-
return nextTick();
|
|
11580
|
-
},
|
|
11581
|
-
showPanel,
|
|
11582
|
-
hidePanel,
|
|
11583
|
-
updatePlacement
|
|
11584
|
-
};
|
|
11585
|
-
Object.assign($xeInput, inputMethods);
|
|
11586
11601
|
const renderVN = () => {
|
|
11587
|
-
const { className, controls, type, title, align, showWordCount, countMethod, name, autoComplete, autocomplete } = props;
|
|
11602
|
+
const { className, inputClassName, controls, type, title, align, showWordCount, countMethod, name, autoComplete, autocomplete } = props;
|
|
11588
11603
|
const { inputValue, visiblePanel, isActivated } = reactData;
|
|
11589
11604
|
const vSize = computeSize.value;
|
|
11590
11605
|
const isDisabled = computeIsDisabled.value;
|
|
@@ -11628,8 +11643,7 @@ var VxeInputComponent = defineVxeComponent({
|
|
|
11628
11643
|
}, [
|
|
11629
11644
|
h('input', {
|
|
11630
11645
|
ref: refInputTarget,
|
|
11631
|
-
class: 'vxe-input--inner',
|
|
11632
|
-
value: inputValue,
|
|
11646
|
+
class: 'vxe-input--inner' + (inputClassName ? (' ' + inputClassName) : ''),
|
|
11633
11647
|
name,
|
|
11634
11648
|
type: inputType,
|
|
11635
11649
|
placeholder: inpPlaceholder,
|
|
@@ -11683,6 +11697,19 @@ var VxeInputComponent = defineVxeComponent({
|
|
|
11683
11697
|
reactData.inputValue = props.multiple ? computeDateMultipleLabel.value : reactData.datePanelLabel;
|
|
11684
11698
|
}
|
|
11685
11699
|
});
|
|
11700
|
+
const rDvFlag = ref(0);
|
|
11701
|
+
watch(computeFormReadonly, () => {
|
|
11702
|
+
rDvFlag.value++;
|
|
11703
|
+
});
|
|
11704
|
+
watch(computeDomValue, () => {
|
|
11705
|
+
rDvFlag.value++;
|
|
11706
|
+
});
|
|
11707
|
+
watch(rDvFlag, () => {
|
|
11708
|
+
updateDomValue();
|
|
11709
|
+
nextTick(() => {
|
|
11710
|
+
updateDomValue();
|
|
11711
|
+
});
|
|
11712
|
+
});
|
|
11686
11713
|
onMounted(() => {
|
|
11687
11714
|
const { type } = props;
|
|
11688
11715
|
if (['date', 'time', 'datetime', 'week', 'month', 'quarter', 'year'].includes(type)) {
|
|
@@ -11702,6 +11729,7 @@ var VxeInputComponent = defineVxeComponent({
|
|
|
11702
11729
|
globalEvents.on($xeInput, 'mousedown', handleGlobalMousedownEvent);
|
|
11703
11730
|
globalEvents.on($xeInput, 'keydown', handleGlobalKeydownEvent);
|
|
11704
11731
|
globalEvents.on($xeInput, 'blur', handleGlobalBlurEvent);
|
|
11732
|
+
updateDomValue();
|
|
11705
11733
|
});
|
|
11706
11734
|
onBeforeUnmount(() => {
|
|
11707
11735
|
numberStopDown();
|
|
@@ -15157,6 +15185,10 @@ var VxeNumberInputComponent = defineVxeComponent({
|
|
|
15157
15185
|
align: String,
|
|
15158
15186
|
form: String,
|
|
15159
15187
|
className: String,
|
|
15188
|
+
inputClassName: {
|
|
15189
|
+
type: String,
|
|
15190
|
+
default: () => getConfig$3().numberInput.inputClassName
|
|
15191
|
+
},
|
|
15160
15192
|
size: {
|
|
15161
15193
|
type: String,
|
|
15162
15194
|
default: () => getConfig$3().numberInput.size || getConfig$3().size
|
|
@@ -15408,6 +15440,10 @@ var VxeNumberInputComponent = defineVxeComponent({
|
|
|
15408
15440
|
}
|
|
15409
15441
|
return false;
|
|
15410
15442
|
});
|
|
15443
|
+
const computeInpClassNamevalue = computed(() => {
|
|
15444
|
+
const { inputClassName } = props;
|
|
15445
|
+
return 'vxe-number-input--input' + (inputClassName ? (' ' + inputClassName) : '');
|
|
15446
|
+
});
|
|
15411
15447
|
const refMaps = {
|
|
15412
15448
|
refElem,
|
|
15413
15449
|
refInput: refInputTarget
|
|
@@ -15424,7 +15460,9 @@ var VxeNumberInputComponent = defineVxeComponent({
|
|
|
15424
15460
|
getRefMaps: () => refMaps,
|
|
15425
15461
|
getComputeMaps: () => computeMaps
|
|
15426
15462
|
};
|
|
15427
|
-
|
|
15463
|
+
const dispatchEvent = (type, params, evnt) => {
|
|
15464
|
+
emit(type, createEvent(evnt, { $numberInput: $xeNumberInput }, params));
|
|
15465
|
+
};
|
|
15428
15466
|
const handleNumberString = (val) => {
|
|
15429
15467
|
if (XEUtils.eqNull(val)) {
|
|
15430
15468
|
return '';
|
|
@@ -15453,7 +15491,7 @@ var VxeNumberInputComponent = defineVxeComponent({
|
|
|
15453
15491
|
};
|
|
15454
15492
|
const triggerEvent = (evnt) => {
|
|
15455
15493
|
const { inputValue } = reactData;
|
|
15456
|
-
|
|
15494
|
+
dispatchEvent(evnt.type, { value: inputValue }, evnt);
|
|
15457
15495
|
};
|
|
15458
15496
|
const handleChange = (val, inputValue, evnt) => {
|
|
15459
15497
|
const value = eqEmptyValue(val) ? null : Number(val);
|
|
@@ -15467,9 +15505,9 @@ var VxeNumberInputComponent = defineVxeComponent({
|
|
|
15467
15505
|
reactData.inputValue = inputValue || '';
|
|
15468
15506
|
});
|
|
15469
15507
|
}
|
|
15470
|
-
|
|
15508
|
+
dispatchEvent('input', { value }, evnt);
|
|
15471
15509
|
if (isChange) {
|
|
15472
|
-
|
|
15510
|
+
dispatchEvent('change', { value }, evnt);
|
|
15473
15511
|
// 自动更新校验状态
|
|
15474
15512
|
if ($xeForm && formItemInfo) {
|
|
15475
15513
|
$xeForm.triggerItemEvent(evnt, formItemInfo.itemConfig.field, value);
|
|
@@ -15484,7 +15522,7 @@ var VxeNumberInputComponent = defineVxeComponent({
|
|
|
15484
15522
|
handleChange(value, inputValue, evnt);
|
|
15485
15523
|
}
|
|
15486
15524
|
else {
|
|
15487
|
-
|
|
15525
|
+
dispatchEvent('input', { value }, evnt);
|
|
15488
15526
|
// 自动更新校验状态
|
|
15489
15527
|
if ($xeForm && formItemInfo) {
|
|
15490
15528
|
$xeForm.triggerItemEvent(evnt, formItemInfo.itemConfig.field, value);
|
|
@@ -15501,7 +15539,7 @@ var VxeNumberInputComponent = defineVxeComponent({
|
|
|
15501
15539
|
if (!inpImmediate) {
|
|
15502
15540
|
triggerEvent(evnt);
|
|
15503
15541
|
}
|
|
15504
|
-
|
|
15542
|
+
dispatchEvent('lazy-change', { value: reactData.inputValue }, evnt);
|
|
15505
15543
|
};
|
|
15506
15544
|
const focusEvent = (evnt) => {
|
|
15507
15545
|
const inputReadonly = computeInputReadonly.value;
|
|
@@ -15517,20 +15555,20 @@ var VxeNumberInputComponent = defineVxeComponent({
|
|
|
15517
15555
|
const isDisabled = computeIsDisabled.value;
|
|
15518
15556
|
if (!isDisabled) {
|
|
15519
15557
|
const { inputValue } = reactData;
|
|
15520
|
-
|
|
15558
|
+
dispatchEvent('prefix-click', { value: inputValue }, evnt);
|
|
15521
15559
|
}
|
|
15522
15560
|
};
|
|
15523
15561
|
const clearValueEvent = (evnt, value) => {
|
|
15524
15562
|
focus();
|
|
15525
15563
|
handleChange(null, '', evnt);
|
|
15526
|
-
|
|
15527
|
-
|
|
15564
|
+
dispatchEvent('clear', { value }, evnt);
|
|
15565
|
+
dispatchEvent('lazy-change', { value }, evnt);
|
|
15528
15566
|
};
|
|
15529
15567
|
const clickSuffixEvent = (evnt) => {
|
|
15530
15568
|
const isDisabled = computeIsDisabled.value;
|
|
15531
15569
|
if (!isDisabled) {
|
|
15532
15570
|
const { inputValue } = reactData;
|
|
15533
|
-
|
|
15571
|
+
dispatchEvent('suffix-click', { value: inputValue }, evnt);
|
|
15534
15572
|
}
|
|
15535
15573
|
};
|
|
15536
15574
|
const updateModel = (val) => {
|
|
@@ -15632,7 +15670,7 @@ var VxeNumberInputComponent = defineVxeComponent({
|
|
|
15632
15670
|
afterCheckValue();
|
|
15633
15671
|
reactData.isFocus = false;
|
|
15634
15672
|
reactData.isActivated = false;
|
|
15635
|
-
|
|
15673
|
+
dispatchEvent('blur', { value }, evnt);
|
|
15636
15674
|
// 自动更新校验状态
|
|
15637
15675
|
if ($xeForm && formItemInfo) {
|
|
15638
15676
|
$xeForm.triggerItemEvent(evnt, formItemInfo.itemConfig.field, value);
|
|
@@ -15665,10 +15703,10 @@ var VxeNumberInputComponent = defineVxeComponent({
|
|
|
15665
15703
|
numberChange(true, evnt);
|
|
15666
15704
|
}
|
|
15667
15705
|
reactData.isActivated = true;
|
|
15668
|
-
|
|
15669
|
-
|
|
15706
|
+
dispatchEvent('plus-number', { value: reactData.inputValue }, evnt);
|
|
15707
|
+
dispatchEvent('lazy-change', { value: reactData.inputValue }, evnt);
|
|
15670
15708
|
// 已废弃
|
|
15671
|
-
|
|
15709
|
+
dispatchEvent('next-number', { value: reactData.inputValue }, evnt);
|
|
15672
15710
|
};
|
|
15673
15711
|
const numberMinusEvent = (evnt) => {
|
|
15674
15712
|
const isDisabled = computeIsDisabled.value;
|
|
@@ -15678,10 +15716,10 @@ var VxeNumberInputComponent = defineVxeComponent({
|
|
|
15678
15716
|
numberChange(false, evnt);
|
|
15679
15717
|
}
|
|
15680
15718
|
reactData.isActivated = true;
|
|
15681
|
-
|
|
15682
|
-
|
|
15719
|
+
dispatchEvent('minus-number', { value: reactData.inputValue }, evnt);
|
|
15720
|
+
dispatchEvent('lazy-change', { value: reactData.inputValue }, evnt);
|
|
15683
15721
|
// 已废弃
|
|
15684
|
-
|
|
15722
|
+
dispatchEvent('prev-number', { value: reactData.inputValue }, evnt);
|
|
15685
15723
|
};
|
|
15686
15724
|
const numberKeydownEvent = (evnt) => {
|
|
15687
15725
|
const isUpArrow = globalEvents.hasKey(evnt, GLOBAL_EVENT_KEYS.ARROW_UP);
|
|
@@ -15868,10 +15906,7 @@ var VxeNumberInputComponent = defineVxeComponent({
|
|
|
15868
15906
|
afterCheckValue();
|
|
15869
15907
|
}
|
|
15870
15908
|
};
|
|
15871
|
-
const
|
|
15872
|
-
emit(type, createEvent(evnt, { $numberInput: $xeNumberInput }, params));
|
|
15873
|
-
};
|
|
15874
|
-
numberInputMethods = {
|
|
15909
|
+
const numberInputMethods = {
|
|
15875
15910
|
dispatchEvent,
|
|
15876
15911
|
focus() {
|
|
15877
15912
|
const inputReadonly = computeInputReadonly.value;
|
|
@@ -15979,6 +16014,7 @@ var VxeNumberInputComponent = defineVxeComponent({
|
|
|
15979
16014
|
const inputReadonly = computeInputReadonly.value;
|
|
15980
16015
|
const inpMaxLength = computeInpMaxLength.value;
|
|
15981
16016
|
const inpPlaceholder = computeInpPlaceholder.value;
|
|
16017
|
+
const inpClassName = computeInpClassNamevalue.value;
|
|
15982
16018
|
return h('div', {
|
|
15983
16019
|
key: 'ni',
|
|
15984
16020
|
class: 'vxe-number-input--input-wrapper'
|
|
@@ -15989,10 +16025,10 @@ var VxeNumberInputComponent = defineVxeComponent({
|
|
|
15989
16025
|
}, [
|
|
15990
16026
|
h('input', {
|
|
15991
16027
|
ref: refInputTarget,
|
|
15992
|
-
class:
|
|
15993
|
-
value: !isFocus && type === 'amount' ? numLabel : inputValue,
|
|
16028
|
+
class: inpClassName,
|
|
15994
16029
|
name,
|
|
15995
16030
|
type: 'text',
|
|
16031
|
+
value: !isFocus && type === 'amount' ? numLabel : inputValue,
|
|
15996
16032
|
placeholder: inpPlaceholder,
|
|
15997
16033
|
maxlength: inpMaxLength,
|
|
15998
16034
|
readonly: inputReadonly,
|
|
@@ -20214,6 +20250,10 @@ var VxeDatePickerComponent = defineVxeComponent({
|
|
|
20214
20250
|
},
|
|
20215
20251
|
form: String,
|
|
20216
20252
|
className: String,
|
|
20253
|
+
inputClassName: {
|
|
20254
|
+
type: String,
|
|
20255
|
+
default: () => getConfig$3().datePicker.inputClassName
|
|
20256
|
+
},
|
|
20217
20257
|
zIndex: Number,
|
|
20218
20258
|
size: {
|
|
20219
20259
|
type: String,
|
|
@@ -21662,7 +21702,7 @@ var VxeDatePickerComponent = defineVxeComponent({
|
|
|
21662
21702
|
]);
|
|
21663
21703
|
};
|
|
21664
21704
|
const renderVN = () => {
|
|
21665
|
-
const { className, type, name, autoComplete } = props;
|
|
21705
|
+
const { className, inputClassName, type, name, autoComplete } = props;
|
|
21666
21706
|
const { inputValue, visiblePanel, isActivated, labelFlag } = reactData;
|
|
21667
21707
|
const { inputLabel } = internalData;
|
|
21668
21708
|
const vSize = computeSize.value;
|
|
@@ -21699,7 +21739,7 @@ var VxeDatePickerComponent = defineVxeComponent({
|
|
|
21699
21739
|
}, [
|
|
21700
21740
|
h('input', {
|
|
21701
21741
|
ref: refInputTarget,
|
|
21702
|
-
class: 'vxe-date-picker--inner',
|
|
21742
|
+
class: 'vxe-date-picker--inner' + (inputClassName ? (' ' + inputClassName) : ''),
|
|
21703
21743
|
value: labelFlag ? inputLabel : '',
|
|
21704
21744
|
name,
|
|
21705
21745
|
type: 'text',
|
|
@@ -21833,6 +21873,10 @@ var VxeDateRangePickerComponent = defineVxeComponent({
|
|
|
21833
21873
|
},
|
|
21834
21874
|
form: String,
|
|
21835
21875
|
className: String,
|
|
21876
|
+
inputClassName: {
|
|
21877
|
+
type: String,
|
|
21878
|
+
default: () => getConfig$3().dateRangePicker.inputClassName
|
|
21879
|
+
},
|
|
21836
21880
|
zIndex: Number,
|
|
21837
21881
|
size: {
|
|
21838
21882
|
type: String,
|
|
@@ -23178,7 +23222,7 @@ var VxeDateRangePickerComponent = defineVxeComponent({
|
|
|
23178
23222
|
]);
|
|
23179
23223
|
};
|
|
23180
23224
|
const renderVN = () => {
|
|
23181
|
-
const { className, type, name, autoComplete } = props;
|
|
23225
|
+
const { className, inputClassName, type, name, autoComplete } = props;
|
|
23182
23226
|
const { selectStValue, selectEdValue, visiblePanel, isActivated } = reactData;
|
|
23183
23227
|
const vSize = computeSize.value;
|
|
23184
23228
|
const isDisabled = computeIsDisabled.value;
|
|
@@ -23213,7 +23257,7 @@ var VxeDateRangePickerComponent = defineVxeComponent({
|
|
|
23213
23257
|
}, [
|
|
23214
23258
|
h('input', {
|
|
23215
23259
|
ref: refInputTarget,
|
|
23216
|
-
class: 'vxe-date-range-picker--inner',
|
|
23260
|
+
class: 'vxe-date-range-picker--inner' + (inputClassName ? (' ' + inputClassName) : ''),
|
|
23217
23261
|
value: inputLabel,
|
|
23218
23262
|
name,
|
|
23219
23263
|
type: 'text',
|
|
@@ -33801,6 +33845,10 @@ var VxePasswordInputComponent = defineVxeComponent({
|
|
|
33801
33845
|
default: 'off'
|
|
33802
33846
|
},
|
|
33803
33847
|
className: String,
|
|
33848
|
+
inputClassName: {
|
|
33849
|
+
type: String,
|
|
33850
|
+
default: () => getConfig$3().passwordInput.inputClassName
|
|
33851
|
+
},
|
|
33804
33852
|
size: {
|
|
33805
33853
|
type: String,
|
|
33806
33854
|
default: () => getConfig$3().passwordInput.size || getConfig$3().size
|
|
@@ -33811,6 +33859,10 @@ var VxePasswordInputComponent = defineVxeComponent({
|
|
|
33811
33859
|
type: Boolean,
|
|
33812
33860
|
default: () => getConfig$3().passwordInput.controls
|
|
33813
33861
|
},
|
|
33862
|
+
editable: {
|
|
33863
|
+
type: Boolean,
|
|
33864
|
+
default: true
|
|
33865
|
+
},
|
|
33814
33866
|
// 已废弃
|
|
33815
33867
|
autocomplete: String
|
|
33816
33868
|
},
|
|
@@ -33851,14 +33903,9 @@ var VxePasswordInputComponent = defineVxeComponent({
|
|
|
33851
33903
|
reactData,
|
|
33852
33904
|
getRefMaps: () => refMaps
|
|
33853
33905
|
};
|
|
33854
|
-
let passwordInputMethods = {};
|
|
33855
33906
|
const computeIsClearable = computed(() => {
|
|
33856
33907
|
return props.clearable;
|
|
33857
33908
|
});
|
|
33858
|
-
const computeInpReadonly = computed(() => {
|
|
33859
|
-
const { readonly } = props;
|
|
33860
|
-
return readonly;
|
|
33861
|
-
});
|
|
33862
33909
|
const computeInpPlaceholder = computed(() => {
|
|
33863
33910
|
const { placeholder } = props;
|
|
33864
33911
|
if (placeholder) {
|
|
@@ -33870,6 +33917,32 @@ var VxePasswordInputComponent = defineVxeComponent({
|
|
|
33870
33917
|
}
|
|
33871
33918
|
return getI18n$2('vxe.base.pleaseInput');
|
|
33872
33919
|
});
|
|
33920
|
+
const computeFormReadonly = computed(() => {
|
|
33921
|
+
if (getConfig$3().inputReadonly === 'obsolete') {
|
|
33922
|
+
if ($xeForm) {
|
|
33923
|
+
return $xeForm.props.readonly;
|
|
33924
|
+
}
|
|
33925
|
+
return false;
|
|
33926
|
+
}
|
|
33927
|
+
const { readonly } = props;
|
|
33928
|
+
if (readonly === null) {
|
|
33929
|
+
if ($xeForm) {
|
|
33930
|
+
return $xeForm.props.readonly;
|
|
33931
|
+
}
|
|
33932
|
+
return false;
|
|
33933
|
+
}
|
|
33934
|
+
return readonly;
|
|
33935
|
+
});
|
|
33936
|
+
const computeIsDisabled = computed(() => {
|
|
33937
|
+
const { disabled } = props;
|
|
33938
|
+
if (disabled === null) {
|
|
33939
|
+
if ($xeForm) {
|
|
33940
|
+
return $xeForm.props.disabled;
|
|
33941
|
+
}
|
|
33942
|
+
return false;
|
|
33943
|
+
}
|
|
33944
|
+
return disabled;
|
|
33945
|
+
});
|
|
33873
33946
|
const computeInputType = computed(() => {
|
|
33874
33947
|
const { showPwd } = reactData;
|
|
33875
33948
|
if (showPwd) {
|
|
@@ -33881,9 +33954,28 @@ var VxePasswordInputComponent = defineVxeComponent({
|
|
|
33881
33954
|
const { immediate } = props;
|
|
33882
33955
|
return immediate;
|
|
33883
33956
|
});
|
|
33957
|
+
const computeInputReadonly = computed(() => {
|
|
33958
|
+
const { editable } = props;
|
|
33959
|
+
const formReadonly = computeFormReadonly.value;
|
|
33960
|
+
return formReadonly || !editable;
|
|
33961
|
+
});
|
|
33962
|
+
const computeDomValue = computed(() => {
|
|
33963
|
+
const { inputValue } = reactData;
|
|
33964
|
+
return inputValue;
|
|
33965
|
+
});
|
|
33966
|
+
const dispatchEvent = (type, params, evnt) => {
|
|
33967
|
+
emit(type, createEvent(evnt, { $passwordInput: $xePasswordInput }, params));
|
|
33968
|
+
};
|
|
33969
|
+
const updateDomValue = () => {
|
|
33970
|
+
const domValue = computeDomValue.value;
|
|
33971
|
+
const inputElem = refInputTarget.value;
|
|
33972
|
+
if (inputElem) {
|
|
33973
|
+
inputElem.value = XEUtils.eqNull(domValue) ? '' : ('' + domValue);
|
|
33974
|
+
}
|
|
33975
|
+
};
|
|
33884
33976
|
const triggerEvent = (evnt) => {
|
|
33885
33977
|
const { inputValue } = reactData;
|
|
33886
|
-
|
|
33978
|
+
dispatchEvent(evnt.type, { value: inputValue }, evnt);
|
|
33887
33979
|
};
|
|
33888
33980
|
const emitInputEvent = (value, evnt) => {
|
|
33889
33981
|
const inpImmediate = computeInpImmediate.value;
|
|
@@ -33892,7 +33984,7 @@ var VxePasswordInputComponent = defineVxeComponent({
|
|
|
33892
33984
|
handleChange(value, evnt);
|
|
33893
33985
|
}
|
|
33894
33986
|
else {
|
|
33895
|
-
|
|
33987
|
+
dispatchEvent('input', { value }, evnt);
|
|
33896
33988
|
}
|
|
33897
33989
|
};
|
|
33898
33990
|
const inputEvent = (evnt) => {
|
|
@@ -33903,9 +33995,9 @@ var VxePasswordInputComponent = defineVxeComponent({
|
|
|
33903
33995
|
const handleChange = (value, evnt) => {
|
|
33904
33996
|
reactData.inputValue = value;
|
|
33905
33997
|
emit('update:modelValue', value);
|
|
33906
|
-
|
|
33998
|
+
dispatchEvent('input', { value }, evnt);
|
|
33907
33999
|
if (XEUtils.toValueString(props.modelValue) !== value) {
|
|
33908
|
-
|
|
34000
|
+
dispatchEvent('change', { value }, evnt);
|
|
33909
34001
|
// 自动更新校验状态
|
|
33910
34002
|
if ($xeForm && formItemInfo) {
|
|
33911
34003
|
$xeForm.triggerItemEvent(evnt, formItemInfo.itemConfig.field, value);
|
|
@@ -33914,7 +34006,7 @@ var VxePasswordInputComponent = defineVxeComponent({
|
|
|
33914
34006
|
};
|
|
33915
34007
|
const changeEvent = (evnt) => {
|
|
33916
34008
|
triggerEvent(evnt);
|
|
33917
|
-
|
|
34009
|
+
dispatchEvent('lazy-change', { value: reactData.inputValue }, evnt);
|
|
33918
34010
|
// 自动更新校验状态
|
|
33919
34011
|
if ($xeForm && formItemInfo) {
|
|
33920
34012
|
$xeForm.triggerItemEvent(evnt, formItemInfo.itemConfig.field, reactData.inputValue);
|
|
@@ -33928,19 +34020,20 @@ var VxePasswordInputComponent = defineVxeComponent({
|
|
|
33928
34020
|
const { inputValue } = reactData;
|
|
33929
34021
|
const value = inputValue;
|
|
33930
34022
|
reactData.isActivated = false;
|
|
33931
|
-
|
|
34023
|
+
dispatchEvent('blur', { value }, evnt);
|
|
33932
34024
|
// 自动更新校验状态
|
|
33933
34025
|
if ($xeForm && formItemInfo) {
|
|
33934
34026
|
$xeForm.triggerItemEvent(evnt, formItemInfo.itemConfig.field, value);
|
|
33935
34027
|
}
|
|
33936
34028
|
};
|
|
33937
34029
|
const passwordToggleEvent = (evnt) => {
|
|
33938
|
-
const { readonly, disabled } = props;
|
|
33939
34030
|
const { showPwd } = reactData;
|
|
33940
|
-
|
|
34031
|
+
const isDisabled = computeIsDisabled.value;
|
|
34032
|
+
const formReadonly = computeFormReadonly.value;
|
|
34033
|
+
if (!isDisabled && !formReadonly) {
|
|
33941
34034
|
reactData.showPwd = !showPwd;
|
|
33942
34035
|
}
|
|
33943
|
-
|
|
34036
|
+
dispatchEvent('toggle-visible', { visible: reactData.showPwd }, evnt);
|
|
33944
34037
|
};
|
|
33945
34038
|
const clickEvent = (evnt) => {
|
|
33946
34039
|
triggerEvent(evnt);
|
|
@@ -33948,23 +34041,45 @@ var VxePasswordInputComponent = defineVxeComponent({
|
|
|
33948
34041
|
const clearValueEvent = (evnt, value) => {
|
|
33949
34042
|
focus();
|
|
33950
34043
|
handleChange('', evnt);
|
|
33951
|
-
|
|
33952
|
-
|
|
34044
|
+
dispatchEvent('clear', { value }, evnt);
|
|
34045
|
+
dispatchEvent('lazy-change', { value: reactData.inputValue }, evnt);
|
|
33953
34046
|
};
|
|
33954
34047
|
const clickSuffixEvent = (evnt) => {
|
|
33955
|
-
const
|
|
33956
|
-
if (!
|
|
34048
|
+
const isDisabled = computeIsDisabled.value;
|
|
34049
|
+
if (!isDisabled) {
|
|
33957
34050
|
const { inputValue } = reactData;
|
|
33958
|
-
|
|
34051
|
+
dispatchEvent('suffix-click', { value: inputValue }, evnt);
|
|
33959
34052
|
}
|
|
33960
34053
|
};
|
|
33961
34054
|
const clickPrefixEvent = (evnt) => {
|
|
33962
|
-
const
|
|
33963
|
-
if (!
|
|
34055
|
+
const isDisabled = computeIsDisabled.value;
|
|
34056
|
+
if (!isDisabled) {
|
|
33964
34057
|
const { inputValue } = reactData;
|
|
33965
|
-
|
|
34058
|
+
dispatchEvent('prefix-click', { value: inputValue }, evnt);
|
|
34059
|
+
}
|
|
34060
|
+
};
|
|
34061
|
+
const passwordInputMethods = {
|
|
34062
|
+
dispatchEvent,
|
|
34063
|
+
focus() {
|
|
34064
|
+
const inputElem = refInputTarget.value;
|
|
34065
|
+
reactData.isActivated = true;
|
|
34066
|
+
inputElem.focus();
|
|
34067
|
+
return nextTick();
|
|
34068
|
+
},
|
|
34069
|
+
blur() {
|
|
34070
|
+
const inputElem = refInputTarget.value;
|
|
34071
|
+
inputElem.blur();
|
|
34072
|
+
reactData.isActivated = false;
|
|
34073
|
+
return nextTick();
|
|
34074
|
+
},
|
|
34075
|
+
select() {
|
|
34076
|
+
const inputElem = refInputTarget.value;
|
|
34077
|
+
inputElem.select();
|
|
34078
|
+
reactData.isActivated = false;
|
|
34079
|
+
return nextTick();
|
|
33966
34080
|
}
|
|
33967
34081
|
};
|
|
34082
|
+
Object.assign($xePasswordInput, passwordInputMethods);
|
|
33968
34083
|
const renderPasswordIcon = () => {
|
|
33969
34084
|
const { showPwd } = reactData;
|
|
33970
34085
|
return h('div', {
|
|
@@ -33997,14 +34112,15 @@ var VxePasswordInputComponent = defineVxeComponent({
|
|
|
33997
34112
|
: null;
|
|
33998
34113
|
};
|
|
33999
34114
|
const renderSuffixIcon = () => {
|
|
34000
|
-
const {
|
|
34115
|
+
const { suffixIcon, controls } = props;
|
|
34001
34116
|
const { inputValue } = reactData;
|
|
34002
|
-
const
|
|
34117
|
+
const isDisabled = computeIsDisabled.value;
|
|
34003
34118
|
const isClearable = computeIsClearable.value;
|
|
34119
|
+
const suffixSlot = slots.suffix;
|
|
34004
34120
|
return isClearable || controls || suffixSlot || suffixIcon
|
|
34005
34121
|
? h('div', {
|
|
34006
34122
|
class: ['vxe-password-input--suffix', {
|
|
34007
|
-
'is--clear': isClearable && !
|
|
34123
|
+
'is--clear': isClearable && !isDisabled && !(inputValue === '' || XEUtils.eqNull(inputValue))
|
|
34008
34124
|
}]
|
|
34009
34125
|
}, [
|
|
34010
34126
|
isClearable
|
|
@@ -34033,41 +34149,22 @@ var VxePasswordInputComponent = defineVxeComponent({
|
|
|
34033
34149
|
])
|
|
34034
34150
|
: null;
|
|
34035
34151
|
};
|
|
34036
|
-
passwordInputMethods = {
|
|
34037
|
-
dispatchEvent(type, params, evnt) {
|
|
34038
|
-
emit(type, createEvent(evnt, { $passwordInput: $xePasswordInput }, params));
|
|
34039
|
-
},
|
|
34040
|
-
focus() {
|
|
34041
|
-
const inputElem = refInputTarget.value;
|
|
34042
|
-
reactData.isActivated = true;
|
|
34043
|
-
inputElem.focus();
|
|
34044
|
-
return nextTick();
|
|
34045
|
-
},
|
|
34046
|
-
blur() {
|
|
34047
|
-
const inputElem = refInputTarget.value;
|
|
34048
|
-
inputElem.blur();
|
|
34049
|
-
reactData.isActivated = false;
|
|
34050
|
-
return nextTick();
|
|
34051
|
-
},
|
|
34052
|
-
select() {
|
|
34053
|
-
const inputElem = refInputTarget.value;
|
|
34054
|
-
inputElem.select();
|
|
34055
|
-
reactData.isActivated = false;
|
|
34056
|
-
return nextTick();
|
|
34057
|
-
}
|
|
34058
|
-
};
|
|
34059
|
-
Object.assign($xePasswordInput, passwordInputMethods);
|
|
34060
|
-
watch(() => props.modelValue, (val) => {
|
|
34061
|
-
reactData.inputValue = val;
|
|
34062
|
-
});
|
|
34063
34152
|
const renderVN = () => {
|
|
34064
|
-
const { className,
|
|
34153
|
+
const { className, inputClassName, name, readonly, autocomplete, autoComplete, maxLength } = props;
|
|
34065
34154
|
const { inputValue, isActivated } = reactData;
|
|
34155
|
+
const isDisabled = computeIsDisabled.value;
|
|
34156
|
+
const formReadonly = computeFormReadonly.value;
|
|
34157
|
+
if (formReadonly) {
|
|
34158
|
+
return h('div', {
|
|
34159
|
+
ref: refElem,
|
|
34160
|
+
class: ['vxe-password-input--readonly', className]
|
|
34161
|
+
}, getText(inputValue));
|
|
34162
|
+
}
|
|
34066
34163
|
const vSize = computeSize.value;
|
|
34067
|
-
const inpReadonly = computeInpReadonly.value;
|
|
34068
34164
|
const inputType = computeInputType.value;
|
|
34069
34165
|
const inpPlaceholder = computeInpPlaceholder.value;
|
|
34070
34166
|
const isClearable = computeIsClearable.value;
|
|
34167
|
+
const inputReadonly = computeInputReadonly.value;
|
|
34071
34168
|
const prefix = renderPrefixIcon();
|
|
34072
34169
|
const suffix = renderSuffixIcon();
|
|
34073
34170
|
return h('div', {
|
|
@@ -34077,9 +34174,9 @@ var VxePasswordInputComponent = defineVxeComponent({
|
|
|
34077
34174
|
'is--prefix': !!prefix,
|
|
34078
34175
|
'is--suffix': !!suffix,
|
|
34079
34176
|
'is--readonly': readonly,
|
|
34080
|
-
'is--disabled':
|
|
34177
|
+
'is--disabled': isDisabled,
|
|
34081
34178
|
'is--active': isActivated,
|
|
34082
|
-
'show--clear': isClearable && !
|
|
34179
|
+
'show--clear': isClearable && !isDisabled && !(inputValue === '' || XEUtils.eqNull(inputValue))
|
|
34083
34180
|
}],
|
|
34084
34181
|
spellcheck: false
|
|
34085
34182
|
}, [
|
|
@@ -34089,13 +34186,12 @@ var VxePasswordInputComponent = defineVxeComponent({
|
|
|
34089
34186
|
}, [
|
|
34090
34187
|
h('input', {
|
|
34091
34188
|
ref: refInputTarget,
|
|
34092
|
-
class: 'vxe-password-input--inner',
|
|
34093
|
-
value: inputValue,
|
|
34189
|
+
class: 'vxe-password-input--inner' + (inputClassName ? (' ' + inputClassName) : ''),
|
|
34094
34190
|
name,
|
|
34095
34191
|
type: inputType,
|
|
34096
34192
|
placeholder: inpPlaceholder,
|
|
34097
|
-
readonly:
|
|
34098
|
-
disabled,
|
|
34193
|
+
readonly: inputReadonly,
|
|
34194
|
+
disabled: isDisabled,
|
|
34099
34195
|
autocomplete: autocomplete || autoComplete,
|
|
34100
34196
|
maxlength: maxLength,
|
|
34101
34197
|
onClick: clickEvent,
|
|
@@ -34108,6 +34204,25 @@ var VxePasswordInputComponent = defineVxeComponent({
|
|
|
34108
34204
|
suffix || renderEmptyElement($xePasswordInput)
|
|
34109
34205
|
]);
|
|
34110
34206
|
};
|
|
34207
|
+
watch(() => props.modelValue, (val) => {
|
|
34208
|
+
reactData.inputValue = val;
|
|
34209
|
+
});
|
|
34210
|
+
const rDvFlag = ref(0);
|
|
34211
|
+
watch(computeFormReadonly, () => {
|
|
34212
|
+
rDvFlag.value++;
|
|
34213
|
+
});
|
|
34214
|
+
watch(computeDomValue, () => {
|
|
34215
|
+
rDvFlag.value++;
|
|
34216
|
+
});
|
|
34217
|
+
watch(rDvFlag, () => {
|
|
34218
|
+
updateDomValue();
|
|
34219
|
+
nextTick(() => {
|
|
34220
|
+
updateDomValue();
|
|
34221
|
+
});
|
|
34222
|
+
});
|
|
34223
|
+
onMounted(() => {
|
|
34224
|
+
updateDomValue();
|
|
34225
|
+
});
|
|
34111
34226
|
$xePasswordInput.renderVN = renderVN;
|
|
34112
34227
|
return $xePasswordInput;
|
|
34113
34228
|
},
|
|
@@ -40279,6 +40394,10 @@ var VxeTextareaComponent = defineVxeComponent({
|
|
|
40279
40394
|
props: {
|
|
40280
40395
|
modelValue: [String, Number],
|
|
40281
40396
|
className: String,
|
|
40397
|
+
inputClassName: {
|
|
40398
|
+
type: String,
|
|
40399
|
+
default: () => getConfig$3().textarea.inputClassName
|
|
40400
|
+
},
|
|
40282
40401
|
immediate: {
|
|
40283
40402
|
type: Boolean,
|
|
40284
40403
|
default: true
|
|
@@ -40370,7 +40489,6 @@ var VxeTextareaComponent = defineVxeComponent({
|
|
|
40370
40489
|
reactData,
|
|
40371
40490
|
getRefMaps: () => refMaps
|
|
40372
40491
|
};
|
|
40373
|
-
let textareaMethods = {};
|
|
40374
40492
|
const computeFormReadonly = computed(() => {
|
|
40375
40493
|
const { readonly } = props;
|
|
40376
40494
|
if (readonly === null) {
|
|
@@ -40425,6 +40543,20 @@ var VxeTextareaComponent = defineVxeComponent({
|
|
|
40425
40543
|
}
|
|
40426
40544
|
return Object.assign({ minRows: 1, maxRows: 10 }, getConfig$3().textarea.autoSize, autoSize);
|
|
40427
40545
|
});
|
|
40546
|
+
const computeDomValue = computed(() => {
|
|
40547
|
+
const { inputValue } = reactData;
|
|
40548
|
+
return inputValue;
|
|
40549
|
+
});
|
|
40550
|
+
const dispatchEvent = (type, params, evnt) => {
|
|
40551
|
+
emit(type, createEvent(evnt, { $textarea: $xeTextarea }, params));
|
|
40552
|
+
};
|
|
40553
|
+
const updateDomValue = () => {
|
|
40554
|
+
const domValue = computeDomValue.value;
|
|
40555
|
+
const taElem = refTextarea.value;
|
|
40556
|
+
if (taElem) {
|
|
40557
|
+
taElem.value = XEUtils.eqNull(domValue) ? '' : ('' + domValue);
|
|
40558
|
+
}
|
|
40559
|
+
};
|
|
40428
40560
|
const updateAutoTxt = () => {
|
|
40429
40561
|
const { size, autosize, autoSize } = props;
|
|
40430
40562
|
const { inputValue } = reactData;
|
|
@@ -40485,7 +40617,7 @@ var VxeTextareaComponent = defineVxeComponent({
|
|
|
40485
40617
|
};
|
|
40486
40618
|
const triggerEvent = (evnt) => {
|
|
40487
40619
|
const value = reactData.inputValue;
|
|
40488
|
-
|
|
40620
|
+
dispatchEvent(evnt.type, { value }, evnt);
|
|
40489
40621
|
};
|
|
40490
40622
|
const handleChange = (value, evnt) => {
|
|
40491
40623
|
if (props.trim) {
|
|
@@ -40515,7 +40647,7 @@ var VxeTextareaComponent = defineVxeComponent({
|
|
|
40515
40647
|
$xeForm.triggerItemEvent(evnt, formItemInfo.itemConfig.field, value);
|
|
40516
40648
|
}
|
|
40517
40649
|
}
|
|
40518
|
-
|
|
40650
|
+
dispatchEvent('input', { value }, evnt);
|
|
40519
40651
|
handleResize();
|
|
40520
40652
|
};
|
|
40521
40653
|
const changeEvent = (evnt) => {
|
|
@@ -40526,7 +40658,7 @@ var VxeTextareaComponent = defineVxeComponent({
|
|
|
40526
40658
|
else {
|
|
40527
40659
|
handleChange(reactData.inputValue, evnt);
|
|
40528
40660
|
}
|
|
40529
|
-
|
|
40661
|
+
dispatchEvent('lazy-change', { value: reactData.inputValue }, evnt);
|
|
40530
40662
|
};
|
|
40531
40663
|
const blurEvent = (evnt) => {
|
|
40532
40664
|
const { immediate } = props;
|
|
@@ -40534,12 +40666,10 @@ var VxeTextareaComponent = defineVxeComponent({
|
|
|
40534
40666
|
if (!immediate) {
|
|
40535
40667
|
handleChange(inputValue, evnt);
|
|
40536
40668
|
}
|
|
40537
|
-
|
|
40669
|
+
dispatchEvent('blur', { value: inputValue }, evnt);
|
|
40538
40670
|
};
|
|
40539
|
-
textareaMethods = {
|
|
40540
|
-
dispatchEvent
|
|
40541
|
-
emit(type, createEvent(evnt, { $textarea: $xeTextarea }, params));
|
|
40542
|
-
},
|
|
40671
|
+
const textareaMethods = {
|
|
40672
|
+
dispatchEvent,
|
|
40543
40673
|
focus() {
|
|
40544
40674
|
const textElem = refTextarea.value;
|
|
40545
40675
|
textElem.focus();
|
|
@@ -40553,7 +40683,7 @@ var VxeTextareaComponent = defineVxeComponent({
|
|
|
40553
40683
|
};
|
|
40554
40684
|
Object.assign($xeTextarea, textareaMethods);
|
|
40555
40685
|
const renderVN = () => {
|
|
40556
|
-
const { className, resize, autosize, autoSize, showWordCount, countMethod, rows, cols } = props;
|
|
40686
|
+
const { className, inputClassName, resize, autosize, autoSize, showWordCount, countMethod, rows, cols } = props;
|
|
40557
40687
|
const { inputValue } = reactData;
|
|
40558
40688
|
const vSize = computeSize.value;
|
|
40559
40689
|
const isDisabled = computeIsDisabled.value;
|
|
@@ -40588,8 +40718,7 @@ var VxeTextareaComponent = defineVxeComponent({
|
|
|
40588
40718
|
}, [
|
|
40589
40719
|
h('textarea', {
|
|
40590
40720
|
ref: refTextarea,
|
|
40591
|
-
class: 'vxe-textarea--inner',
|
|
40592
|
-
value: inputValue,
|
|
40721
|
+
class: 'vxe-textarea--inner' + (inputClassName ? (' ' + inputClassName) : ''),
|
|
40593
40722
|
name: props.name,
|
|
40594
40723
|
placeholder: inpPlaceholder,
|
|
40595
40724
|
maxlength: inpMaxLength,
|
|
@@ -40640,6 +40769,22 @@ var VxeTextareaComponent = defineVxeComponent({
|
|
|
40640
40769
|
updateAutoTxt();
|
|
40641
40770
|
handleResize();
|
|
40642
40771
|
});
|
|
40772
|
+
const rDvFlag = ref(0);
|
|
40773
|
+
watch(computeFormReadonly, () => {
|
|
40774
|
+
rDvFlag.value++;
|
|
40775
|
+
});
|
|
40776
|
+
watch(computeDomValue, () => {
|
|
40777
|
+
rDvFlag.value++;
|
|
40778
|
+
});
|
|
40779
|
+
watch(rDvFlag, () => {
|
|
40780
|
+
updateDomValue();
|
|
40781
|
+
});
|
|
40782
|
+
onMounted(() => {
|
|
40783
|
+
updateDomValue();
|
|
40784
|
+
nextTick(() => {
|
|
40785
|
+
updateDomValue();
|
|
40786
|
+
});
|
|
40787
|
+
});
|
|
40643
40788
|
nextTick(() => {
|
|
40644
40789
|
const { autosize, autoSize } = props;
|
|
40645
40790
|
if (autosize) {
|