vxe-pc-ui 4.18.2 → 4.18.4

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 (96) hide show
  1. package/dist/all.esm.js +129 -28
  2. package/dist/style.css +1 -1
  3. package/dist/style.min.css +1 -1
  4. package/es/button/src/button.js +11 -3
  5. package/es/button/style.css +1 -4
  6. package/es/button/style.min.css +1 -1
  7. package/es/color-picker/src/color-picker.js +14 -3
  8. package/es/date-picker/src/date-picker.js +12 -1
  9. package/es/date-range-picker/src/date-range-picker.js +12 -1
  10. package/es/icon/style.css +1 -1
  11. package/es/icon-picker/src/icon-picker.js +17 -6
  12. package/es/input/src/input.js +12 -1
  13. package/es/modal/src/modal.js +1 -1
  14. package/es/number-input/src/number-input.js +12 -1
  15. package/es/password-input/src/password-input.js +12 -0
  16. package/es/select/src/select.js +19 -8
  17. package/es/space/src/space.js +8 -4
  18. package/es/style.css +1 -1
  19. package/es/style.min.css +1 -1
  20. package/es/ui/index.js +3 -2
  21. package/es/ui/src/log.js +1 -1
  22. package/es/vxe-button/style.css +1 -4
  23. package/es/vxe-button/style.min.css +1 -1
  24. package/lib/button/src/button.js +12 -2
  25. package/lib/button/src/button.min.js +1 -1
  26. package/lib/button/style/style.css +1 -4
  27. package/lib/button/style/style.min.css +1 -1
  28. package/lib/color-picker/src/color-picker.js +18 -5
  29. package/lib/color-picker/src/color-picker.min.js +1 -1
  30. package/lib/date-picker/src/date-picker.js +13 -0
  31. package/lib/date-picker/src/date-picker.min.js +1 -1
  32. package/lib/date-range-picker/src/date-range-picker.js +13 -0
  33. package/lib/date-range-picker/src/date-range-picker.min.js +1 -1
  34. package/lib/icon/style/style.css +1 -1
  35. package/lib/icon/style/style.min.css +1 -1
  36. package/lib/icon-picker/src/icon-picker.js +21 -8
  37. package/lib/icon-picker/src/icon-picker.min.js +1 -1
  38. package/lib/index.umd.js +154 -33
  39. package/lib/index.umd.min.js +1 -1
  40. package/lib/input/src/input.js +13 -0
  41. package/lib/input/src/input.min.js +1 -1
  42. package/lib/modal/src/modal.js +1 -1
  43. package/lib/modal/src/modal.min.js +1 -1
  44. package/lib/number-input/src/number-input.js +13 -0
  45. package/lib/number-input/src/number-input.min.js +1 -1
  46. package/lib/password-input/src/password-input.js +14 -0
  47. package/lib/password-input/src/password-input.min.js +1 -1
  48. package/lib/select/src/select.js +23 -10
  49. package/lib/select/src/select.min.js +1 -1
  50. package/lib/space/src/space.js +9 -4
  51. package/lib/space/src/space.min.js +1 -1
  52. package/lib/style.css +1 -1
  53. package/lib/style.min.css +1 -1
  54. package/lib/ui/index.js +3 -2
  55. package/lib/ui/index.min.js +1 -1
  56. package/lib/ui/src/log.js +1 -1
  57. package/lib/ui/src/log.min.js +1 -1
  58. package/lib/vxe-button/style/style.css +1 -4
  59. package/lib/vxe-button/style/style.min.css +1 -1
  60. package/package.json +1 -1
  61. package/packages/button/src/button.ts +12 -4
  62. package/packages/color-picker/src/color-picker.ts +16 -4
  63. package/packages/date-picker/src/date-picker.ts +14 -2
  64. package/packages/date-range-picker/src/date-range-picker.ts +14 -2
  65. package/packages/icon-picker/src/icon-picker.ts +18 -6
  66. package/packages/input/src/input.ts +13 -1
  67. package/packages/modal/src/modal.ts +1 -1
  68. package/packages/number-input/src/number-input.ts +14 -2
  69. package/packages/password-input/src/password-input.ts +14 -1
  70. package/packages/select/src/select.ts +20 -8
  71. package/packages/space/src/space.ts +8 -4
  72. package/packages/ui/index.ts +2 -1
  73. package/styles/components/button.scss +1 -4
  74. package/types/components/button.d.ts +5 -0
  75. package/types/components/color-picker.d.ts +2 -0
  76. package/types/components/date-picker.d.ts +2 -0
  77. package/types/components/date-range-picker.d.ts +2 -0
  78. package/types/components/icon-picker.d.ts +2 -0
  79. package/types/components/input.d.ts +5 -0
  80. package/types/components/number-input.d.ts +5 -0
  81. package/types/components/password-input.d.ts +5 -0
  82. package/types/components/select.d.ts +5 -0
  83. package/types/components/space.d.ts +5 -0
  84. package/types/ui/global-icon.d.ts +2 -1
  85. /package/es/icon/{iconfont.1788693917694.ttf → iconfont.1788753701809.ttf} +0 -0
  86. /package/es/icon/{iconfont.1788693917694.woff → iconfont.1788753701809.woff} +0 -0
  87. /package/es/icon/{iconfont.1788693917694.woff2 → iconfont.1788753701809.woff2} +0 -0
  88. /package/es/{iconfont.1788693917694.ttf → iconfont.1788753701809.ttf} +0 -0
  89. /package/es/{iconfont.1788693917694.woff → iconfont.1788753701809.woff} +0 -0
  90. /package/es/{iconfont.1788693917694.woff2 → iconfont.1788753701809.woff2} +0 -0
  91. /package/lib/icon/style/{iconfont.1788693917694.ttf → iconfont.1788753701809.ttf} +0 -0
  92. /package/lib/icon/style/{iconfont.1788693917694.woff → iconfont.1788753701809.woff} +0 -0
  93. /package/lib/icon/style/{iconfont.1788693917694.woff2 → iconfont.1788753701809.woff2} +0 -0
  94. /package/lib/{iconfont.1788693917694.ttf → iconfont.1788753701809.ttf} +0 -0
  95. /package/lib/{iconfont.1788693917694.woff → iconfont.1788753701809.woff} +0 -0
  96. /package/lib/{iconfont.1788693917694.woff2 → iconfont.1788753701809.woff2} +0 -0
