vxe-pc-ui 4.17.25 → 4.17.26

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 (77) hide show
  1. package/dist/all.esm.js +70 -42
  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 +12 -8
  6. package/es/input/style.css +13 -2
  7. package/es/input/style.min.css +1 -1
  8. package/es/number-input/src/number-input.js +29 -19
  9. package/es/number-input/style.css +13 -3
  10. package/es/number-input/style.min.css +1 -1
  11. package/es/password-input/src/password-input.js +13 -9
  12. package/es/password-input/style.css +13 -2
  13. package/es/password-input/style.min.css +1 -1
  14. package/es/style.css +1 -1
  15. package/es/style.min.css +1 -1
  16. package/es/tooltip/src/tooltip.js +15 -5
  17. package/es/ui/index.js +1 -1
  18. package/es/ui/src/log.js +1 -1
  19. package/es/vxe-input/style.css +13 -2
  20. package/es/vxe-input/style.min.css +1 -1
  21. package/es/vxe-number-input/style.css +13 -3
  22. package/es/vxe-number-input/style.min.css +1 -1
  23. package/es/vxe-password-input/style.css +13 -2
  24. package/es/vxe-password-input/style.min.css +1 -1
  25. package/lib/icon/style/style.css +1 -1
  26. package/lib/icon/style/style.min.css +1 -1
  27. package/lib/index.umd.js +62 -26
  28. package/lib/index.umd.min.js +1 -1
  29. package/lib/input/src/input.js +9 -4
  30. package/lib/input/src/input.min.js +1 -1
  31. package/lib/input/style/style.css +13 -2
  32. package/lib/input/style/style.min.css +1 -1
  33. package/lib/number-input/src/number-input.js +29 -13
  34. package/lib/number-input/src/number-input.min.js +1 -1
  35. package/lib/number-input/style/style.css +13 -3
  36. package/lib/number-input/style/style.min.css +1 -1
  37. package/lib/password-input/src/password-input.js +9 -4
  38. package/lib/password-input/src/password-input.min.js +1 -1
  39. package/lib/password-input/style/style.css +13 -2
  40. package/lib/password-input/style/style.min.css +1 -1
  41. package/lib/style.css +1 -1
  42. package/lib/style.min.css +1 -1
  43. package/lib/tooltip/src/tooltip.js +13 -3
  44. package/lib/tooltip/src/tooltip.min.js +1 -1
  45. package/lib/ui/index.js +1 -1
  46. package/lib/ui/index.min.js +1 -1
  47. package/lib/ui/src/log.js +1 -1
  48. package/lib/ui/src/log.min.js +1 -1
  49. package/lib/vxe-input/style/style.css +13 -2
  50. package/lib/vxe-input/style/style.min.css +1 -1
  51. package/lib/vxe-number-input/style/style.css +13 -3
  52. package/lib/vxe-number-input/style/style.min.css +1 -1
  53. package/lib/vxe-password-input/style/style.css +13 -2
  54. package/lib/vxe-password-input/style/style.min.css +1 -1
  55. package/package.json +1 -1
  56. package/packages/input/src/input.ts +12 -8
  57. package/packages/number-input/src/number-input.ts +31 -19
  58. package/packages/password-input/src/password-input.ts +13 -9
  59. package/packages/tooltip/src/tooltip.ts +17 -6
  60. package/styles/components/input.scss +20 -2
  61. package/styles/components/number-input.scss +20 -3
  62. package/styles/components/password-input.scss +20 -2
  63. package/types/components/input.d.ts +2 -0
  64. package/types/components/number-input.d.ts +6 -2
  65. package/types/components/password-input.d.ts +3 -1
  66. /package/es/icon/{iconfont.1788311145245.ttf → iconfont.1788319620112.ttf} +0 -0
  67. /package/es/icon/{iconfont.1788311145245.woff → iconfont.1788319620112.woff} +0 -0
  68. /package/es/icon/{iconfont.1788311145245.woff2 → iconfont.1788319620112.woff2} +0 -0
  69. /package/es/{iconfont.1788311145245.ttf → iconfont.1788319620112.ttf} +0 -0
  70. /package/es/{iconfont.1788311145245.woff → iconfont.1788319620112.woff} +0 -0
  71. /package/es/{iconfont.1788311145245.woff2 → iconfont.1788319620112.woff2} +0 -0
  72. /package/lib/icon/style/{iconfont.1788311145245.ttf → iconfont.1788319620112.ttf} +0 -0
  73. /package/lib/icon/style/{iconfont.1788311145245.woff → iconfont.1788319620112.woff} +0 -0
  74. /package/lib/icon/style/{iconfont.1788311145245.woff2 → iconfont.1788319620112.woff2} +0 -0
  75. /package/lib/{iconfont.1788311145245.ttf → iconfont.1788319620112.ttf} +0 -0
  76. /package/lib/{iconfont.1788311145245.woff → iconfont.1788319620112.woff} +0 -0
  77. /package/lib/{iconfont.1788311145245.woff2 → iconfont.1788319620112.woff2} +0 -0
