vxe-pc-ui 4.17.29 → 4.17.30

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 (69) hide show
  1. package/dist/all.esm.js +120 -11
  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/number-input/src/number-input.js +1 -1
  6. package/es/slider/src/slider.js +71 -2
  7. package/es/slider/style.css +1 -0
  8. package/es/slider/style.min.css +1 -1
  9. package/es/space/src/space.js +43 -5
  10. package/es/space/style.css +7 -0
  11. package/es/space/style.min.css +1 -1
  12. package/es/style.css +1 -1
  13. package/es/style.min.css +1 -1
  14. package/es/ui/index.js +5 -2
  15. package/es/ui/src/dom.js +1 -1
  16. package/es/ui/src/log.js +1 -1
  17. package/es/vxe-slider/style.css +1 -0
  18. package/es/vxe-slider/style.min.css +1 -1
  19. package/es/vxe-space/style.css +7 -0
  20. package/es/vxe-space/style.min.css +1 -1
  21. package/lib/icon/style/style.css +1 -1
  22. package/lib/icon/style/style.min.css +1 -1
  23. package/lib/index.umd.js +142 -11
  24. package/lib/index.umd.min.js +1 -1
  25. package/lib/number-input/src/number-input.js +1 -1
  26. package/lib/number-input/src/number-input.min.js +1 -1
  27. package/lib/slider/src/slider.js +82 -1
  28. package/lib/slider/src/slider.min.js +1 -1
  29. package/lib/slider/style/style.css +1 -0
  30. package/lib/slider/style/style.min.css +1 -1
  31. package/lib/space/src/space.js +51 -5
  32. package/lib/space/src/space.min.js +1 -1
  33. package/lib/space/style/style.css +7 -0
  34. package/lib/space/style/style.min.css +1 -1
  35. package/lib/style.css +1 -1
  36. package/lib/style.min.css +1 -1
  37. package/lib/ui/index.js +5 -2
  38. package/lib/ui/index.min.js +1 -1
  39. package/lib/ui/src/dom.js +1 -1
  40. package/lib/ui/src/dom.min.js +1 -1
  41. package/lib/ui/src/log.js +1 -1
  42. package/lib/ui/src/log.min.js +1 -1
  43. package/lib/vxe-slider/style/style.css +1 -0
  44. package/lib/vxe-slider/style/style.min.css +1 -1
  45. package/lib/vxe-space/style/style.css +7 -0
  46. package/lib/vxe-space/style/style.min.css +1 -1
  47. package/package.json +1 -1
  48. package/packages/number-input/src/number-input.ts +1 -1
  49. package/packages/slider/src/slider.ts +78 -2
  50. package/packages/space/src/space.ts +43 -5
  51. package/packages/ui/index.ts +4 -1
  52. package/packages/ui/src/dom.ts +1 -1
  53. package/styles/components/slider.scss +1 -0
  54. package/styles/components/space.scss +9 -0
  55. package/types/components/number-input.d.ts +1 -1
  56. package/types/components/slider.d.ts +12 -0
  57. package/types/components/space.d.ts +10 -0
  58. /package/es/icon/{iconfont.1788486194527.ttf → iconfont.1788500786360.ttf} +0 -0
  59. /package/es/icon/{iconfont.1788486194527.woff → iconfont.1788500786360.woff} +0 -0
  60. /package/es/icon/{iconfont.1788486194527.woff2 → iconfont.1788500786360.woff2} +0 -0
  61. /package/es/{iconfont.1788486194527.ttf → iconfont.1788500786360.ttf} +0 -0
  62. /package/es/{iconfont.1788486194527.woff → iconfont.1788500786360.woff} +0 -0
  63. /package/es/{iconfont.1788486194527.woff2 → iconfont.1788500786360.woff2} +0 -0
  64. /package/lib/icon/style/{iconfont.1788486194527.ttf → iconfont.1788500786360.ttf} +0 -0
  65. /package/lib/icon/style/{iconfont.1788486194527.woff → iconfont.1788500786360.woff} +0 -0
  66. /package/lib/icon/style/{iconfont.1788486194527.woff2 → iconfont.1788500786360.woff2} +0 -0
  67. /package/lib/{iconfont.1788486194527.ttf → iconfont.1788500786360.ttf} +0 -0
  68. /package/lib/{iconfont.1788486194527.woff → iconfont.1788500786360.woff} +0 -0
  69. /package/lib/{iconfont.1788486194527.woff2 → iconfont.1788500786360.woff2} +0 -0
