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.
@@ -3475,23 +3475,27 @@ const EA = {
3475
3475
  watch: {
3476
3476
  visible: {
3477
3477
  handler(e, i) {
3478
- console.log("\u76D1\u542C\u4E8B\u4EF6:::", document.body), e ? (this.show = e, this.top = window.scrollY) : (window.scrollTo(0, this.top), this.show = e, this.$emit("update:visible", !1));
3478
+ 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));
3479
3479
  },
3480
3480
  immediate: !0
3481
3481
  }
3482
3482
  },
3483
3483
  methods: {
3484
3484
  handleOpen() {
3485
- this.show = !0, this.top = window.scrollY;
3485
+ this.show = !0, this.top = window.scrollY, document.body.style.position = "fixed", document.body.style.top = -this.top + "px";
3486
3486
  },
3487
3487
  handleClose() {
3488
- window.scrollTo(0, this.top), this.show = !1, this.$emit("update:visible", !1);
3488
+ document.body.style.position = "", document.body.style.top = "", window.scrollTo(0, this.top), this.show = !1, this.$emit("update:visible", !1);
3489
3489
  },
3490
3490
  handleCancel() {
3491
3491
  typeof this.cancel == "function" && this.cancel(), this.handleClose();
3492
3492
  },
3493
3493
  handleComfig() {
3494
3494
  typeof this.comfig == "function" && this.comfig();
3495
+ },
3496
+ isIOS() {
3497
+ let e = navigator.userAgent.includes("iPhone"), i = navigator.userAgent.includes("iPad");
3498
+ return e || i;
3495
3499
  }
3496
3500
  },
3497
3501
  mounted() {
@@ -3499,6 +3503,10 @@ const EA = {
3499
3503
  document.body.style.overflow = "hidden";
3500
3504
  const e = document.getElementsByClassName("process-warp")[0] ? document.getElementsByClassName("process-warp")[0] : document.getElementsByClassName("sumbmitPopup-index-sumbit")[0].getElementsByClassName("top-popup")[0];
3501
3505
  e.append ? e.append(this.$el) : e.appendChild(this.$el);
3506
+ const i = document.documentElement.scrollTop || document.body.scrollTop;
3507
+ this.isIOS() && document.body.addEventListener("focusin", () => {
3508
+ document.body.style.position = "fixed", document.body.style.left = "0", document.body.style.top = `${-i}px`;
3509
+ });
3502
3510
  });
3503
3511
  }
3504
3512
  };