package/dist/all.esm.js CHANGED
@@ -1,5 +1,5 @@
1
1
  import * as core from '@vxe-ui/core';
2
- import { VxeUI, setConfig as setConfig$1, setIcon, getConfig as getConfig$3, createEvent, getIcon as getIcon$2, renderEmptyElement, useSize, usePermission, permission, globalEvents, renderer, getI18n as getI18n$2, globalResize, menus as menus$3, GLOBAL_EVENT_KEYS, getSlotVNs as getSlotVNs$1, commands, formats, getComponent, validators } from '@vxe-ui/core';
2
+ import { VxeUI, setConfig as setConfig$1, setIcon, getConfig as getConfig$3, createEvent, getIcon as getIcon$2, renderEmptyElement, useSize, globalEvents, usePermission, permission, renderer, getI18n as getI18n$2, globalResize, menus as menus$3, GLOBAL_EVENT_KEYS, getSlotVNs as getSlotVNs$1, commands, formats, getComponent, validators } from '@vxe-ui/core';
3
3
  export * from '@vxe-ui/core';
4
4
  import { defineComponent, ref, reactive, h, createCommentVNode, createApp, inject, computed, watch, onMounted, onUnmounted, provide, nextTick, onBeforeUnmount, resolveComponent, Teleport, onActivated, onDeactivated, TransitionGroup } from 'vue';
5
5
  import XEUtils from 'xe-utils';
@@ -101,7 +101,7 @@ function checkDynamic() {
101
101
  }
102
102
 
103
103
  const { log } = VxeUI;
