警报在 Ionic 4 中剪切长文本

Alert cuts long text in Ionic 4

如果警报的文本过多,则不会滚动文本,而是将其剪切,甚至可以触及按钮。这是一个错误吗?我应该报告吗?如何?我正在使用 Ionic 4 beta 12

代码:

  async showRules() {
    const alert = await this.alertController.create({
      header: 'Rules',
      subHeader: `Brain Builder is up to date with the most recent research regarding IQ enhancement.
As the most recent research suggest, Brain Builder will increase the number of stimulus first (position, audio, color, etc.).
Once all stimuli have been mastered, the n-back will be increased.A blue square will be shown every three seconds, press the button ‘Position’ when you find that the actual position of the blue square matches with that of the previous one.
The position of the square is accompanied with the pronunciation of a number and the very same rule applies for the sound.
`,
      buttons: ['OK'],
      backdropDismiss: false
    });
    await alert.present();
  }

您将大量内容放在 subheader 而不是 message 中。尝试:

 async showRules() {
    const alert = await this.alertController.create({
      header: 'Rules',
      message: `Brain Builder is up to date with the most recent research regarding IQ enhancement.
As the most recent research suggest, Brain Builder will increase the number of stimulus first (position, audio, color, etc.).
Once all stimuli have been mastered, the n-back will be increased.A blue square will be shown every three seconds, press the button ‘Position’ when you find that the actual position of the blue square matches with that of the previous one.
The position of the square is accompanied with the pronunciation of a number and the very same rule applies for the sound.
`,
      buttons: ['OK'],
      backdropDismiss: false
    });
    await alert.present();
  }

副标题只是副标题,可能不可滚动。文档 here