vxe-pc-ui 4.17.1 → 4.17.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.
Files changed (59) hide show
  1. package/dist/all.esm.js +265 -144
  2. package/dist/style.css +1 -1
  3. package/dist/style.min.css +1 -1
  4. package/es/icon/style.css +1 -1
  5. package/es/input/src/input.js +73 -49
  6. package/es/number-input/src/number-input.js +28 -24
  7. package/es/password-input/src/password-input.js +128 -61
  8. package/es/password-input/style.css +8 -0
  9. package/es/password-input/style.min.css +1 -1
  10. package/es/style.css +1 -1
  11. package/es/style.min.css +1 -1
  12. package/es/textarea/src/textarea.js +37 -11
  13. package/es/ui/index.js +1 -1
  14. package/es/ui/src/log.js +1 -1
  15. package/es/vxe-password-input/style.css +8 -0
  16. package/es/vxe-password-input/style.min.css +1 -1
  17. package/lib/icon/style/style.css +1 -1
  18. package/lib/icon/style/style.min.css +1 -1
  19. package/lib/index.umd.js +287 -164
  20. package/lib/index.umd.min.js +1 -1
  21. package/lib/input/src/input.js +77 -52
  22. package/lib/input/src/input.min.js +1 -1
  23. package/lib/number-input/src/number-input.js +31 -26
  24. package/lib/number-input/src/number-input.min.js +1 -1
  25. package/lib/password-input/src/password-input.js +134 -70
  26. package/lib/password-input/src/password-input.min.js +1 -1
  27. package/lib/password-input/style/style.css +8 -0
  28. package/lib/password-input/style/style.min.css +1 -1
  29. package/lib/style.css +1 -1
  30. package/lib/style.min.css +1 -1
  31. package/lib/textarea/src/textarea.js +40 -12
  32. package/lib/textarea/src/textarea.min.js +1 -1
  33. package/lib/ui/index.js +1 -1
  34. package/lib/ui/index.min.js +1 -1
  35. package/lib/ui/src/log.js +1 -1
  36. package/lib/ui/src/log.min.js +1 -1
  37. package/lib/vxe-password-input/style/style.css +8 -0
  38. package/lib/vxe-password-input/style/style.min.css +1 -1
  39. package/package.json +1 -1
  40. package/packages/input/src/input.ts +79 -54
  41. package/packages/number-input/src/number-input.ts +29 -26
  42. package/packages/password-input/src/password-input.ts +140 -68
  43. package/packages/textarea/src/textarea.ts +43 -15
  44. package/styles/components/password-input.scss +5 -0
  45. package/types/components/gantt-plugins/extend-gantt-chart.d.ts +2 -2
  46. package/types/components/gantt.d.ts +12 -3
  47. package/types/components/password-input.d.ts +2 -0
  48. /package/es/icon/{iconfont.1786796113388.ttf → iconfont.1786945812996.ttf} +0 -0
  49. /package/es/icon/{iconfont.1786796113388.woff → iconfont.1786945812996.woff} +0 -0
  50. /package/es/icon/{iconfont.1786796113388.woff2 → iconfont.1786945812996.woff2} +0 -0
  51. /package/es/{iconfont.1786796113388.ttf → iconfont.1786945812996.ttf} +0 -0
  52. /package/es/{iconfont.1786796113388.woff → iconfont.1786945812996.woff} +0 -0
  53. /package/es/{iconfont.1786796113388.woff2 → iconfont.1786945812996.woff2} +0 -0
  54. /package/lib/icon/style/{iconfont.1786796113388.ttf → iconfont.1786945812996.ttf} +0 -0
  55. /package/lib/icon/style/{iconfont.1786796113388.woff → iconfont.1786945812996.woff} +0 -0
  56. /package/lib/icon/style/{iconfont.1786796113388.woff2 → iconfont.1786945812996.woff2} +0 -0
  57. /package/lib/{iconfont.1786796113388.ttf → iconfont.1786945812996.ttf} +0 -0
  58. /package/lib/{iconfont.1786796113388.woff → iconfont.1786945812996.woff} +0 -0
  59. /package/lib/{iconfont.1786796113388.woff2 → iconfont.1786945812996.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.1"}`;
84
+ const uiVersion = `ui v${"4.17.3"}`;
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.1";
98
+ const version = "4.17.3";
99
99
  VxeUI.uiVersion = version;
100
100
  VxeUI.dynamicApp = dynamicApp;
101
101
  function config(options) {
@@ -9253,7 +9253,6 @@ var VxeInputComponent = defineVxeComponent({
9253
9253
  internalData,
9254
9254
  getRefMaps: () => refMaps
9255
9255
  };
9256
- let inputMethods = {};
9257
9256
  const parseDate = (value, format) => {
9258
9257
  const { type } = props;
9259
9258
  if (type === 'time') {
@@ -9714,8 +9713,9 @@ var VxeInputComponent = defineVxeComponent({
9714
9713
  return minuteList;
9715
9714
  });
9716
9715
  const computeInputReadonly = computed(() => {
9717
- const { type, editable, multiple, readonly } = props;
9718
- return readonly || multiple || !editable || type === 'week' || type === 'quarter';
9716
+ const { type, editable, multiple } = props;
9717
+ const formReadonly = computeFormReadonly.value;
9718
+ return formReadonly || multiple || !editable || type === 'week' || type === 'quarter';
9719
9719
  });
9720
9720
  const computeInputType = computed(() => {
9721
9721
  const { type } = props;
@@ -9777,6 +9777,10 @@ var VxeInputComponent = defineVxeComponent({
9777
9777
  }
9778
9778
  return false;
9779
9779
  });
9780
+ const computeDomValue = computed(() => {
9781
+ const { inputValue } = reactData;
9782
+ return inputValue;
9783
+ });
9780
9784
  const getNumberValue = (val) => {
9781
9785
  const { type, exponential } = props;
9782
9786
  const inpMaxLength = computeInpMaxLength.value;
@@ -9787,12 +9791,22 @@ var VxeInputComponent = defineVxeComponent({
9787
9791
  }
9788
9792
  return restVal.slice(0, inpMaxLength);
9789
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
+ };
9790
9804
  const emitModel = (value) => {
9791
9805
  emit('update:modelValue', value);
9792
9806
  };
9793
9807
  const triggerEvent = (evnt) => {
9794
9808
  const { inputValue } = reactData;
9795
- inputMethods.dispatchEvent(evnt.type, { value: inputValue }, evnt);
9809
+ dispatchEvent(evnt.type, { value: inputValue }, evnt);
9796
9810
  };
9797
9811
  const handleChange = (value, evnt) => {
9798
9812
  if (props.trim) {
@@ -9800,9 +9814,9 @@ var VxeInputComponent = defineVxeComponent({
9800
9814
  }
9801
9815
  reactData.inputValue = value;
9802
9816
  emitModel(value);
9803
- inputMethods.dispatchEvent('input', { value }, evnt);
9817
+ dispatchEvent('input', { value }, evnt);
9804
9818
  if (XEUtils.toValueString(props.modelValue) !== value) {
9805
- inputMethods.dispatchEvent('change', { value }, evnt);
9819
+ dispatchEvent('change', { value }, evnt);
9806
9820
  if (!$xeSelect && !$xeTreeSelect) {
9807
9821
  // 自动更新校验状态
9808
9822
  if ($xeForm && formItemInfo) {
@@ -9820,7 +9834,7 @@ var VxeInputComponent = defineVxeComponent({
9820
9834
  handleChange(value, evnt);
9821
9835
  }
9822
9836
  else {
9823
- inputMethods.dispatchEvent('input', { value }, evnt);
9837
+ dispatchEvent('input', { value }, evnt);
9824
9838
  if (!$xeSelect && !$xeTreeSelect) {
9825
9839
  // 自动更新校验状态
9826
9840
  if ($xeForm && formItemInfo) {
@@ -9840,7 +9854,7 @@ var VxeInputComponent = defineVxeComponent({
9840
9854
  if (!inpImmediate) {
9841
9855
  triggerEvent(evnt);
9842
9856
  }
9843
- $xeInput.dispatchEvent('lazy-change', { value: reactData.inputValue }, evnt);
9857
+ dispatchEvent('lazy-change', { value: reactData.inputValue }, evnt);
9844
9858
  };
9845
9859
  const blurEvent = (evnt) => {
9846
9860
  const { inputValue } = reactData;
@@ -9853,7 +9867,7 @@ var VxeInputComponent = defineVxeComponent({
9853
9867
  if (!reactData.visiblePanel) {
9854
9868
  reactData.isActivated = false;
9855
9869
  }
9856
- inputMethods.dispatchEvent('blur', { value }, evnt);
9870
+ dispatchEvent('blur', { value }, evnt);
9857
9871
  if (!$xeSelect && !$xeTreeSelect) {
9858
9872
  // 自动更新校验状态
9859
9873
  if ($xeForm && formItemInfo) {
@@ -9878,7 +9892,7 @@ var VxeInputComponent = defineVxeComponent({
9878
9892
  const isDisabled = computeIsDisabled.value;
9879
9893
  if (!isDisabled) {
9880
9894
  const { inputValue } = reactData;
9881
- $xeInput.dispatchEvent('prefix-click', { value: inputValue }, evnt);
9895
+ dispatchEvent('prefix-click', { value: inputValue }, evnt);
9882
9896
  }
9883
9897
  };
9884
9898
  const hidePanel = () => {
@@ -9903,14 +9917,14 @@ var VxeInputComponent = defineVxeComponent({
9903
9917
  }
9904
9918
  }
9905
9919
  handleChange('', evnt);
9906
- $xeInput.dispatchEvent('clear', { value }, evnt);
9907
- $xeInput.dispatchEvent('lazy-change', { value }, evnt);
9920
+ dispatchEvent('clear', { value }, evnt);
9921
+ dispatchEvent('lazy-change', { value }, evnt);
9908
9922
  };
9909
9923
  const clickSuffixEvent = (evnt) => {
9910
9924
  const isDisabled = computeIsDisabled.value;
9911
9925
  if (!isDisabled) {
9912
9926
  const { inputValue } = reactData;
9913
- $xeInput.dispatchEvent('suffix-click', { value: inputValue }, evnt);
9927
+ dispatchEvent('suffix-click', { value: inputValue }, evnt);
9914
9928
  }
9915
9929
  };
9916
9930
  const dateParseValue = (value) => {
@@ -10143,12 +10157,12 @@ var VxeInputComponent = defineVxeComponent({
10143
10157
  if (!isDisabled && !inputReadonly) {
10144
10158
  reactData.showPwd = !showPwd;
10145
10159
  }
10146
- inputMethods.dispatchEvent('toggle-visible', { visible: reactData.showPwd }, evnt);
10160
+ dispatchEvent('toggle-visible', { visible: reactData.showPwd }, evnt);
10147
10161
  };
10148
10162
  // 密码
10149
10163
  // 搜索
10150
10164
  const searchEvent = (evnt) => {
10151
- inputMethods.dispatchEvent('search-click', {}, evnt);
10165
+ dispatchEvent('search-click', {}, evnt);
10152
10166
  };
10153
10167
  // 搜索
10154
10168
  // 数值
@@ -10178,7 +10192,7 @@ var VxeInputComponent = defineVxeComponent({
10178
10192
  if (!isDisabled && !inputReadonly && !isDisabledSubtractNumber) {
10179
10193
  numberChange(false, evnt);
10180
10194
  }
10181
- inputMethods.dispatchEvent('next-number', { value: reactData.inputValue }, evnt);
10195
+ dispatchEvent('next-number', { value: reactData.inputValue }, evnt);
10182
10196
  };
10183
10197
  const numberDownNextEvent = (evnt) => {
10184
10198
  internalData.dnTimeout = setTimeout(() => {
@@ -10194,7 +10208,7 @@ var VxeInputComponent = defineVxeComponent({
10194
10208
  if (!isDisabled && !inputReadonly && !isDisabledAddNumber) {
10195
10209
  numberChange(true, evnt);
10196
10210
  }
10197
- inputMethods.dispatchEvent('prev-number', { value: reactData.inputValue }, evnt);
10211
+ dispatchEvent('prev-number', { value: reactData.inputValue }, evnt);
10198
10212
  };
10199
10213
  const numberKeydownEvent = (evnt) => {
10200
10214
  const isUpArrow = globalEvents.hasKey(evnt, GLOBAL_EVENT_KEYS.ARROW_UP);
@@ -10346,7 +10360,7 @@ var VxeInputComponent = defineVxeComponent({
10346
10360
  }
10347
10361
  }
10348
10362
  reactData.selectMonth = viewDate;
10349
- inputMethods.dispatchEvent('date-prev', { viewType: datePanelType, viewDate, value, type }, evnt);
10363
+ dispatchEvent('date-prev', { viewType: datePanelType, viewDate, value, type }, evnt);
10350
10364
  }
10351
10365
  };
10352
10366
  const dateTodayMonthEvent = (evnt) => {
@@ -10355,7 +10369,7 @@ var VxeInputComponent = defineVxeComponent({
10355
10369
  dateChange(reactData.currentDate);
10356
10370
  hidePanel();
10357
10371
  }
10358
- inputMethods.dispatchEvent('date-today', { type: props.type }, evnt);
10372
+ dispatchEvent('date-today', { type: props.type }, evnt);
10359
10373
  };
10360
10374
  const dateNextEvent = (evnt) => {
10361
10375
  const { type } = props;
@@ -10388,7 +10402,7 @@ var VxeInputComponent = defineVxeComponent({
10388
10402
  }
10389
10403
  }
10390
10404
  reactData.selectMonth = viewDate;
10391
- inputMethods.dispatchEvent('date-next', { viewType: datePanelType, viewDate, value, type }, evnt);
10405
+ dispatchEvent('date-next', { viewType: datePanelType, viewDate, value, type }, evnt);
10392
10406
  }
10393
10407
  };
10394
10408
  const isDateDisabled = (item) => {
@@ -10938,6 +10952,31 @@ var VxeInputComponent = defineVxeComponent({
10938
10952
  }
10939
10953
  }
10940
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);
10941
10980
  const renderDateLabel = (item, label) => {
10942
10981
  const { festivalMethod } = props;
10943
10982
  if (festivalMethod) {
@@ -11559,34 +11598,6 @@ var VxeInputComponent = defineVxeComponent({
11559
11598
  }
11560
11599
  return createCommentVNode();
11561
11600
  };
11562
- const dispatchEvent = (type, params, evnt) => {
11563
- emit(type, createEvent(evnt, { $input: $xeInput }, params));
11564
- };
11565
- inputMethods = {
11566
- dispatchEvent,
11567
- focus() {
11568
- const inputElem = refInputTarget.value;
11569
- reactData.isActivated = true;
11570
- inputElem.focus();
11571
- return nextTick();
11572
- },
11573
- blur() {
11574
- const inputElem = refInputTarget.value;
11575
- inputElem.blur();
11576
- reactData.isActivated = false;
11577
- return nextTick();
11578
- },
11579
- select() {
11580
- const inputElem = refInputTarget.value;
11581
- inputElem.select();
11582
- reactData.isActivated = false;
11583
- return nextTick();
11584
- },
11585
- showPanel,
11586
- hidePanel,
11587
- updatePlacement
11588
- };
11589
- Object.assign($xeInput, inputMethods);
11590
11601
  const renderVN = () => {
11591
11602
  const { className, inputClassName, controls, type, title, align, showWordCount, countMethod, name, autoComplete, autocomplete } = props;
11592
11603
  const { inputValue, visiblePanel, isActivated } = reactData;
@@ -11633,7 +11644,6 @@ var VxeInputComponent = defineVxeComponent({
11633
11644
  h('input', {
11634
11645
  ref: refInputTarget,
11635
11646
  class: 'vxe-input--inner' + (inputClassName ? (' ' + inputClassName) : ''),
11636
- value: inputValue,
11637
11647
  name,
11638
11648
  type: inputType,
11639
11649
  placeholder: inpPlaceholder,
@@ -11687,6 +11697,19 @@ var VxeInputComponent = defineVxeComponent({
11687
11697
  reactData.inputValue = props.multiple ? computeDateMultipleLabel.value : reactData.datePanelLabel;
11688
11698
  }
11689
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
+ });
11690
11713
  onMounted(() => {
11691
11714
  const { type } = props;
11692
11715
  if (['date', 'time', 'datetime', 'week', 'month', 'quarter', 'year'].includes(type)) {
@@ -11706,6 +11729,7 @@ var VxeInputComponent = defineVxeComponent({
11706
11729
  globalEvents.on($xeInput, 'mousedown', handleGlobalMousedownEvent);
11707
11730
  globalEvents.on($xeInput, 'keydown', handleGlobalKeydownEvent);
11708
11731
  globalEvents.on($xeInput, 'blur', handleGlobalBlurEvent);
11732
+ updateDomValue();
11709
11733
  });
11710
11734
  onBeforeUnmount(() => {
11711
11735
  numberStopDown();
@@ -15416,6 +15440,10 @@ var VxeNumberInputComponent = defineVxeComponent({
15416
15440
  }
15417
15441
  return false;
15418
15442
  });
15443
+ const computeInpClassNamevalue = computed(() => {
15444
+ const { inputClassName } = props;
15445
+ return 'vxe-number-input--input' + (inputClassName ? (' ' + inputClassName) : '');
15446
+ });
15419
15447
  const refMaps = {
15420
15448
  refElem,
15421
15449
  refInput: refInputTarget
@@ -15432,7 +15460,9 @@ var VxeNumberInputComponent = defineVxeComponent({
15432
15460
  getRefMaps: () => refMaps,
15433
15461
  getComputeMaps: () => computeMaps
15434
15462
  };
15435
- let numberInputMethods = {};
15463
+ const dispatchEvent = (type, params, evnt) => {
15464
+ emit(type, createEvent(evnt, { $numberInput: $xeNumberInput }, params));
15465
+ };
15436
15466
  const handleNumberString = (val) => {
15437
15467
  if (XEUtils.eqNull(val)) {
15438
15468
  return '';
@@ -15461,7 +15491,7 @@ var VxeNumberInputComponent = defineVxeComponent({
15461
15491
  };
15462
15492
  const triggerEvent = (evnt) => {
15463
15493
  const { inputValue } = reactData;
15464
- numberInputMethods.dispatchEvent(evnt.type, { value: inputValue }, evnt);
15494
+ dispatchEvent(evnt.type, { value: inputValue }, evnt);
15465
15495
  };
15466
15496
  const handleChange = (val, inputValue, evnt) => {
15467
15497
  const value = eqEmptyValue(val) ? null : Number(val);
@@ -15475,9 +15505,9 @@ var VxeNumberInputComponent = defineVxeComponent({
15475
15505
  reactData.inputValue = inputValue || '';
15476
15506
  });
15477
15507
  }
15478
- numberInputMethods.dispatchEvent('input', { value }, evnt);
15508
+ dispatchEvent('input', { value }, evnt);
15479
15509
  if (isChange) {
15480
- numberInputMethods.dispatchEvent('change', { value }, evnt);
15510
+ dispatchEvent('change', { value }, evnt);
15481
15511
  // 自动更新校验状态
15482
15512
  if ($xeForm && formItemInfo) {
15483
15513
  $xeForm.triggerItemEvent(evnt, formItemInfo.itemConfig.field, value);
@@ -15492,7 +15522,7 @@ var VxeNumberInputComponent = defineVxeComponent({
15492
15522
  handleChange(value, inputValue, evnt);
15493
15523
  }
15494
15524
  else {
15495
- numberInputMethods.dispatchEvent('input', { value }, evnt);
15525
+ dispatchEvent('input', { value }, evnt);
15496
15526
  // 自动更新校验状态
15497
15527
  if ($xeForm && formItemInfo) {
15498
15528
  $xeForm.triggerItemEvent(evnt, formItemInfo.itemConfig.field, value);
@@ -15509,7 +15539,7 @@ var VxeNumberInputComponent = defineVxeComponent({
15509
15539
  if (!inpImmediate) {
15510
15540
  triggerEvent(evnt);
15511
15541
  }
15512
- $xeNumberInput.dispatchEvent('lazy-change', { value: reactData.inputValue }, evnt);
15542
+ dispatchEvent('lazy-change', { value: reactData.inputValue }, evnt);
15513
15543
  };
15514
15544
  const focusEvent = (evnt) => {
15515
15545
  const inputReadonly = computeInputReadonly.value;
@@ -15525,20 +15555,20 @@ var VxeNumberInputComponent = defineVxeComponent({
15525
15555
  const isDisabled = computeIsDisabled.value;
15526
15556
  if (!isDisabled) {
15527
15557
  const { inputValue } = reactData;
15528
- numberInputMethods.dispatchEvent('prefix-click', { value: inputValue }, evnt);
15558
+ dispatchEvent('prefix-click', { value: inputValue }, evnt);
15529
15559
  }
15530
15560
  };
15531
15561
  const clearValueEvent = (evnt, value) => {
15532
15562
  focus();
15533
15563
  handleChange(null, '', evnt);
15534
- numberInputMethods.dispatchEvent('clear', { value }, evnt);
15535
- $xeNumberInput.dispatchEvent('lazy-change', { value }, evnt);
15564
+ dispatchEvent('clear', { value }, evnt);
15565
+ dispatchEvent('lazy-change', { value }, evnt);
15536
15566
  };
15537
15567
  const clickSuffixEvent = (evnt) => {
15538
15568
  const isDisabled = computeIsDisabled.value;
15539
15569
  if (!isDisabled) {
15540
15570
  const { inputValue } = reactData;
15541
- numberInputMethods.dispatchEvent('suffix-click', { value: inputValue }, evnt);
15571
+ dispatchEvent('suffix-click', { value: inputValue }, evnt);
15542
15572
  }
15543
15573
  };
15544
15574
  const updateModel = (val) => {
@@ -15640,7 +15670,7 @@ var VxeNumberInputComponent = defineVxeComponent({
15640
15670
  afterCheckValue();
15641
15671
  reactData.isFocus = false;
15642
15672
  reactData.isActivated = false;
15643
- numberInputMethods.dispatchEvent('blur', { value }, evnt);
15673
+ dispatchEvent('blur', { value }, evnt);
15644
15674
  // 自动更新校验状态
15645
15675
  if ($xeForm && formItemInfo) {
15646
15676
  $xeForm.triggerItemEvent(evnt, formItemInfo.itemConfig.field, value);
@@ -15673,10 +15703,10 @@ var VxeNumberInputComponent = defineVxeComponent({
15673
15703
  numberChange(true, evnt);
15674
15704
  }
15675
15705
  reactData.isActivated = true;
15676
- numberInputMethods.dispatchEvent('plus-number', { value: reactData.inputValue }, evnt);
15677
- $xeNumberInput.dispatchEvent('lazy-change', { value: reactData.inputValue }, evnt);
15706
+ dispatchEvent('plus-number', { value: reactData.inputValue }, evnt);
15707
+ dispatchEvent('lazy-change', { value: reactData.inputValue }, evnt);
15678
15708
  // 已废弃
15679
- numberInputMethods.dispatchEvent('next-number', { value: reactData.inputValue }, evnt);
15709
+ dispatchEvent('next-number', { value: reactData.inputValue }, evnt);
15680
15710
  };
15681
15711
  const numberMinusEvent = (evnt) => {
15682
15712
  const isDisabled = computeIsDisabled.value;
@@ -15686,10 +15716,10 @@ var VxeNumberInputComponent = defineVxeComponent({
15686
15716
  numberChange(false, evnt);
15687
15717
  }
15688
15718
  reactData.isActivated = true;
15689
- numberInputMethods.dispatchEvent('minus-number', { value: reactData.inputValue }, evnt);
15690
- $xeNumberInput.dispatchEvent('lazy-change', { value: reactData.inputValue }, evnt);
15719
+ dispatchEvent('minus-number', { value: reactData.inputValue }, evnt);
15720
+ dispatchEvent('lazy-change', { value: reactData.inputValue }, evnt);
15691
15721
  // 已废弃
15692
- numberInputMethods.dispatchEvent('prev-number', { value: reactData.inputValue }, evnt);
15722
+ dispatchEvent('prev-number', { value: reactData.inputValue }, evnt);
15693
15723
  };
15694
15724
  const numberKeydownEvent = (evnt) => {
15695
15725
  const isUpArrow = globalEvents.hasKey(evnt, GLOBAL_EVENT_KEYS.ARROW_UP);
@@ -15876,10 +15906,7 @@ var VxeNumberInputComponent = defineVxeComponent({
15876
15906
  afterCheckValue();
15877
15907
  }
15878
15908
  };
15879
- const dispatchEvent = (type, params, evnt) => {
15880
- emit(type, createEvent(evnt, { $numberInput: $xeNumberInput }, params));
15881
- };
15882
- numberInputMethods = {
15909
+ const numberInputMethods = {
15883
15910
  dispatchEvent,
15884
15911
  focus() {
15885
15912
  const inputReadonly = computeInputReadonly.value;
@@ -15980,13 +16007,14 @@ var VxeNumberInputComponent = defineVxeComponent({
15980
16007
  ]);
15981
16008
  };
15982
16009
  const renderInput = () => {
15983
- const { inputClassName, type, name, autocomplete, autoComplete } = props;
16010
+ const { type, name, autocomplete, autoComplete } = props;
15984
16011
  const { inputValue, isFocus } = reactData;
15985
16012
  const isDisabled = computeIsDisabled.value;
15986
16013
  const numLabel = computeNumLabel.value;
15987
16014
  const inputReadonly = computeInputReadonly.value;
15988
16015
  const inpMaxLength = computeInpMaxLength.value;
15989
16016
  const inpPlaceholder = computeInpPlaceholder.value;
16017
+ const inpClassName = computeInpClassNamevalue.value;
15990
16018
  return h('div', {
15991
16019
  key: 'ni',
15992
16020
  class: 'vxe-number-input--input-wrapper'
@@ -15997,10 +16025,10 @@ var VxeNumberInputComponent = defineVxeComponent({
15997
16025
  }, [
15998
16026
  h('input', {
15999
16027
  ref: refInputTarget,
16000
- class: 'vxe-number-input--input' + (inputClassName ? (' ' + inputClassName) : ''),
16001
- value: !isFocus && type === 'amount' ? numLabel : inputValue,
16028
+ class: inpClassName,
16002
16029
  name,
16003
16030
  type: 'text',
16031
+ value: !isFocus && type === 'amount' ? numLabel : inputValue,
16004
16032
  placeholder: inpPlaceholder,
16005
16033
  maxlength: inpMaxLength,
16006
16034
  readonly: inputReadonly,
@@ -33831,6 +33859,10 @@ var VxePasswordInputComponent = defineVxeComponent({
33831
33859
  type: Boolean,
33832
33860
  default: () => getConfig$3().passwordInput.controls
33833
33861
  },
33862
+ editable: {
33863
+ type: Boolean,
33864
+ default: true
33865
+ },
33834
33866
  // 已废弃
33835
33867
  autocomplete: String
33836
33868
  },
@@ -33871,14 +33903,9 @@ var VxePasswordInputComponent = defineVxeComponent({
33871
33903
  reactData,
33872
33904
  getRefMaps: () => refMaps
33873
33905
  };
33874
- let passwordInputMethods = {};
33875
33906
  const computeIsClearable = computed(() => {
33876
33907
  return props.clearable;
33877
33908
  });
33878
- const computeInpReadonly = computed(() => {
33879
- const { readonly } = props;
33880
- return readonly;
33881
- });
33882
33909
  const computeInpPlaceholder = computed(() => {
33883
33910
  const { placeholder } = props;
33884
33911
  if (placeholder) {
@@ -33890,6 +33917,32 @@ var VxePasswordInputComponent = defineVxeComponent({
33890
33917
  }
33891
33918
  return getI18n$2('vxe.base.pleaseInput');
33892
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
+ });
33893
33946
  const computeInputType = computed(() => {
33894
33947
  const { showPwd } = reactData;
33895
33948
  if (showPwd) {
@@ -33901,9 +33954,28 @@ var VxePasswordInputComponent = defineVxeComponent({
33901
33954
  const { immediate } = props;
33902
33955
  return immediate;
33903
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
+ };
33904
33976
  const triggerEvent = (evnt) => {
33905
33977
  const { inputValue } = reactData;
33906
- passwordInputMethods.dispatchEvent(evnt.type, { value: inputValue }, evnt);
33978
+ dispatchEvent(evnt.type, { value: inputValue }, evnt);
33907
33979
  };
33908
33980
  const emitInputEvent = (value, evnt) => {
33909
33981
  const inpImmediate = computeInpImmediate.value;
@@ -33912,7 +33984,7 @@ var VxePasswordInputComponent = defineVxeComponent({
33912
33984
  handleChange(value, evnt);
33913
33985
  }
33914
33986
  else {
33915
- passwordInputMethods.dispatchEvent('input', { value }, evnt);
33987
+ dispatchEvent('input', { value }, evnt);
33916
33988
  }
33917
33989
  };
33918
33990
  const inputEvent = (evnt) => {
@@ -33923,9 +33995,9 @@ var VxePasswordInputComponent = defineVxeComponent({
33923
33995
  const handleChange = (value, evnt) => {
33924
33996
  reactData.inputValue = value;
33925
33997
  emit('update:modelValue', value);
33926
- passwordInputMethods.dispatchEvent('input', { value }, evnt);
33998
+ dispatchEvent('input', { value }, evnt);
33927
33999
  if (XEUtils.toValueString(props.modelValue) !== value) {
33928
- passwordInputMethods.dispatchEvent('change', { value }, evnt);
34000
+ dispatchEvent('change', { value }, evnt);
33929
34001
  // 自动更新校验状态
33930
34002
  if ($xeForm && formItemInfo) {
33931
34003
  $xeForm.triggerItemEvent(evnt, formItemInfo.itemConfig.field, value);
@@ -33934,7 +34006,7 @@ var VxePasswordInputComponent = defineVxeComponent({
33934
34006
  };
33935
34007
  const changeEvent = (evnt) => {
33936
34008
  triggerEvent(evnt);
33937
- $xePasswordInput.dispatchEvent('lazy-change', { value: reactData.inputValue }, evnt);
34009
+ dispatchEvent('lazy-change', { value: reactData.inputValue }, evnt);
33938
34010
  // 自动更新校验状态
33939
34011
  if ($xeForm && formItemInfo) {
33940
34012
  $xeForm.triggerItemEvent(evnt, formItemInfo.itemConfig.field, reactData.inputValue);
@@ -33948,19 +34020,20 @@ var VxePasswordInputComponent = defineVxeComponent({
33948
34020
  const { inputValue } = reactData;
33949
34021
  const value = inputValue;
33950
34022
  reactData.isActivated = false;
33951
- $xePasswordInput.dispatchEvent('blur', { value }, evnt);
34023
+ dispatchEvent('blur', { value }, evnt);
33952
34024
  // 自动更新校验状态
33953
34025
  if ($xeForm && formItemInfo) {
33954
34026
  $xeForm.triggerItemEvent(evnt, formItemInfo.itemConfig.field, value);
33955
34027
  }
33956
34028
  };
33957
34029
  const passwordToggleEvent = (evnt) => {
33958
- const { readonly, disabled } = props;
33959
34030
  const { showPwd } = reactData;
33960
- if (!disabled && !readonly) {
34031
+ const isDisabled = computeIsDisabled.value;
34032
+ const formReadonly = computeFormReadonly.value;
34033
+ if (!isDisabled && !formReadonly) {
33961
34034
  reactData.showPwd = !showPwd;
33962
34035
  }
33963
- $xePasswordInput.dispatchEvent('toggle-visible', { visible: reactData.showPwd }, evnt);
34036
+ dispatchEvent('toggle-visible', { visible: reactData.showPwd }, evnt);
33964
34037
  };
33965
34038
  const clickEvent = (evnt) => {
33966
34039
  triggerEvent(evnt);
@@ -33968,23 +34041,45 @@ var VxePasswordInputComponent = defineVxeComponent({
33968
34041
  const clearValueEvent = (evnt, value) => {
33969
34042
  focus();
33970
34043
  handleChange('', evnt);
33971
- $xePasswordInput.dispatchEvent('clear', { value }, evnt);
33972
- $xePasswordInput.dispatchEvent('lazy-change', { value: reactData.inputValue }, evnt);
34044
+ dispatchEvent('clear', { value }, evnt);
34045
+ dispatchEvent('lazy-change', { value: reactData.inputValue }, evnt);
33973
34046
  };
33974
34047
  const clickSuffixEvent = (evnt) => {
33975
- const { disabled } = props;
33976
- if (!disabled) {
34048
+ const isDisabled = computeIsDisabled.value;
34049
+ if (!isDisabled) {
33977
34050
  const { inputValue } = reactData;
33978
- $xePasswordInput.dispatchEvent('suffix-click', { value: inputValue }, evnt);
34051
+ dispatchEvent('suffix-click', { value: inputValue }, evnt);
33979
34052
  }
33980
34053
  };
33981
34054
  const clickPrefixEvent = (evnt) => {
33982
- const { disabled } = props;
33983
- if (!disabled) {
34055
+ const isDisabled = computeIsDisabled.value;
34056
+ if (!isDisabled) {
33984
34057
  const { inputValue } = reactData;
33985
- $xePasswordInput.dispatchEvent('prefix-click', { value: inputValue }, evnt);
34058
+ dispatchEvent('prefix-click', { value: inputValue }, evnt);
33986
34059
  }
33987
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();
34080
+ }
34081
+ };
34082
+ Object.assign($xePasswordInput, passwordInputMethods);
33988
34083
  const renderPasswordIcon = () => {
33989
34084
  const { showPwd } = reactData;
33990
34085
  return h('div', {
@@ -34017,14 +34112,15 @@ var VxePasswordInputComponent = defineVxeComponent({
34017
34112
  : null;
34018
34113
  };
34019
34114
  const renderSuffixIcon = () => {
34020
- const { disabled, suffixIcon, controls } = props;
34115
+ const { suffixIcon, controls } = props;
34021
34116
  const { inputValue } = reactData;
34022
- const suffixSlot = slots.suffix;
34117
+ const isDisabled = computeIsDisabled.value;
34023
34118
  const isClearable = computeIsClearable.value;
34119
+ const suffixSlot = slots.suffix;
34024
34120
  return isClearable || controls || suffixSlot || suffixIcon
34025
34121
  ? h('div', {
34026
34122
  class: ['vxe-password-input--suffix', {
34027
- 'is--clear': isClearable && !disabled && !(inputValue === '' || XEUtils.eqNull(inputValue))
34123
+ 'is--clear': isClearable && !isDisabled && !(inputValue === '' || XEUtils.eqNull(inputValue))
34028
34124
  }]
34029
34125
  }, [
34030
34126
  isClearable
@@ -34053,41 +34149,22 @@ var VxePasswordInputComponent = defineVxeComponent({
34053
34149
  ])
34054
34150
  : null;
34055
34151
  };
34056
- passwordInputMethods = {
34057
- dispatchEvent(type, params, evnt) {
34058
- emit(type, createEvent(evnt, { $passwordInput: $xePasswordInput }, params));
34059
- },
34060
- focus() {
34061
- const inputElem = refInputTarget.value;
34062
- reactData.isActivated = true;
34063
- inputElem.focus();
34064
- return nextTick();
34065
- },
34066
- blur() {
34067
- const inputElem = refInputTarget.value;
34068
- inputElem.blur();
34069
- reactData.isActivated = false;
34070
- return nextTick();
34071
- },
34072
- select() {
34073
- const inputElem = refInputTarget.value;
34074
- inputElem.select();
34075
- reactData.isActivated = false;
34076
- return nextTick();
34077
- }
34078
- };
34079
- Object.assign($xePasswordInput, passwordInputMethods);
34080
- watch(() => props.modelValue, (val) => {
34081
- reactData.inputValue = val;
34082
- });
34083
34152
  const renderVN = () => {
34084
- const { className, inputClassName, name, disabled, readonly, autocomplete, autoComplete, maxLength } = props;
34153
+ const { className, inputClassName, name, readonly, autocomplete, autoComplete, maxLength } = props;
34085
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
+ }
34086
34163
  const vSize = computeSize.value;
34087
- const inpReadonly = computeInpReadonly.value;
34088
34164
  const inputType = computeInputType.value;
34089
34165
  const inpPlaceholder = computeInpPlaceholder.value;
34090
34166
  const isClearable = computeIsClearable.value;
34167
+ const inputReadonly = computeInputReadonly.value;
34091
34168
  const prefix = renderPrefixIcon();
34092
34169
  const suffix = renderSuffixIcon();
34093
34170
  return h('div', {
@@ -34097,9 +34174,9 @@ var VxePasswordInputComponent = defineVxeComponent({
34097
34174
  'is--prefix': !!prefix,
34098
34175
  'is--suffix': !!suffix,
34099
34176
  'is--readonly': readonly,
34100
- 'is--disabled': disabled,
34177
+ 'is--disabled': isDisabled,
34101
34178
  'is--active': isActivated,
34102
- 'show--clear': isClearable && !disabled && !(inputValue === '' || XEUtils.eqNull(inputValue))
34179
+ 'show--clear': isClearable && !isDisabled && !(inputValue === '' || XEUtils.eqNull(inputValue))
34103
34180
  }],
34104
34181
  spellcheck: false
34105
34182
  }, [
@@ -34110,12 +34187,11 @@ var VxePasswordInputComponent = defineVxeComponent({
34110
34187
  h('input', {
34111
34188
  ref: refInputTarget,
34112
34189
  class: 'vxe-password-input--inner' + (inputClassName ? (' ' + inputClassName) : ''),
34113
- value: inputValue,
34114
34190
  name,
34115
34191
  type: inputType,
34116
34192
  placeholder: inpPlaceholder,
34117
- readonly: inpReadonly,
34118
- disabled,
34193
+ readonly: inputReadonly,
34194
+ disabled: isDisabled,
34119
34195
  autocomplete: autocomplete || autoComplete,
34120
34196
  maxlength: maxLength,
34121
34197
  onClick: clickEvent,
@@ -34128,6 +34204,25 @@ var VxePasswordInputComponent = defineVxeComponent({
34128
34204
  suffix || renderEmptyElement($xePasswordInput)
34129
34205
  ]);
34130
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
+ });
34131
34226
  $xePasswordInput.renderVN = renderVN;
34132
34227
  return $xePasswordInput;
34133
34228
  },
@@ -40394,7 +40489,6 @@ var VxeTextareaComponent = defineVxeComponent({
40394
40489
  reactData,
40395
40490
  getRefMaps: () => refMaps
40396
40491
  };
40397
- let textareaMethods = {};
40398
40492
  const computeFormReadonly = computed(() => {
40399
40493
  const { readonly } = props;
40400
40494
  if (readonly === null) {
@@ -40449,6 +40543,20 @@ var VxeTextareaComponent = defineVxeComponent({
40449
40543
  }
40450
40544
  return Object.assign({ minRows: 1, maxRows: 10 }, getConfig$3().textarea.autoSize, autoSize);
40451
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
+ };
40452
40560
  const updateAutoTxt = () => {
40453
40561
  const { size, autosize, autoSize } = props;
40454
40562
  const { inputValue } = reactData;
@@ -40509,7 +40617,7 @@ var VxeTextareaComponent = defineVxeComponent({
40509
40617
  };
40510
40618
  const triggerEvent = (evnt) => {
40511
40619
  const value = reactData.inputValue;
40512
- $xeTextarea.dispatchEvent(evnt.type, { value }, evnt);
40620
+ dispatchEvent(evnt.type, { value }, evnt);
40513
40621
  };
40514
40622
  const handleChange = (value, evnt) => {
40515
40623
  if (props.trim) {
@@ -40539,7 +40647,7 @@ var VxeTextareaComponent = defineVxeComponent({
40539
40647
  $xeForm.triggerItemEvent(evnt, formItemInfo.itemConfig.field, value);
40540
40648
  }
40541
40649
  }
40542
- $xeTextarea.dispatchEvent('input', { value }, evnt);
40650
+ dispatchEvent('input', { value }, evnt);
40543
40651
  handleResize();
40544
40652
  };
40545
40653
  const changeEvent = (evnt) => {
@@ -40550,7 +40658,7 @@ var VxeTextareaComponent = defineVxeComponent({
40550
40658
  else {
40551
40659
  handleChange(reactData.inputValue, evnt);
40552
40660
  }
40553
- $xeTextarea.dispatchEvent('lazy-change', { value: reactData.inputValue }, evnt);
40661
+ dispatchEvent('lazy-change', { value: reactData.inputValue }, evnt);
40554
40662
  };
40555
40663
  const blurEvent = (evnt) => {
40556
40664
  const { immediate } = props;
@@ -40558,12 +40666,10 @@ var VxeTextareaComponent = defineVxeComponent({
40558
40666
  if (!immediate) {
40559
40667
  handleChange(inputValue, evnt);
40560
40668
  }
40561
- $xeTextarea.dispatchEvent('blur', { value: inputValue }, evnt);
40669
+ dispatchEvent('blur', { value: inputValue }, evnt);
40562
40670
  };
40563
- textareaMethods = {
40564
- dispatchEvent(type, params, evnt) {
40565
- emit(type, createEvent(evnt, { $textarea: $xeTextarea }, params));
40566
- },
40671
+ const textareaMethods = {
40672
+ dispatchEvent,
40567
40673
  focus() {
40568
40674
  const textElem = refTextarea.value;
40569
40675
  textElem.focus();
@@ -40613,7 +40719,6 @@ var VxeTextareaComponent = defineVxeComponent({
40613
40719
  h('textarea', {
40614
40720
  ref: refTextarea,
40615
40721
  class: 'vxe-textarea--inner' + (inputClassName ? (' ' + inputClassName) : ''),
40616
- value: inputValue,
40617
40722
  name: props.name,
40618
40723
  placeholder: inpPlaceholder,
40619
40724
  maxlength: inpMaxLength,
@@ -40664,6 +40769,22 @@ var VxeTextareaComponent = defineVxeComponent({
40664
40769
  updateAutoTxt();
40665
40770
  handleResize();
40666
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
+ });
40667
40788
  nextTick(() => {
40668
40789
  const { autosize, autoSize } = props;
40669
40790
  if (autosize) {