代码之家  ›  专栏  ›  技术社区  ›  Luis Orantes

警报在Ionic 4中剪切长文本

  •  0
  • Luis Orantes  · 技术社区  · 6 年前

    如果警报包含的文本太多,则会将其剪切,甚至可以访问按钮,而不是滚动文本。这是虫子吗?我应该提出报告吗?怎样?我用离子4β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

    1 回复  |  直到 6 年前
        1
  •  2
  •   Suraj Rao Raas Masood    6 年前

    您已将大量内容放入 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

    推荐文章