@@ -4,7 +4,7 @@ import XEUtils from 'xe-utils';
4
4
  import { VxeUI, getConfig, getIcon, getI18n, globalEvents, GLOBAL_EVENT_KEYS, createEvent, useSize, renderEmptyElement } from '../../ui';
5
5
  import { getFuncText, eqEmptyValue, isEnableConf, getText } from '../../ui/src/utils';
6
6
  import { createComponentLog } from '../../ui/src/log';
7
- import { hasClass, getEventTargetNode, hasControlKey } from '../../ui/src/dom';
7
+ import { hasClass, getEventTargetNode, hasControlKey, toCssUnit } from '../../ui/src/dom';
8
8
  import { getSlotVNs } from '../../ui/src/vn';
9
9
  import { handleNumber, toFloatValueFixed } from './util';
10
10
  const { errLog } = createComponentLog('number-input');
@@ -57,6 +57,7 @@ export default defineVxeComponent({
57
57
  type: String,
58
58
  default: () => getConfig().numberInput.inputClassName
59
59
  },
60
+ width: [String, Number],
60
61
  size: {
61
62
  type: String,
62
63
  default: () => getConfig().numberInput.size || getConfig().size
@@ -324,6 +325,14 @@ export default defineVxeComponent({
324
325
  const { inputClassName } = props;
325
326
  return 'vxe-number-input--input' + (inputClassName ? (' ' + inputClassName) : '');
326
327
  });
328
+ const computeCurrStyle = computed(() => {
329
+ const { width } = props;
330
+ const stys = {};
331
+ if (width) {
332
+ stys.width = toCssUnit(width);
333
+ }
334
+ return stys;
335
+ });
327
336
  const refMaps = {
328
337
  refElem,
329
338
  refInput: refInputTarget
@@ -1065,6 +1074,7 @@ export default defineVxeComponent({
1065
1074
  class: ['vxe-number-input--readonly', `type--${type}`, className]
1066
1075
  }, numLabel);
1067
1076
  }
1077
+ const currStyle = computeCurrStyle.value;
1068
1078
  const inputReadonly = computeInputReadonly.value;
1069
1079
  const isClearable = computeIsClearable.value;
1070
1080
  const isControls = isEnableConf(controlOpts) && (controls === false ? controls : showButton);
@@ -1080,6 +1090,7 @@ export default defineVxeComponent({
1080
1090
  'is--active': isActivated,
1081
1091
  'show--clear': isClearable && !isDisabled && !(inputValue === '' || XEUtils.eqNull(inputValue))
1082
1092
  }],
1093
+ style: currStyle,
1083
1094
  spellcheck: false,
1084
1095
  onMouseenter: mouseenterEvent,
1085
1096
  onMouseleave: mouseleaveEvent
@@ -4,6 +4,7 @@ import XEUtils from 'xe-utils';
4
4
  import { getConfig, getIcon, getI18n, createEvent, useSize, renderEmptyElement } from '../../ui';
5
5
  import { getFuncText, getText } from '../../ui/src/utils';
6
6
  import { getSlotVNs } from '../../ui/src/vn';
7
+ import { toCssUnit } from '../../ui/src/dom';
7
8
  export default defineVxeComponent({
8
9
  name: 'VxePasswordInput',
9
10
  props: {
@@ -38,6 +39,7 @@ export default defineVxeComponent({
38
39
  type: String,
39
40
  default: () => getConfig().passwordInput.inputClassName
40
41
  },
42
+ width: [String, Number],
41
43
  size: {
42
44
  type: String,
43
45
  default: () => getConfig().passwordInput.size || getConfig().size
@@ -152,6 +154,14 @@ export default defineVxeComponent({
152
154
  const { inputValue } = reactData;
153
155
  return inputValue;
154
156
  });
157
+ const computeCurrStyle = computed(() => {
158
+ const { width } = props;
159
+ const stys = {};
160
+ if (width) {
161
+ stys.width = toCssUnit(width);
162
+ }
163
+ return stys;
164
+ });
155
165
  const dispatchEvent = (type, params, evnt) => {
156
166
  emit(type, createEvent(evnt, { $passwordInput: $xePasswordInput }, params));
157
167
  };
@@ -349,6 +359,7 @@ export default defineVxeComponent({
349
359
  class: ['vxe-password-input--readonly', className]
350
360
  }, getText(inputValue));
351
361
  }
362
+ const currStyle = computeCurrStyle.value;
352
363
  const vSize = computeSize.value;
353
364
  const inputType = computeInputType.value;
354
365
  const inpPlaceholder = computeInpPlaceholder.value;
@@ -368,6 +379,7 @@ export default defineVxeComponent({
368
379
  'is--active': isActivated,
369
380
  'show--clear': isClearable && !isDisabled && !(inputValue === '' || XEUtils.eqNull(inputValue))
370
381
  }],
382
+ style: currStyle,
371
383
  spellcheck: false
372
384
  }, [
373
385
  prefix || renderEmptyElement($xePasswordInput),
@@ -105,6 +105,7 @@ export default defineVxeComponent({
105
105
  * @deprecated
106
106
  */
107
107
  popupClassName: [String, Function],
108
+ width: [String, Number],
108
109
  max: {
109
110
  type: [String, Number],
110
111
  default: null
@@ -330,6 +331,14 @@ export default defineVxeComponent({
330
331
  const computeMultiMaxCharNum = computed(() => {
331
332
  return XEUtils.toNumber(props.multiCharOverflow);
332
333
  });
334
+ const computeCurrStyle = computed(() => {
335
+ const { width } = props;
336
+ const stys = {};
337
+ if (width) {
338
+ stys.width = toCssUnit(width);
339
+ }
340
+ return stys;
341
+ });
333
342
  const computePopupWrapperStyle = computed(() => {
334
343
  const popupOpts = computePopupOpts.value;
335
344
  const { height, width } = popupOpts;
@@ -1511,14 +1520,7 @@ export default defineVxeComponent({
1511
1520
  const btnTransfer = computeBtnTransfer.value;
1512
1521
  const formReadonly = computeFormReadonly.value;
1513
1522
  const inpPlaceholder = computeInpPlaceholder.value;
1514
- const popupWrapperStyle = computePopupWrapperStyle.value;
1515
- const popupOpts = computePopupOpts.value;
1516
- const { appendTo } = popupOpts;
1517
1523
  const defaultSlot = slots.default;
1518
- const headerSlot = slots.header;
1519
- const footerSlot = slots.footer;
1520
- const prefixSlot = slots.prefix;
1521
- const ppClassName = popupOpts.className || props.popupClassName;
1522
1524
  if (formReadonly) {
1523
1525
  return h('div', {
1524
1526
  ref: refElem,
@@ -1534,7 +1536,15 @@ export default defineVxeComponent({
1534
1536
  }, selectLabel)
1535
1537
  ]);
1536
1538
  }
1539
+ const currStyle = computeCurrStyle.value;
1537
1540
  const selectVals = computeSelectVals.value;
1541
+ const popupWrapperStyle = computePopupWrapperStyle.value;
1542
+ const popupOpts = computePopupOpts.value;
1543
+ const headerSlot = slots.header;
1544
+ const footerSlot = slots.footer;
1545
+ const prefixSlot = slots.prefix;
1546
+ const { appendTo } = popupOpts;
1547
+ const ppClassName = popupOpts.className || props.popupClassName;
1538
1548
  return h('div', {
1539
1549
  ref: refElem,
1540
1550
  class: ['vxe-select', className ? (XEUtils.isFunction(className) ? className({ $select: $xeSelect }) : className) : '', {
@@ -1544,7 +1554,8 @@ export default defineVxeComponent({
1544
1554
  'is--filter': filterable,
1545
1555
  'is--loading': loading,
1546
1556
  'is--active': isActivated
1547
- }]
1557
+ }],
1558
+ style: currStyle
1548
1559
  }, [
1549
1560
  h('div', {
1550
1561
  class: 'vxe-select-slots',
@@ -15,6 +15,7 @@ export default defineVxeComponent({
15
15
  type: Boolean,
16
16
  default: () => getConfig().space.wrap
17
17
  },
18
+ width: [Number, String],
18
19
  gap: {
19
20
  type: [Number, String, Array, Object],
20
21
  default: () => getConfig().space.gap
@@ -72,8 +73,8 @@ export default defineVxeComponent({
72
73
  const refMaps = {
73
74
  refElem
74
75
  };
75
- const computeWrapperStyle = computed(() => {
76
- const { align, gap } = props;
76
+ const computeCurrStyle = computed(() => {
77
+ const { align, gap, width } = props;
77
78
  const stys = {};
78
79
  let rowGap = '';
79
80
  let columGap = '';
@@ -91,6 +92,9 @@ export default defineVxeComponent({
91
92
  columGap = gap.columGap || '';
92
93
  }
93
94
  }
95
+ if (width) {
96
+ stys.width = toCssUnit(width);
97
+ }
94
98
  if (align) {
95
99
  stys['align-items'] = align;
96
100
  }
@@ -158,7 +162,7 @@ export default defineVxeComponent({
158
162
  };
159
163
  const renderVN = () => {
160
164
  const { vertical, wrap, className, fill, itemWidth, itemMinWidth, itemMaxWidth } = props;
161
- const wrapperStyle = computeWrapperStyle.value;
165
+ const currStyle = computeCurrStyle.value;
162
166
  const vSize = computeSize.value;
163
167
  return h('div', {
164
168
  ref: refElem,
@@ -169,7 +173,7 @@ export default defineVxeComponent({
169
173
  'is--fill': fill,
170
174
  'is--width': itemWidth || itemMinWidth || itemMaxWidth
171
175
  }],
172
- style: wrapperStyle
176
+ style: currStyle
173
177
  }, renderItems());
174
178
  };
175
179
  $xeSpace.renderVN = renderVN;