typescript 离子型:刷新器在iOS主屏幕应用程序上不工作,在浏览器中工作

wwtsj6pe  于 2023-02-20  发布在  TypeScript
关注(0)|答案(3)|浏览(120)

我正在用Ionic构建PWA,我的应用程序中有一个离子刷新器:

<ion-content>
  <ion-refresher slot="fixed" (ionRefresh)="refresh()">
    <ion-refresher-content pullingIcon="lines"></ion-refresher-content>
  </ion-refresher>
...
</ion-content>

在我的iPhone上,在浏览器中刷新器工作正常(我可以在屏幕上向下拉,它会重新加载页面)。然而,当我将应用程序添加到主屏幕时,它就停止工作了。
有什么想法吗?下面是我使用的软件包:

"dependencies": {
    "@angular/animations": "^9.0.0",
    "@angular/cdk": "^9.2.0",
    "@angular/common": "~9.1.0",
    "@angular/core": "~9.1.0",
    "@angular/fire": "^6.0.0",
    "@angular/forms": "~9.1.0",
    "@angular/platform-browser": "~9.1.0",
    "@angular/platform-browser-dynamic": "~9.1.0",
    "@angular/router": "~9.1.0",
    "@angular/service-worker": "~9.1.0",
    "@capacitor/core": "^2.0.2",
    "@ionic-native/core": "^5.0.7",
    "@ionic-native/splash-screen": "^5.0.0",
    "@ionic-native/status-bar": "^5.0.0",
    "@ionic/angular": "^5.0.0",
    "@types/gapi": "0.0.39",
    "@types/gapi.auth2": "0.0.51",
    "@types/gapi.client.drive": "^3.0.4",
    "@types/node": "^13.11.1",
    "bootstrap": "^4.4.1",
    "chart.js": "^2.9.3",
    "chartjs-plugin-datalabels": "^0.7.0",
    "cordova-ios": "5.1.1",
    "core-js": "^2.5.4",
    "decimal.js-light": "^2.5.0",
    "firebase": "^7.13.2",
    "ng2-charts": "^2.3.0",
    "rxjs": "~6.5.1",
    "tslib": "^1.10.0",
    "zone.js": "~0.10.2"
  },
iyfamqjs

iyfamqjs1#

我也有同样的问题,对我来说,我错过了

viewport-fit=cover

从“viewport” meta

<meta name="viewport" content="width=device-width, height=device-height, initial-scale=1, maximum-scale=1, user-scalable=no, viewport-fit=cover"/>
c9qzyr3d

c9qzyr3d2#

尝试在离子内容中使用强制过卷属性

<ion-content force-overscroll="true"> 
.
.
.
</ion-content>
1zmg4dgp

1zmg4dgp3#

尝试设置模式=“ios”到bot离子刷新器和离子刷新器内容。唯一的方法我得到了它固定。

相关问题