ui-process-h5 1.6.18 → 1.6.19
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/package.json +1 -1
- package/v2/ui-process-h5.js +11 -3
- package/v2/ui-process-h5.umd.cjs +14 -14
- package/v2.7/ui-process-h5.js +11 -3
- package/v2.7/ui-process-h5.umd.cjs +1 -1
- package/v3/ui-process-h5.js +11 -3
- package/v3/ui-process-h5.umd.cjs +1 -1
package/package.json
CHANGED
package/v2/ui-process-h5.js
CHANGED
|
@@ -4098,23 +4098,27 @@ const NC = {
|
|
|
4098
4098
|
watch: {
|
|
4099
4099
|
visible: {
|
|
4100
4100
|
handler(e, s) {
|
|
4101
|
-
|
|
4101
|
+
e ? (this.show = e, this.top = window.scrollY, document.body.style.position = "fixed", document.body.style.top = -this.top + "px") : (document.body.style.position = "", document.body.style.top = "", window.scrollTo(0, this.top), this.show = e, this.$emit("update:visible", !1));
|
|
4102
4102
|
},
|
|
4103
4103
|
immediate: !0
|
|
4104
4104
|
}
|
|
4105
4105
|
},
|
|
4106
4106
|
methods: {
|
|
4107
4107
|
handleOpen() {
|
|
4108
|
-
this.show = !0, this.top = window.scrollY;
|
|
4108
|
+
this.show = !0, this.top = window.scrollY, document.body.style.position = "fixed", document.body.style.top = -this.top + "px";
|
|
4109
4109
|
},
|
|
4110
4110
|
handleClose() {
|
|
4111
|
-
window.scrollTo(0, this.top), this.show = !1, this.$emit("update:visible", !1);
|
|
4111
|
+
document.body.style.position = "", document.body.style.top = "", window.scrollTo(0, this.top), this.show = !1, this.$emit("update:visible", !1);
|
|
4112
4112
|
},
|
|
4113
4113
|
handleCancel() {
|
|
4114
4114
|
typeof this.cancel == "function" && this.cancel(), this.handleClose();
|
|
4115
4115
|
},
|
|
4116
4116
|
handleComfig() {
|
|
4117
4117
|
typeof this.comfig == "function" && this.comfig();
|
|
4118
|
+
},
|
|
4119
|
+
isIOS() {
|
|
4120
|
+
let e = navigator.userAgent.includes("iPhone"), s = navigator.userAgent.includes("iPad");
|
|
4121
|
+
return e || s;
|
|
4118
4122
|
}
|
|
4119
4123
|
},
|
|
4120
4124
|
mounted() {
|
|
@@ -4122,6 +4126,10 @@ const NC = {
|
|
|
4122
4126
|
document.body.style.overflow = "hidden";
|
|
4123
4127
|
const e = document.getElementsByClassName("process-warp")[0] ? document.getElementsByClassName("process-warp")[0] : document.getElementsByClassName("sumbmitPopup-index-sumbit")[0].getElementsByClassName("top-popup")[0];
|
|
4124
4128
|
e.append ? e.append(this.$el) : e.appendChild(this.$el);
|
|
4129
|
+
const s = document.documentElement.scrollTop || document.body.scrollTop;
|
|
4130
|
+
this.isIOS() && document.body.addEventListener("focusin", () => {
|
|
4131
|
+
document.body.style.position = "fixed", document.body.style.left = "0", document.body.style.top = `${-s}px`;
|
|
4132
|
+
});
|
|
4125
4133
|
});
|
|
4126
4134
|
}
|
|
4127
4135
|
};
|