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
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { Ref } from 'vue';
|
|
2
2
|
import { UseDropdownProps, EmitEvent, DropdownProps, UseOverlayFn } from './dropdown-types';
|
|
3
3
|
export declare const useDropdownEvent: ({ id, isOpen, origin, dropdownRef, props, emit }: UseDropdownProps) => void;
|
|
4
|
-
export declare function useDropdown(id: string, visible: Ref<boolean>, isOpen: Ref<boolean>, origin: Ref<HTMLElement | undefined>, dropdownRef: Ref<HTMLElement | undefined>,
|
|
4
|
+
export declare function useDropdown(id: string, visible: Ref<boolean>, isOpen: Ref<boolean>, origin: Ref<HTMLElement | undefined>, dropdownRef: Ref<HTMLElement | undefined>, emit: EmitEvent): void;
|
|
5
5
|
export declare function useOverlayProps(props: DropdownProps, currentPosition: Ref<string>, isOpen: Ref<boolean>): UseOverlayFn;
|
package/vue-devui.es.js
CHANGED
|
@@ -11427,17 +11427,7 @@ const useDropdownEvent = ({ id, isOpen, origin, dropdownRef, props, emit }) => {
|
|
|
11427
11427
|
onInvalidate(() => subscriptions.forEach((v) => v()));
|
|
11428
11428
|
});
|
|
11429
11429
|
};
|
|
11430
|
-
function useDropdown(id, visible, isOpen, origin, dropdownRef,
|
|
11431
|
-
const calcPopDirection = (dropdownEl) => {
|
|
11432
|
-
const elementHeight = dropdownEl.offsetHeight;
|
|
11433
|
-
const bottomDistance = window.innerHeight - origin.value.getBoundingClientRect().bottom;
|
|
11434
|
-
const isBottomEnough = bottomDistance >= elementHeight;
|
|
11435
|
-
if (!isBottomEnough) {
|
|
11436
|
-
popDirection.value = "top";
|
|
11437
|
-
} else {
|
|
11438
|
-
popDirection.value = "bottom";
|
|
11439
|
-
}
|
|
11440
|
-
};
|
|
11430
|
+
function useDropdown(id, visible, isOpen, origin, dropdownRef, emit) {
|
|
11441
11431
|
watch(visible, (newVal, oldVal) => {
|
|
11442
11432
|
if (oldVal === void 0) {
|
|
11443
11433
|
return;
|
|
@@ -11461,9 +11451,6 @@ function useDropdown(id, visible, isOpen, origin, dropdownRef, popDirection, emi
|
|
|
11461
11451
|
}
|
|
11462
11452
|
}
|
|
11463
11453
|
}
|
|
11464
|
-
if (dropdownEl) {
|
|
11465
|
-
calcPopDirection(dropdownEl);
|
|
11466
|
-
}
|
|
11467
11454
|
});
|
|
11468
11455
|
onMounted(() => {
|
|
11469
11456
|
dropdownMap.set(id, { toggleEl: origin.value });
|
|
@@ -11532,7 +11519,7 @@ var Dropdown$1 = defineComponent({
|
|
|
11532
11519
|
props,
|
|
11533
11520
|
emit
|
|
11534
11521
|
});
|
|
11535
|
-
useDropdown(id, visible, isOpen, origin, dropdownRef,
|
|
11522
|
+
useDropdown(id, visible, isOpen, origin, dropdownRef, emit);
|
|
11536
11523
|
const {
|
|
11537
11524
|
overlayModelValue,
|
|
11538
11525
|
overlayShowValue,
|
|
@@ -33668,7 +33655,7 @@ var Dropdown = defineComponent({
|
|
|
33668
33655
|
debounceLoadMore();
|
|
33669
33656
|
};
|
|
33670
33657
|
const renderOption = () => {
|
|
33671
|
-
if (props.options.length === 0) {
|
|
33658
|
+
if (props.options.length === 0 && !select2.loading.value) {
|
|
33672
33659
|
return createVNode("li", {
|
|
33673
33660
|
"class": ns2.em("item", "no-data-tip")
|
|
33674
33661
|
}, [slots.noResultItem ? slots.noResultItem() : emptyText.value]);
|
|
@@ -54201,7 +54188,7 @@ const installs = [
|
|
|
54201
54188
|
VirtualListInstall
|
|
54202
54189
|
];
|
|
54203
54190
|
var vueDevui = {
|
|
54204
|
-
version: "1.6.
|
|
54191
|
+
version: "1.6.5",
|
|
54205
54192
|
install(app) {
|
|
54206
54193
|
installs.forEach((p) => app.use(p));
|
|
54207
54194
|
}
|