@thinkpixellab-public/px-vue 4.0.27 → 4.0.28
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/components/PxFloat.vue
CHANGED
|
@@ -55,7 +55,7 @@
|
|
|
55
55
|
<script>
|
|
56
56
|
import PxBaseVariants from '../bases/PxBaseVariants.vue';
|
|
57
57
|
import { computePosition, autoUpdate, flip, shift, offset, size } from '@floating-ui/dom';
|
|
58
|
-
import { disableBodyScroll, enableBodyScroll
|
|
58
|
+
import { disableBodyScroll, enableBodyScroll } from 'body-scroll-lock';
|
|
59
59
|
|
|
60
60
|
const FOCUS_ELEMENTS = [
|
|
61
61
|
'button',
|
|
@@ -400,7 +400,9 @@ export default {
|
|
|
400
400
|
|
|
401
401
|
if (nv) {
|
|
402
402
|
if (this.disablesScroll) {
|
|
403
|
-
|
|
403
|
+
if (this.$refs.popup) {
|
|
404
|
+
disableBodyScroll(this.$refs.popup, { reserveScrollBarGap: true });
|
|
405
|
+
}
|
|
404
406
|
|
|
405
407
|
if (!globalClearLayerIndex) {
|
|
406
408
|
globalClearLayerIndex = globalLayerIndex;
|
|
@@ -424,7 +426,10 @@ export default {
|
|
|
424
426
|
transitionVisible() {
|
|
425
427
|
if (!this.transitionVisible) {
|
|
426
428
|
this.$emit('afterhide');
|
|
427
|
-
|
|
429
|
+
|
|
430
|
+
if (this.$refs.popup) {
|
|
431
|
+
enableBodyScroll(this.$refs.popup, { reserveScrollBarGap: true });
|
|
432
|
+
}
|
|
428
433
|
}
|
|
429
434
|
},
|
|
430
435
|
},
|
package/components/PxQrCode.vue
CHANGED