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.
- package/auto-complete/index.es.js +17 -0
- package/auto-complete/index.umd.js +17 -17
- package/breadcrumb/index.es.js +17 -0
- package/breadcrumb/index.umd.js +2 -2
- package/category-search/index.es.js +103 -16
- package/category-search/index.umd.js +23 -23
- package/checkbox/index.es.js +17 -0
- package/checkbox/index.umd.js +13 -13
- package/code-review/index.es.js +17 -0
- package/code-review/index.umd.js +16 -16
- package/data-grid/index.es.js +17 -0
- package/data-grid/index.umd.js +17 -17
- package/date-picker-pro/index.es.js +17 -0
- package/date-picker-pro/index.umd.js +18 -18
- package/dropdown/index.es.js +17 -0
- package/dropdown/index.umd.js +2 -2
- package/editable-select/index.es.js +17 -0
- package/editable-select/index.umd.js +12 -12
- package/editor-md/index.es.js +17 -0
- package/editor-md/index.umd.js +19 -19
- package/form/index.es.js +17 -0
- package/form/index.umd.js +20 -20
- package/input/index.es.js +17 -0
- package/input/index.umd.js +15 -15
- package/input-number/index.es.js +17 -0
- package/input-number/index.umd.js +20 -20
- package/mention/index.es.js +17 -0
- package/mention/index.umd.js +21 -21
- package/modal/index.es.js +17 -0
- package/modal/index.umd.js +2 -2
- package/overlay/index.es.js +17 -0
- package/overlay/index.umd.js +1 -1
- package/package.json +1 -1
- package/pagination/index.es.js +18 -2
- package/pagination/index.umd.js +16 -16
- package/popover/index.es.js +17 -0
- package/popover/index.umd.js +16 -16
- package/radio/index.es.js +17 -0
- package/radio/index.umd.js +20 -20
- package/search/index.es.js +17 -0
- package/search/index.umd.js +14 -14
- package/select/index.es.js +18 -2
- package/select/index.umd.js +15 -15
- package/splitter/index.es.js +17 -0
- package/splitter/index.umd.js +9 -9
- package/switch/index.es.js +17 -0
- package/switch/index.umd.js +20 -20
- package/table/index.es.js +17 -0
- package/table/index.umd.js +9 -9
- package/tag/index.es.js +1 -2
- package/tag/index.umd.js +1 -1
- package/textarea/index.es.js +17 -0
- package/textarea/index.umd.js +21 -21
- package/time-picker/index.es.js +17 -0
- package/time-picker/index.umd.js +18 -18
- package/time-select/index.es.js +18 -2
- package/time-select/index.umd.js +17 -17
- package/tooltip/index.es.js +17 -0
- package/tooltip/index.umd.js +12 -12
- package/tree/index.es.js +17 -0
- package/tree/index.umd.js +13 -13
- package/types/category-search/src/category-search-types.d.ts +11 -0
- package/types/category-search/src/composables/use-category-selected-tags.d.ts +15 -0
- package/types/overlay/src/flexible-overlay/flexible-overlay-types.d.ts +4 -0
- package/types/overlay/src/flexible-overlay/index.d.ts +3 -0
- package/vue-devui.es.js +103 -16
- package/vue-devui.umd.js +71 -71
package/select/index.es.js
CHANGED
|
@@ -5840,6 +5840,10 @@ const flexibleOverlayProps = {
|
|
|
5840
5840
|
fitOriginWidth: {
|
|
5841
5841
|
type: Boolean,
|
|
5842
5842
|
default: false
|
|
5843
|
+
},
|
|
5844
|
+
autoUpdatePosition: {
|
|
5845
|
+
type: Boolean,
|
|
5846
|
+
default: false
|
|
5843
5847
|
}
|
|
5844
5848
|
};
|
|
5845
5849
|
function adjustArrowPosition(isArrowCenter, point, placement, originRect) {
|
|
@@ -5867,6 +5871,7 @@ function useOverlay(props, emit) {
|
|
|
5867
5871
|
const arrowRef = ref();
|
|
5868
5872
|
const overlayWidth = ref(0);
|
|
5869
5873
|
let originObserver;
|
|
5874
|
+
let overlayObserver;
|
|
5870
5875
|
const styles = computed(() => {
|
|
5871
5876
|
if (fitOriginWidth.value) {
|
|
5872
5877
|
return { width: overlayWidth.value + "px" };
|
|
@@ -5937,6 +5942,15 @@ function useOverlay(props, emit) {
|
|
|
5937
5942
|
const originEl = (_b = (_a = props.origin) == null ? void 0 : _a.$el) != null ? _b : props.origin;
|
|
5938
5943
|
originEl && (originObserver == null ? void 0 : originObserver.unobserve(originEl));
|
|
5939
5944
|
};
|
|
5945
|
+
const observeOverlay = () => {
|
|
5946
|
+
if (props.autoUpdatePosition && typeof window !== "undefined" && overlayRef.value) {
|
|
5947
|
+
overlayObserver = new window.ResizeObserver(updatePosition);
|
|
5948
|
+
overlayObserver.observe(overlayRef.value);
|
|
5949
|
+
}
|
|
5950
|
+
};
|
|
5951
|
+
const unobserveOverlay = () => {
|
|
5952
|
+
overlayRef.value && (overlayObserver == null ? void 0 : overlayObserver.unobserve(overlayRef.value));
|
|
5953
|
+
};
|
|
5940
5954
|
watch(
|
|
5941
5955
|
() => props.modelValue,
|
|
5942
5956
|
() => {
|
|
@@ -5945,10 +5959,12 @@ function useOverlay(props, emit) {
|
|
|
5945
5959
|
window.addEventListener("scroll", scrollCallback, true);
|
|
5946
5960
|
window.addEventListener("resize", updatePosition);
|
|
5947
5961
|
observeOrigin();
|
|
5962
|
+
nextTick(observeOverlay);
|
|
5948
5963
|
} else {
|
|
5949
5964
|
window.removeEventListener("scroll", scrollCallback, true);
|
|
5950
5965
|
window.removeEventListener("resize", updatePosition);
|
|
5951
5966
|
unobserveOrigin();
|
|
5967
|
+
unobserveOverlay();
|
|
5952
5968
|
}
|
|
5953
5969
|
}
|
|
5954
5970
|
);
|
|
@@ -5956,6 +5972,7 @@ function useOverlay(props, emit) {
|
|
|
5956
5972
|
window.removeEventListener("scroll", scrollCallback, true);
|
|
5957
5973
|
window.removeEventListener("resize", updatePosition);
|
|
5958
5974
|
unobserveOrigin();
|
|
5975
|
+
unobserveOverlay();
|
|
5959
5976
|
});
|
|
5960
5977
|
return { arrowRef, overlayRef, styles, updatePosition };
|
|
5961
5978
|
}
|
|
@@ -9053,7 +9070,6 @@ var Tag = defineComponent({
|
|
|
9053
9070
|
} = toRefs(props);
|
|
9054
9071
|
const tagClass = useClass(props);
|
|
9055
9072
|
const themeColor = useColor(props);
|
|
9056
|
-
const tagTitle = titleContent.value || "";
|
|
9057
9073
|
const isDefaultTag = () => !type4.value && !color.value;
|
|
9058
9074
|
const handleClick = (e) => {
|
|
9059
9075
|
emit("click", e);
|
|
@@ -9092,7 +9108,7 @@ var Tag = defineComponent({
|
|
|
9092
9108
|
color: contentColor.value,
|
|
9093
9109
|
backgroundColor: checked.value ? themeColor.value : !color.value ? "" : "var(--devui-base-bg, #ffffff)"
|
|
9094
9110
|
},
|
|
9095
|
-
"title":
|
|
9111
|
+
"title": titleContent.value || ""
|
|
9096
9112
|
}, [(_a = slots.default) == null ? void 0 : _a.call(slots), closeIconEl()])]);
|
|
9097
9113
|
};
|
|
9098
9114
|
}
|