警报会在Ionic 4中删除长文本

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

如果警报文本太多,而不是滚动文本,它会被剪切,甚至可以到达按钮。这是一个错误吗?我应该举报吗?怎么样?我正在使用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();
  }

enter image description here

ionic-framework ionic4
1个回答
0
投票

你把巨大的内容放在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

© www.soinside.com 2019 - 2024. All rights reserved.