vue-devui 1.6.4-select.0 → 1.6.5

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.
package/table/index.es.js CHANGED
@@ -1012,17 +1012,7 @@ const useDropdownEvent = ({ id, isOpen, origin, dropdownRef, props, emit }) => {
1012
1012
  onInvalidate(() => subscriptions.forEach((v) => v()));
1013
1013
  });
1014
1014
  };
1015
- function useDropdown(id, visible, isOpen, origin, dropdownRef, popDirection, emit) {
1016
- const calcPopDirection = (dropdownEl) => {
1017
- const elementHeight = dropdownEl.offsetHeight;
1018
- const bottomDistance = window.innerHeight - origin.value.getBoundingClientRect().bottom;
1019
- const isBottomEnough = bottomDistance >= elementHeight;
1020
- if (!isBottomEnough) {
1021
- popDirection.value = "top";
1022
- } else {
1023
- popDirection.value = "bottom";
1024
- }
1025
- };
1015
+ function useDropdown(id, visible, isOpen, origin, dropdownRef, emit) {
1026
1016
  watch(visible, (newVal, oldVal) => {
1027
1017
  if (oldVal === void 0) {
1028
1018
  return;
@@ -1046,9 +1036,6 @@ function useDropdown(id, visible, isOpen, origin, dropdownRef, popDirection, emi
1046
1036
  }
1047
1037
  }
1048
1038
  }
1049
- if (dropdownEl) {
1050
- calcPopDirection(dropdownEl);
1051
- }
1052
1039
  });
1053
1040
  onMounted(() => {
1054
1041
  dropdownMap.set(id, { toggleEl: origin.value });
@@ -1414,7 +1401,7 @@ var Dropdown = defineComponent({
1414
1401
  props,
1415
1402
  emit
1416
1403
  });
1417
- useDropdown(id, visible, isOpen, origin, dropdownRef, currentPosition, emit);
1404
+ useDropdown(id, visible, isOpen, origin, dropdownRef, emit);
1418
1405
  const {
1419
1406
  overlayModelValue,
1420
1407
  overlayShowValue,