@thinkpixellab-public/px-vue 4.0.27 → 4.0.29
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
package/package.json
CHANGED
package/utils/balanceText.js
CHANGED
|
@@ -37,7 +37,13 @@ var balanceText = function (element, lineAdjust = ADJUST) {
|
|
|
37
37
|
function squeezeContainer(headline, originalHeight, bottomRange, topRange, lineAdjust = ADJUST) {
|
|
38
38
|
var mid;
|
|
39
39
|
if (bottomRange >= topRange) {
|
|
40
|
-
headline
|
|
40
|
+
// need to handle the case where the headline is not wrapping and is just too wide for it's container
|
|
41
|
+
// this mainly seems to happen when in character based languages
|
|
42
|
+
if (headline.scrollWidth > topRange * lineAdjust) {
|
|
43
|
+
headline.style.maxWidth = headline.scrollWidth + 'px';
|
|
44
|
+
} else {
|
|
45
|
+
headline.style.maxWidth = topRange * lineAdjust + 'px';
|
|
46
|
+
}
|
|
41
47
|
return;
|
|
42
48
|
}
|
|
43
49
|
mid = (bottomRange + topRange) / 2;
|