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/table/index.es.js
CHANGED
|
@@ -1180,6 +1180,10 @@ const flexibleOverlayProps = {
|
|
|
1180
1180
|
fitOriginWidth: {
|
|
1181
1181
|
type: Boolean,
|
|
1182
1182
|
default: false
|
|
1183
|
+
},
|
|
1184
|
+
autoUpdatePosition: {
|
|
1185
|
+
type: Boolean,
|
|
1186
|
+
default: false
|
|
1183
1187
|
}
|
|
1184
1188
|
};
|
|
1185
1189
|
function adjustArrowPosition(isArrowCenter, point, placement, originRect) {
|
|
@@ -1207,6 +1211,7 @@ function useOverlay(props, emit) {
|
|
|
1207
1211
|
const arrowRef = ref();
|
|
1208
1212
|
const overlayWidth = ref(0);
|
|
1209
1213
|
let originObserver;
|
|
1214
|
+
let overlayObserver;
|
|
1210
1215
|
const styles = computed(() => {
|
|
1211
1216
|
if (fitOriginWidth.value) {
|
|
1212
1217
|
return { width: overlayWidth.value + "px" };
|
|
@@ -1277,6 +1282,15 @@ function useOverlay(props, emit) {
|
|
|
1277
1282
|
const originEl = (_b = (_a = props.origin) == null ? void 0 : _a.$el) != null ? _b : props.origin;
|
|
1278
1283
|
originEl && (originObserver == null ? void 0 : originObserver.unobserve(originEl));
|
|
1279
1284
|
};
|
|
1285
|
+
const observeOverlay = () => {
|
|
1286
|
+
if (props.autoUpdatePosition && typeof window !== "undefined" && overlayRef.value) {
|
|
1287
|
+
overlayObserver = new window.ResizeObserver(updatePosition);
|
|
1288
|
+
overlayObserver.observe(overlayRef.value);
|
|
1289
|
+
}
|
|
1290
|
+
};
|
|
1291
|
+
const unobserveOverlay = () => {
|
|
1292
|
+
overlayRef.value && (overlayObserver == null ? void 0 : overlayObserver.unobserve(overlayRef.value));
|
|
1293
|
+
};
|
|
1280
1294
|
watch(
|
|
1281
1295
|
() => props.modelValue,
|
|
1282
1296
|
() => {
|
|
@@ -1285,10 +1299,12 @@ function useOverlay(props, emit) {
|
|
|
1285
1299
|
window.addEventListener("scroll", scrollCallback, true);
|
|
1286
1300
|
window.addEventListener("resize", updatePosition);
|
|
1287
1301
|
observeOrigin();
|
|
1302
|
+
nextTick(observeOverlay);
|
|
1288
1303
|
} else {
|
|
1289
1304
|
window.removeEventListener("scroll", scrollCallback, true);
|
|
1290
1305
|
window.removeEventListener("resize", updatePosition);
|
|
1291
1306
|
unobserveOrigin();
|
|
1307
|
+
unobserveOverlay();
|
|
1292
1308
|
}
|
|
1293
1309
|
}
|
|
1294
1310
|
);
|
|
@@ -1296,6 +1312,7 @@ function useOverlay(props, emit) {
|
|
|
1296
1312
|
window.removeEventListener("scroll", scrollCallback, true);
|
|
1297
1313
|
window.removeEventListener("resize", updatePosition);
|
|
1298
1314
|
unobserveOrigin();
|
|
1315
|
+
unobserveOverlay();
|
|
1299
1316
|
});
|
|
1300
1317
|
return { arrowRef, overlayRef, styles, updatePosition };
|
|
1301
1318
|
}
|