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/breadcrumb/index.es.js +2 -15
- package/breadcrumb/index.umd.js +1 -1
- package/category-search/index.es.js +2 -15
- package/category-search/index.umd.js +10 -10
- package/data-grid/index.es.js +2 -15
- package/data-grid/index.umd.js +6 -6
- package/dropdown/index.es.js +2 -15
- package/dropdown/index.umd.js +1 -1
- package/editable-select/index.es.js +1 -1
- package/editable-select/index.umd.js +1 -1
- package/editor-md/index.es.js +2 -15
- package/editor-md/index.umd.js +9 -9
- package/package.json +1 -1
- package/pagination/index.es.js +2 -15
- package/pagination/index.umd.js +11 -11
- package/table/index.es.js +2 -15
- package/table/index.umd.js +6 -6
- package/types/dropdown/src/use-dropdown.d.ts +1 -1
- package/vue-devui.es.js +4 -17
- package/vue-devui.umd.js +3 -3
package/data-grid/index.es.js
CHANGED
|
@@ -8552,17 +8552,7 @@ const useDropdownEvent = ({ id, isOpen, origin, dropdownRef, props, emit }) => {
|
|
|
8552
8552
|
onInvalidate(() => subscriptions.forEach((v) => v()));
|
|
8553
8553
|
});
|
|
8554
8554
|
};
|
|
8555
|
-
function useDropdown(id, visible, isOpen, origin, dropdownRef,
|
|
8556
|
-
const calcPopDirection = (dropdownEl) => {
|
|
8557
|
-
const elementHeight = dropdownEl.offsetHeight;
|
|
8558
|
-
const bottomDistance = window.innerHeight - origin.value.getBoundingClientRect().bottom;
|
|
8559
|
-
const isBottomEnough = bottomDistance >= elementHeight;
|
|
8560
|
-
if (!isBottomEnough) {
|
|
8561
|
-
popDirection.value = "top";
|
|
8562
|
-
} else {
|
|
8563
|
-
popDirection.value = "bottom";
|
|
8564
|
-
}
|
|
8565
|
-
};
|
|
8555
|
+
function useDropdown(id, visible, isOpen, origin, dropdownRef, emit) {
|
|
8566
8556
|
watch(visible, (newVal, oldVal) => {
|
|
8567
8557
|
if (oldVal === void 0) {
|
|
8568
8558
|
return;
|
|
@@ -8586,9 +8576,6 @@ function useDropdown(id, visible, isOpen, origin, dropdownRef, popDirection, emi
|
|
|
8586
8576
|
}
|
|
8587
8577
|
}
|
|
8588
8578
|
}
|
|
8589
|
-
if (dropdownEl) {
|
|
8590
|
-
calcPopDirection(dropdownEl);
|
|
8591
|
-
}
|
|
8592
8579
|
});
|
|
8593
8580
|
onMounted(() => {
|
|
8594
8581
|
dropdownMap.set(id, { toggleEl: origin.value });
|
|
@@ -8657,7 +8644,7 @@ var Dropdown = defineComponent({
|
|
|
8657
8644
|
props,
|
|
8658
8645
|
emit
|
|
8659
8646
|
});
|
|
8660
|
-
useDropdown(id, visible, isOpen, origin, dropdownRef,
|
|
8647
|
+
useDropdown(id, visible, isOpen, origin, dropdownRef, emit);
|
|
8661
8648
|
const {
|
|
8662
8649
|
overlayModelValue,
|
|
8663
8650
|
overlayShowValue,
|