vue-devui 1.6.36-alpha.0 → 1.6.36-alpha.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.
Files changed (67) hide show
  1. package/auto-complete/index.es.js +17 -0
  2. package/auto-complete/index.umd.js +17 -17
  3. package/breadcrumb/index.es.js +17 -0
  4. package/breadcrumb/index.umd.js +2 -2
  5. package/category-search/index.es.js +103 -16
  6. package/category-search/index.umd.js +23 -23
  7. package/checkbox/index.es.js +17 -0
  8. package/checkbox/index.umd.js +13 -13
  9. package/code-review/index.es.js +17 -0
  10. package/code-review/index.umd.js +16 -16
  11. package/data-grid/index.es.js +17 -0
  12. package/data-grid/index.umd.js +17 -17
  13. package/date-picker-pro/index.es.js +17 -0
  14. package/date-picker-pro/index.umd.js +18 -18
  15. package/dropdown/index.es.js +17 -0
  16. package/dropdown/index.umd.js +2 -2
  17. package/editable-select/index.es.js +17 -0
  18. package/editable-select/index.umd.js +12 -12
  19. package/editor-md/index.es.js +17 -0
  20. package/editor-md/index.umd.js +19 -19
  21. package/form/index.es.js +17 -0
  22. package/form/index.umd.js +20 -20
  23. package/input/index.es.js +17 -0
  24. package/input/index.umd.js +15 -15
  25. package/input-number/index.es.js +17 -0
  26. package/input-number/index.umd.js +20 -20
  27. package/mention/index.es.js +17 -0
  28. package/mention/index.umd.js +21 -21
  29. package/modal/index.es.js +17 -0
  30. package/modal/index.umd.js +2 -2
  31. package/overlay/index.es.js +17 -0
  32. package/overlay/index.umd.js +1 -1
  33. package/package.json +1 -1
  34. package/pagination/index.es.js +18 -2
  35. package/pagination/index.umd.js +16 -16
  36. package/popover/index.es.js +17 -0
  37. package/popover/index.umd.js +16 -16
  38. package/radio/index.es.js +17 -0
  39. package/radio/index.umd.js +20 -20
  40. package/search/index.es.js +17 -0
  41. package/search/index.umd.js +14 -14
  42. package/select/index.es.js +18 -2
  43. package/select/index.umd.js +15 -15
  44. package/splitter/index.es.js +17 -0
  45. package/splitter/index.umd.js +9 -9
  46. package/switch/index.es.js +17 -0
  47. package/switch/index.umd.js +20 -20
  48. package/table/index.es.js +17 -0
  49. package/table/index.umd.js +9 -9
  50. package/tag/index.es.js +1 -2
  51. package/tag/index.umd.js +1 -1
  52. package/textarea/index.es.js +17 -0
  53. package/textarea/index.umd.js +21 -21
  54. package/time-picker/index.es.js +17 -0
  55. package/time-picker/index.umd.js +18 -18
  56. package/time-select/index.es.js +18 -2
  57. package/time-select/index.umd.js +17 -17
  58. package/tooltip/index.es.js +17 -0
  59. package/tooltip/index.umd.js +12 -12
  60. package/tree/index.es.js +17 -0
  61. package/tree/index.umd.js +13 -13
  62. package/types/category-search/src/category-search-types.d.ts +11 -0
  63. package/types/category-search/src/composables/use-category-selected-tags.d.ts +15 -0
  64. package/types/overlay/src/flexible-overlay/flexible-overlay-types.d.ts +4 -0
  65. package/types/overlay/src/flexible-overlay/index.d.ts +3 -0
  66. package/vue-devui.es.js +103 -16
  67. package/vue-devui.umd.js +71 -71
package/input/index.es.js CHANGED
@@ -6080,6 +6080,10 @@ const flexibleOverlayProps = {
6080
6080
  fitOriginWidth: {
6081
6081
  type: Boolean,
6082
6082
  default: false
6083
+ },
6084
+ autoUpdatePosition: {
6085
+ type: Boolean,
6086
+ default: false
6083
6087
  }
6084
6088
  };
6085
6089
  function adjustArrowPosition(isArrowCenter, point, placement, originRect) {
@@ -6107,6 +6111,7 @@ function useOverlay(props, emit) {
6107
6111
  const arrowRef = ref();
6108
6112
  const overlayWidth = ref(0);
6109
6113
  let originObserver;
6114
+ let overlayObserver;
6110
6115
  const styles = computed(() => {
6111
6116
  if (fitOriginWidth.value) {
6112
6117
  return { width: overlayWidth.value + "px" };
@@ -6177,6 +6182,15 @@ function useOverlay(props, emit) {
6177
6182
  const originEl = (_b = (_a = props.origin) == null ? void 0 : _a.$el) != null ? _b : props.origin;
6178
6183
  originEl && (originObserver == null ? void 0 : originObserver.unobserve(originEl));
6179
6184
  };
6185
+ const observeOverlay = () => {
6186
+ if (props.autoUpdatePosition && typeof window !== "undefined" && overlayRef.value) {
6187
+ overlayObserver = new window.ResizeObserver(updatePosition);
6188
+ overlayObserver.observe(overlayRef.value);
6189
+ }
6190
+ };
6191
+ const unobserveOverlay = () => {
6192
+ overlayRef.value && (overlayObserver == null ? void 0 : overlayObserver.unobserve(overlayRef.value));
6193
+ };
6180
6194
  watch(
6181
6195
  () => props.modelValue,
6182
6196
  () => {
@@ -6185,10 +6199,12 @@ function useOverlay(props, emit) {
6185
6199
  window.addEventListener("scroll", scrollCallback, true);
6186
6200
  window.addEventListener("resize", updatePosition);
6187
6201
  observeOrigin();
6202
+ nextTick(observeOverlay);
6188
6203
  } else {
6189
6204
  window.removeEventListener("scroll", scrollCallback, true);
6190
6205
  window.removeEventListener("resize", updatePosition);
6191
6206
  unobserveOrigin();
6207
+ unobserveOverlay();
6192
6208
  }
6193
6209
  }
6194
6210
  );
@@ -6196,6 +6212,7 @@ function useOverlay(props, emit) {
6196
6212
  window.removeEventListener("scroll", scrollCallback, true);
6197
6213
  window.removeEventListener("resize", updatePosition);
6198
6214
  unobserveOrigin();
6215
+ unobserveOverlay();
6199
6216
  });
6200
6217
  return { arrowRef, overlayRef, styles, updatePosition };
6201
6218
  }