iOS上的Ionic 4 Popover,Alertsheet等…会回滚内容,而不是Popover本身

问题描述 投票:0回答:1

希望大家度过愉快的一天。

我在iOS上遇到ActionSheets和Popover的问题,当弹出一个弹出窗口时,用户可以在向弹出窗口内滑动时滚动,如果在弹出窗口外单击,用户可以滚动从中打开弹出窗口的内容popover它关闭了popover,它根本不让我滑动,但是当我单击popover内部时,它滚动了popover的后退内容,而不是popover本身。

以下是它的视频:抱歉,无法上传视频,这里是一个链接:Video of popover/actionsheet

这里是打开弹出窗口的代码

async openCreateNewFolder(type, folder?) {
    const popover = await this.popoverController.create({
      component: NewFolderComponent,
      componentProps: {
        folderId: this.folderId,
        parentId: this.parentId,
        type,
        folder
      }
    });

    popover.onDidDismiss().then((dataReturned) => {
      console.log(dataReturned);
      if (dataReturned.data !== undefined) {
        if (dataReturned.data === 'cancelClicked') {

        } else if (dataReturned.data === 'confirmClickedFolder') {
          this.deleteFolder(dataReturned.role);
        } else if (dataReturned.data === 'confirmClickedFile') {
          this.deleteFile(dataReturned.role);
        } else if (dataReturned.data === 'newFolderCreated') {
          this.getFolders();
        }
        // this.dataReturned = dataReturned.data;
        //alert('Modal Sent Data :'+ dataReturned);
      }
    });

    return await popover.present();
  }

这是操作表的代码:

async confirmChangeLanguageDialogue(selectedLanguage) {
let languageClass: any;
if (selectedLanguage === 'English') {
  languageClass = 'alertControllerEnglishLanguageIcon';
} else if (selectedLanguage === 'Deutch') {
  languageClass = 'alertControllerGermanLanguageIcon';
} else if (selectedLanguage === 'French') {
  languageClass = 'alertControllerFrenchLanguageIcon';
} else if (selectedLanguage === 'Italian') {
  languageClass = 'alertControllerItalianLanguageIcon';
}
const alert = await this.alertCtrl.create({
  header: this.translate.instant('confirm'),
  mode: 'ios',
  message: this.translate.instant('change_language_confirm_message', {selected_language: selectedLanguage}),
  buttons: [
    {
      text: this.translate.instant('cancel'),
      role: 'cancel',
      cssClass: 'secondary',
      handler: (blah) => {
        console.log('Confirm Cancel: blah');
      }
    }, {
      text: this.translate.instant('okay'),
      cssClass: languageClass,
      handler: () => {
        this.requestChangeLanguage(selectedLanguage);
      }
    }
  ]
});

await alert.present();
const result = await alert.onDidDismiss();
console.log(result);

}任何帮助将不胜感激,谢谢。

ios ionic-framework popover ionic-native actionsheet
1个回答
© www.soinside.com 2019 - 2024. All rights reserved.