104
- const uiVersion = `ui v${"4.17.25"}`;
104
+ const uiVersion = `ui v${"4.17.26"}`;
105
105
  function createComponentLog(name) {
106
106
  const tableVersion = VxeUI.tableVersion ? `table v${VxeUI.tableVersion}` : '';
107
107
  const ganttVersion = VxeUI.ganttVersion ? `gantt v${VxeUI.ganttVersion}` : '';
@@ -115,7 +115,7 @@ function createComponentLog(name) {
115
115
  const warnLog$i = log.create('warn', uiVersion);
116
116
  log.create('error', uiVersion);
117
117
 
118
- const version = "4.17.25";
118
+ const version = "4.17.26";
119
119
  VxeUI.uiVersion = version;
120
120
  VxeUI.dynamicApp = dynamicApp;
121
121
  function config(options) {
@@ -2889,7 +2889,7 @@ var VxeTooltipComponent = defineVxeComponent({
2889
2889
  tipStore.placement = 'top';
2890
2890
  tipStore.style = { width: 'auto', left: 0, top: 0, zIndex: props.zIndex || reactData.tipZindex };
2891
2891
  tipStore.arrowStyle = { left: '50%' };
2892
- return tooltipMethods.updatePlacement();
2892
+ return $xeTooltip.updatePlacement();
2893
2893
  };
2894
2894
  const handleDelayFn = () => {
2895
2895
  internalData.showDelayTip = XEUtils.debounce(() => {
@@ -3029,6 +3029,14 @@ var VxeTooltipComponent = defineVxeComponent({
3029
3029
  const wheelEvent = (evnt) => {
3030
3030
  evnt.stopPropagation();
3031
3031
  };
3032
+ const handleGlobalScrollEvent = () => {
3033
+ if (reactData.visible) {
3034
+ $xeTooltip.updatePlacement();
3035
+ }
3036
+ };
3037
+ const handleGlobalBlurEvent = () => {
3038
+ $xeTooltip.close();
3039
+ };
3032
3040
  const tooltipPrivateMethods = {
3033
3041
  handleCloseEvent: targetMouseleaveEvent
3034
3042
  };
@@ -3151,6 +3159,8 @@ var VxeTooltipComponent = defineVxeComponent({
3151
3159
  }
3152
3160
  }
3153
3161
  });
3162
+ globalEvents.on($xeTooltip, 'blur', handleGlobalBlurEvent);
3163
+ globalEvents.on($xeTooltip, 'scroll', handleGlobalScrollEvent);
3154
3164
  });
3155
3165
  onBeforeUnmount(() => {
3156
3166
  const { target } = reactData;
@@ -3170,8 +3180,8 @@ var VxeTooltipComponent = defineVxeComponent({
3170
3180
  parentNode.removeChild(panelElem);
3171
3181
  }
3172
3182
  }
3173
- });
3174
- onUnmounted(() => {
3183
+ globalEvents.off($xeTooltip, 'blur');
3184
+ globalEvents.off($xeTooltip, 'scroll');
3175
3185
  XEUtils.assign(reactData, createReactData$n());
3176
3186
  XEUtils.assign(internalData, createInternalData$m());
3177
3187
  });
@@ -9172,6 +9182,10 @@ var VxeInputComponent = defineVxeComponent({
9172
9182
  type: String,
9173
9183
  default: () => getConfig$3().input.floatContent
9174
9184
  },
9185
+ floatAlign: {
9186
+ type: String,
9187
+ default: () => getConfig$3().input.floatAlign
9188
+ },
9175
9189
  maxLength: {
9176
9190
  type: [String, Number],
9177
9191
  default: () => getConfig$3().input.maxLength
@@ -11701,7 +11715,7 @@ var VxeInputComponent = defineVxeComponent({
11701
11715
  return createCommentVNode();
11702
11716
  };
11703
11717
  const renderVN = () => {
11704
- const { className, inputClassName, controls, type, title, floatContent, align, showWordCount, countMethod, name, autoComplete, autocomplete } = props;
11718
+ const { className, inputClassName, controls, type, title, floatContent, align, showWordCount, countMethod, name, autoComplete, autocomplete, floatAlign } = props;
11705
11719
  const { inputValue, visiblePanel, isActivated } = reactData;
11706
11720
  const vSize = computeSize.value;
11707
11721
  const isDisabled = computeIsDisabled.value;
@@ -11725,7 +11739,7 @@ var VxeInputComponent = defineVxeComponent({
11725
11739
  const floatSlot = slots.float;
11726
11740
  return h('div', {
11727
11741
  ref: refElem,
11728
- class: ['vxe-input', `type--${type}`, className, {
11742
+ class: ['vxe-input', `type--${type}`, floatContent ? (`fla--${floatAlign || 'center'}`) : '', className, {
11729
11743
  [`size--${vSize}`]: vSize,
11730
11744
  [`is--${align}`]: align,
11731
11745
  'is--controls': controls,
@@ -11762,14 +11776,14 @@ var VxeInputComponent = defineVxeComponent({
11762
11776
  onChange: changeEvent,
11763
11777
  onFocus: focusEvent,
11764
11778
  onBlur: blurEvent
11765
- })
11779
+ }),
11780
+ floatContent || floatSlot
11781
+ ? h('span', {
11782
+ class: 'vxe-input--float-wrapper'
11783
+ }, floatSlot ? floatSlot({}) : getText(floatContent))
11784
+ : renderEmptyElement($xeInput)
11766
11785
  ]),
11767
11786
  suffix || createCommentVNode(),
11768
- floatContent || floatSlot
11769
- ? h('span', {
11770
- class: 'vxe-input--float-wrapper'
11771
- }, floatSlot ? floatSlot({}) : getText(floatContent))
11772
- : renderEmptyElement($xeInput),
11773
11787
  // 下拉面板
11774
11788
  renderPanel(),
11775
11789
  // 字数统计
@@ -15288,6 +15302,10 @@ var VxeNumberInputComponent = defineVxeComponent({
15288
15302
  type: String,
15289
15303
  default: () => getConfig$3().numberInput.floatContent
15290
15304
  },
15305
+ floatAlign: {
15306
+ type: String,
15307
+ default: () => getConfig$3().numberInput.floatAlign
15308
+ },
15291
15309
  maxLength: {
15292
15310
  type: [String, Number],
15293
15311
  default: () => getConfig$3().numberInput.maxLength
@@ -15674,7 +15692,6 @@ var VxeNumberInputComponent = defineVxeComponent({
15674
15692
  reactData.inputValue = eqEmptyValue(inputValue) ? '' : `${XEUtils.toNumber(inputValue)}`;
15675
15693
  reactData.isFocus = true;
15676
15694
  reactData.isActivated = true;
15677
- handleShowTip();
15678
15695
  triggerEvent(evnt);
15679
15696
  }
15680
15697
  };
@@ -15813,13 +15830,11 @@ var VxeNumberInputComponent = defineVxeComponent({
15813
15830
  $xeForm.triggerItemEvent(evnt, formItemInfo.itemConfig.field, value);
15814
15831
  }
15815
15832
  };
15833
+ const mouseenterEvent = () => {
15834
+ handleShowTip();
15835
+ };
15816
15836
  const mouseleaveEvent = () => {
15817
- const { showTooltip } = props;
15818
- if (showTooltip) {
15819
- if (VxeUI.tooltip) {
15820
- VxeUI.tooltip.close();
15821
- }
15822
- }
15837
+ handleHideTip();
15823
15838
  };
15824
15839
  // 数值
15825
15840
  const numberChange = (isPlus, evnt) => {
@@ -15882,7 +15897,7 @@ var VxeNumberInputComponent = defineVxeComponent({
15882
15897
  }
15883
15898
  };
15884
15899
  const handleShowTip = () => {
15885
- const { showTooltip } = props;
15900
+ const { type, showTooltip } = props;
15886
15901
  const { inputValue } = reactData;
15887
15902
  if (showTooltip) {
15888
15903
  if (VxeUI.tooltip) {
@@ -15892,6 +15907,8 @@ var VxeNumberInputComponent = defineVxeComponent({
15892
15907
  const inputElem = refInputTarget.value;
15893
15908
  const content = getText(contentMethod
15894
15909
  ? contentMethod({
15910
+ $mumberInput: $xeNumberInput,
15911
+ type,
15895
15912
  inputValue: inputElem.value,
15896
15913
  value: inputValue || '',
15897
15914
  label: numLabel
@@ -15908,6 +15925,14 @@ var VxeNumberInputComponent = defineVxeComponent({
15908
15925
  }
15909
15926
  }
15910
15927
  };
15928
+ const handleHideTip = () => {
15929
+ const { showTooltip } = props;
15930
+ if (showTooltip) {
15931
+ if (VxeUI.tooltip) {
15932
+ VxeUI.tooltip.close();
15933
+ }
15934
+ }
15935
+ };
15911
15936
  const keydownEvent = (evnt) => {
15912
15937
  const { type, negative, exponential, controls } = props;
15913
15938
  const controlOpts = computeControlOpts.value;
@@ -16057,6 +16082,7 @@ var VxeNumberInputComponent = defineVxeComponent({
16057
16082
  handleChange(value, handleNumberString(inputValue), evnt);
16058
16083
  }
16059
16084
  afterCheckValue();
16085
+ handleHideTip();
16060
16086
  }
16061
16087
  }
16062
16088
  };
@@ -16223,7 +16249,8 @@ var VxeNumberInputComponent = defineVxeComponent({
16223
16249
  onChange: changeEvent,
16224
16250
  onFocus: focusEvent,
16225
16251
  onBlur: blurEvent
16226
- })
16252
+ }),
16253
+ renderFloat()
16227
16254
  ]),
16228
16255
  renderSuffixIcon()
16229
16256
  ]);
@@ -16286,7 +16313,7 @@ var VxeNumberInputComponent = defineVxeComponent({
16286
16313
  return renderEmptyElement($xeNumberInput);
16287
16314
  };
16288
16315
  const renderVN = () => {
16289
- const { className, controls, type, align, prefixIcon, suffixIcon } = props;
16316
+ const { className, controls, type, align, prefixIcon, suffixIcon, floatContent, floatAlign } = props;
16290
16317
  const { inputValue, isActivated } = reactData;
16291
16318
  const vSize = computeSize.value;
16292
16319
  const controlOpts = computeControlOpts.value;
@@ -16307,7 +16334,7 @@ var VxeNumberInputComponent = defineVxeComponent({
16307
16334
  const isControls = isEnableConf(controlOpts) && (controls === false ? controls : showButton);
16308
16335
  return h('div', {
16309
16336
  ref: refElem,
16310
- class: ['vxe-number-input', `type--${type}`, isControls ? (`ctl--${layout === 'right' || layout === 'left' ? layout : 'default'}`) : '', className, {
16337
+ class: ['vxe-number-input', `type--${type}`, isControls ? (`ctl--${layout === 'right' || layout === 'left' ? layout : 'default'}`) : '', floatContent ? (`fla--${floatAlign || 'center'}`) : '', className, {
16311
16338
  [`size--${vSize}`]: vSize,
16312
16339
  [`is--${align}`]: align,
16313
16340
  'is--controls': isControls && !inputReadonly,
@@ -16318,29 +16345,26 @@ var VxeNumberInputComponent = defineVxeComponent({
16318
16345
  'show--clear': isClearable && !isDisabled && !(inputValue === '' || XEUtils.eqNull(inputValue))
16319
16346
  }],
16320
16347
  spellcheck: false,
16348
+ onMouseenter: mouseenterEvent,
16321
16349
  onMouseleave: mouseleaveEvent
16322
16350
  }, isControls
16323
16351
  ? (layout === 'right'
16324
16352
  ? [
16325
16353
  renderInput(),
16326
- renderSideControl(),
16327
- renderFloat()
16354
+ renderSideControl()
16328
16355
  ]
16329
16356
  : (layout === 'left'
16330
16357
  ? [
16331
16358
  renderSideControl(),
16332
- renderInput(),
16333
- renderFloat()
16359
+ renderInput()
16334
16360
  ]
16335
16361
  : [
16336
16362
  renderMinusBtn(),
16337
16363
  renderInput(),
16338
- renderPlusBtn(),
16339
- renderFloat()
16364
+ renderPlusBtn()
16340
16365
  ]))
16341
16366
  : [
16342
- renderInput(),
16343
- renderFloat()
16367
+ renderInput()
16344
16368
  ]);
16345
16369
  };
16346
16370
  $xeNumberInput.renderVN = renderVN;
@@ -34068,6 +34092,10 @@ var VxePasswordInputComponent = defineVxeComponent({
34068
34092
  type: String,
34069
34093
  default: () => getConfig$3().passwordInput.floatContent
34070
34094
  },
34095
+ floatAlign: {
34096
+ type: String,
34097
+ default: () => getConfig$3().passwordInput.floatAlign
34098
+ },
34071
34099
  autoComplete: {
34072
34100
  type: String,
34073
34101
  default: 'off'
@@ -34378,7 +34406,7 @@ var VxePasswordInputComponent = defineVxeComponent({
34378
34406
  : null;
34379
34407
  };
34380
34408
  const renderVN = () => {
34381
- const { className, inputClassName, name, readonly, floatContent, autocomplete, autoComplete, maxLength } = props;
34409
+ const { className, inputClassName, name, readonly, floatContent, autocomplete, autoComplete, maxLength, floatAlign } = props;
34382
34410
  const { inputValue, isActivated } = reactData;
34383
34411
  const isDisabled = computeIsDisabled.value;
34384
34412
  const formReadonly = computeFormReadonly.value;
@@ -34398,7 +34426,7 @@ var VxePasswordInputComponent = defineVxeComponent({
34398
34426
  const floatSlot = slots.float;
34399
34427
  return h('div', {
34400
34428
  ref: refElem,
34401
- class: ['vxe-password-input', className, {
34429
+ class: ['vxe-password-input', floatContent ? (`fla--${floatAlign || 'center'}`) : '', className, {
34402
34430
  [`size--${vSize}`]: vSize,
34403
34431
  'is--prefix': !!prefix,
34404
34432
  'is--suffix': !!suffix,
@@ -34428,14 +34456,14 @@ var VxePasswordInputComponent = defineVxeComponent({
34428
34456
  onChange: changeEvent,
34429
34457
  onFocus: focusEvent,
34430
34458
  onBlur: blurEvent
34431
- })
34459
+ }),
34460
+ floatContent || floatSlot
34461
+ ? h('span', {
34462
+ class: 'vxe-password-input--float-wrapper'
34463
+ }, floatSlot ? floatSlot({}) : getText(floatContent))
34464
+ : renderEmptyElement($xePasswordInput)
34432
34465
  ]),
34433
- suffix || renderEmptyElement($xePasswordInput),
34434
- floatContent || floatSlot
34435
- ? h('span', {
34436
- class: 'vxe-password-input--float-wrapper'
34437
- }, floatSlot ? floatSlot({}) : getText(floatContent))
34438
- : renderEmptyElement($xePasswordInput)
34466
+ suffix || renderEmptyElement($xePasswordInput)
34439
34467
  ]);
34440
34468
  };
34441
34469
  watch(() => props.modelValue, (val) => {