package/dist/all.esm.js CHANGED
@@ -101,7 +101,7 @@ function checkDynamic() {
101
101
  }
102
102
 
103
103
  const { log } = VxeUI;
104
- const uiVersion = `ui v${"4.17.29"}`;
104
+ const uiVersion = `ui v${"4.17.30"}`;
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.29";
118
+ const version = "4.17.30";
119
119
  VxeUI.uiVersion = version;
120
120
  VxeUI.dynamicApp = dynamicApp;
121
121
  function config(options) {
@@ -495,7 +495,10 @@ setConfig$1({
495
495
  splitterPanel: {},
496
496
  slider: {
497
497
  max: 100,
498
- min: 0
498
+ min: 0,
499
+ tooltipConfig: {
500
+ enterDelay: 0
501
+ }
499
502
  },
500
503
  space: {},
501
504
  steps: {},
@@ -2037,7 +2040,7 @@ function updatePanelPlacement(targetElem, panelElem, options) {
2037
2040
  const targetTop = targetRect.top;
2038
2041
  minWidth = targetElem.offsetWidth;
2039
2042
  if (teleportTo) {
2040
- left = defaultLeft || (targetLeft);
2043
+ left = defaultLeft || (targetLeft - (panelWidth - targetWidth) / 2);
2041
2044
  top = defaultTop || (targetTop + targetHeight);
2042
2045
  if (placement === 'top') {
2043
2046
  panelPlacement = 'top';
@@ -15920,7 +15923,7 @@ var VxeNumberInputComponent = defineVxeComponent({
15920
15923
  const inputElem = refInputTarget.value;
15921
15924
  const content = getText(contentMethod
15922
15925
  ? contentMethod({
15923
- $mumberInput: $xeNumberInput,
15926
+ $numberInput: $xeNumberInput,
15924
15927
  type,
15925
15928
  inputValue: inputElem.value,
15926
15929
  value: inputValue || '',
@@ -38087,6 +38090,8 @@ const SplitPane = VxeSplitPane;
38087
38090
  function createInternalData$6() {
38088
38091
  return {
38089
38092
  // _isUp: false,
38093
+ isDragStatus: false,
38094
+ isBtnActive: false,
38090
38095
  currValue: 0,
38091
38096
  startValue: 0,
38092
38097
  endValue: 0
@@ -38133,7 +38138,12 @@ var VxeSliderComponent = defineVxeComponent({
38133
38138
  immediate: {
38134
38139
  type: Boolean,
38135
38140
  default: () => getConfig$3().slider.immediate
38136
- }
38141
+ },
38142
+ showTooltip: {
38143
+ type: Boolean,
38144
+ default: () => getConfig$3().slider.showTooltip
38145
+ },
38146
+ tooltipConfig: Object
38137
38147
  },
38138
38148
  emits: [
38139
38149
  'update:modelValue',
@@ -38190,6 +38200,9 @@ var VxeSliderComponent = defineVxeComponent({
38190
38200
  const { range, startValue, endValue } = props;
38191
38201
  return range ? `${startValue || ''}${endValue || ''}` : '';
38192
38202
  });
38203
+ const computeTooltipOpts = computed(() => {
38204
+ return Object.assign({}, getConfig$3().slider.tooltipConfig, props.tooltipConfig);
38205
+ });
38193
38206
  const computeMaps = {};
38194
38207
  const $xeSlider = {
38195
38208
  xID,
@@ -38342,6 +38355,38 @@ var VxeSliderComponent = defineVxeComponent({
38342
38355
  const raw = minNum + ratio * (maxNum - minNum);
38343
38356
  return Math.floor(raw);
38344
38357
  };
38358
+ const handleShowTip = (btnElem) => {
38359
+ const { showTooltip } = props;
38360
+ if (showTooltip) {
38361
+ if (VxeUI.tooltip) {
38362
+ const { currValue } = internalData;
38363
+ const tooltipOpts = computeTooltipOpts.value;
38364
+ const { contentMethod } = tooltipOpts;
38365
+ const content = getText(contentMethod
38366
+ ? contentMethod({
38367
+ $slider: $xeSlider,
38368
+ value: currValue
38369
+ })
38370
+ : '' + currValue);
38371
+ if (content) {
38372
+ VxeUI.tooltip.open(btnElem, Object.assign({}, Object.assign(Object.assign({}, tooltipOpts), { content }), {
38373
+ contentMethod: undefined
38374
+ }));
38375
+ }
38376
+ else {
38377
+ VxeUI.tooltip.close();
38378
+ }
38379
+ }
38380
+ }
38381
+ };
38382
+ const handleHideTip = () => {
38383
+ const { showTooltip } = props;
38384
+ if (showTooltip) {
38385
+ if (VxeUI.tooltip) {
38386
+ VxeUI.tooltip.close();
38387
+ }
38388
+ }
38389
+ };
38345
38390
  const handleBtnMousedownEvent = (evnt) => {
38346
38391
  const { range, immediate } = props;
38347
38392
  const btnElem = evnt.currentTarget;
@@ -38353,6 +38398,7 @@ var VxeSliderComponent = defineVxeComponent({
38353
38398
  evnt.preventDefault();
38354
38399
  const el = refElem.value;
38355
38400
  const barElem = refBarElem.value;
38401
+ internalData.isDragStatus = true;
38356
38402
  if (el && barElem) {
38357
38403
  const btnType = btnElem.getAttribute('data-type');
38358
38404
  const barRect = barElem.getBoundingClientRect();
@@ -38379,10 +38425,12 @@ var VxeSliderComponent = defineVxeComponent({
38379
38425
  changeEvent(evnt);
38380
38426
  }
38381
38427
  updateTrackStyle();
38428
+ handleShowTip(btnElem);
38382
38429
  };
38383
38430
  document.onmouseup = (evnt) => {
38384
38431
  document.onmousemove = null;
38385
38432
  document.onmouseup = null;
38433
+ internalData.isDragStatus = false;
38386
38434
  dispatchEvent('track-dragend', {
38387
38435
  currentValue: internalData.currValue,
38388
38436
  startValue: internalData.startValue,
@@ -38390,12 +38438,31 @@ var VxeSliderComponent = defineVxeComponent({
38390
38438
  }, evnt);
38391
38439
  changeEvent(evnt);
38392
38440
  updateTrackStyle();
38441
+ if (!internalData.isBtnActive) {
38442
+ handleHideTip();
38443
+ }
38393
38444
  };
38394
38445
  dispatchEvent('track-dragstart', {
38395
38446
  currentValue: internalData.currValue,
38396
38447
  startValue: internalData.startValue,
38397
38448
  endValue: internalData.endValue
38398
38449
  }, evnt);
38450
+ internalData.isDragStatus = false;
38451
+ }
38452
+ };
38453
+ const handleBtnMouseenterEvent = (evnt) => {
38454
+ const { startValue, endValue } = internalData;
38455
+ const btnElem = evnt.currentTarget;
38456
+ const btnType = btnElem.getAttribute('data-type');
38457
+ internalData.currValue = btnType === '1' ? startValue : endValue;
38458
+ internalData.isBtnActive = true;
38459
+ handleShowTip(btnElem);
38460
+ };
38461
+ const handleBtnMouseleaveEvent = () => {
38462
+ const { isDragStatus } = internalData;
38463
+ internalData.isBtnActive = false;
38464
+ if (!isDragStatus) {
38465
+ handleHideTip();
38399
38466
  }
38400
38467
  };
38401
38468
  const collapsePanePrivateMethods = {};
@@ -38431,6 +38498,8 @@ var VxeSliderComponent = defineVxeComponent({
38431
38498
  ref: refStartBtnElem,
38432
38499
  class: 'vxe-slider--bar-btn',
38433
38500
  'data-type': '1',
38501
+ onMouseenter: handleBtnMouseenterEvent,
38502
+ onMouseleave: handleBtnMouseleaveEvent,
38434
38503
  onMousedown: handleBtnMousedownEvent
38435
38504
  }),
38436
38505
  formReadonly
@@ -38439,6 +38508,8 @@ var VxeSliderComponent = defineVxeComponent({
38439
38508
  ref: refEndBtnElem,
38440
38509
  class: 'vxe-slider--bar-btn',
38441
38510
  'data-type': '2',
38511
+ onMouseenter: handleBtnMouseenterEvent,
38512
+ onMouseleave: handleBtnMouseleaveEvent,
38442
38513
  onMousedown: handleBtnMousedownEvent
38443
38514
  })
38444
38515
  ])
@@ -38514,6 +38585,26 @@ var VxeSpaceComponent = defineVxeComponent({
38514
38585
  align: {
38515
38586
  type: String,
38516
38587
  default: () => getConfig$3().space.align
38588
+ },
38589
+ fill: {
38590
+ type: Boolean,
38591
+ default: () => getConfig$3().space.fill
38592
+ },
38593
+ itemWidth: {
38594
+ type: [String, Number],
38595
+ default: () => getConfig$3().space.itemWidth
38596
+ },
38597
+ itemMinWidth: {
38598
+ type: [String, Number],
38599
+ default: () => getConfig$3().space.itemMinWidth
38600
+ },
38601
+ itemMaxWidth: {
38602
+ type: [String, Number],
38603
+ default: () => getConfig$3().space.itemMaxWidth
38604
+ },
38605
+ separatorWidth: {
38606
+ type: [String, Number],
38607
+ default: () => getConfig$3().space.separatorWidth
38517
38608
  }
38518
38609
  },
38519
38610
  emits: [],
@@ -38576,20 +38667,36 @@ var VxeSpaceComponent = defineVxeComponent({
38576
38667
  const spacePrivateMethods = {};
38577
38668
  Object.assign($xeSpace, spaceMethods, spacePrivateMethods);
38578
38669
  const renderItems = () => {
38579
- const { separator, itemClassName } = props;
38670
+ const { separator, itemClassName, itemWidth, itemMinWidth, itemMaxWidth, separatorWidth } = props;
38580
38671
  const itemVNs = [];
38581
38672
  const defaultSlot = slots.default;
38582
38673
  const separatorSlot = slots.separator;
38674
+ const srStys = {};
38675
+ if (separatorWidth) {
38676
+ srStys.width = toCssUnit(itemWidth);
38677
+ }
38678
+ const itemStys = {};
38679
+ if (itemWidth) {
38680
+ itemStys.width = toCssUnit(itemWidth);
38681
+ }
38682
+ if (itemMinWidth) {
38683
+ itemStys.minWidth = toCssUnit(itemMinWidth);
38684
+ }
38685
+ if (itemMaxWidth) {
38686
+ itemStys.maxWidth = toCssUnit(itemMaxWidth);
38687
+ }
38583
38688
  if (defaultSlot) {
38584
38689
  XEUtils.each(defaultSlot({}), (itemVN, index, items) => {
38585
38690
  itemVNs.push(h('div', {
38586
38691
  key: 'i' + index,
38587
- class: ['vxe-space--item', getPropClass(itemClassName, { index })]
38692
+ class: ['vxe-space--item', getPropClass(itemClassName, { index })],
38693
+ style: itemStys
38588
38694
  }, [itemVN]));
38589
38695
  if ((separator || separatorSlot) && index < items.length - 1) {
38590
38696
  itemVNs.push(h('div', {
38591
38697
  key: 's' + index,
38592
- class: 'vxe-space--separator'
38698
+ class: 'vxe-space--separator',
38699
+ style: srStys
38593
38700
  }, separatorSlot ? separatorSlot({}) : ('' + separator)));
38594
38701
  }
38595
38702
  });
@@ -38597,7 +38704,7 @@ var VxeSpaceComponent = defineVxeComponent({
38597
38704
  return itemVNs;
38598
38705
  };
38599
38706
  const renderVN = () => {
38600
- const { vertical, wrap, className } = props;
38707
+ const { vertical, wrap, className, fill, itemWidth, itemMinWidth, itemMaxWidth } = props;
38601
38708
  const wrapperStyle = computeWrapperStyle.value;
38602
38709
  const vSize = computeSize.value;
38603
38710
  return h('div', {
@@ -38605,7 +38712,9 @@ var VxeSpaceComponent = defineVxeComponent({
38605
38712
  class: ['vxe-space', getPropClass(className, {}), {
38606
38713
  [`size--${vSize}`]: vSize,
38607
38714
  'is--wrap': wrap,
38608
- 'is--vertical': vertical
38715
+ 'is--vertical': vertical,
38716
+ 'is--fill': fill,
38717
+ 'is--width': itemWidth || itemMinWidth || itemMaxWidth
38609
38718
  }],
38610
38719
  style: wrapperStyle
38611
38720
  }, renderItems());