@alipay/ams-checkout 0.0.1732691889-dev.8 → 0.0.1732691889-dev.9

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.
@@ -219,7 +219,14 @@ export var ContainerService = /*#__PURE__*/function () {
219
219
  value: function updateMaskCloseBtn(data) {
220
220
  var maskCloseBtn = document.getElementById("".concat(COMPONENT_CLOSE_MASK_BLOCK_ID));
221
221
  if (maskCloseBtn) {
222
- maskCloseBtn.style.bottom = "".concat(data.height + 2, "px");
222
+ if (this.displayInfo.platform === 'desktop') {
223
+ var windowHeight = window.innerHeight || document.documentElement.clientHeight || document.body.clientHeight;
224
+ var windowWidth = window.innerWidth || document.documentElement.clientWidth || document.body.clientWidth;
225
+ maskCloseBtn.style.top = "".concat((windowHeight - data.height) / 2 - 42, "px");
226
+ maskCloseBtn.style.right = "".concat((windowWidth - data.width) / 2 + 18, "px");
227
+ } else {
228
+ maskCloseBtn.style.bottom = "".concat(data.height + 2, "px");
229
+ }
223
230
  }
224
231
  }
225
232
  }, {
@@ -1376,7 +1376,14 @@ var ComponentApp = /*#__PURE__*/function () {
1376
1376
  value: function updateMaskCloseBtn(data) {
1377
1377
  var maskCloseBtn = document.getElementById("".concat(COMPONENT_CLOSE_MASK_BLOCK_ID));
1378
1378
  if (maskCloseBtn) {
1379
- maskCloseBtn.style.bottom = "".concat(data.height + 2, "px");
1379
+ if (this.platform === 'desktop') {
1380
+ var windowHeight = window.innerHeight || document.documentElement.clientHeight || document.body.clientHeight;
1381
+ var windowWidth = window.innerWidth || document.documentElement.clientWidth || document.body.clientWidth;
1382
+ maskCloseBtn.style.top = "".concat((windowHeight - data.height) / 2 - 42, "px");
1383
+ maskCloseBtn.style.right = "".concat((windowWidth - data.width) / 2 + 18, "px");
1384
+ } else {
1385
+ maskCloseBtn.style.bottom = "".concat(data.height + 2, "px");
1386
+ }
1380
1387
  }
1381
1388
  }
1382
1389
  }, {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@alipay/ams-checkout",
3
- "version": "0.0.1732691889-dev.8",
3
+ "version": "0.0.1732691889-dev.9",
4
4
  "description": "",
5
5
  "author": "",
6
6
  "main": "esm/index.js",