【问题标题】:Ionic 4 popover appearing off screenIonic 4 弹出框出现在屏幕外
【发布时间】:2019-06-21 03:45:35
【问题描述】:

我在屏幕底部的按钮上有一个 Ionic 4 Popover。当我单击按钮打开弹出框时,它会出现在屏幕下方...

.html

<div class="TabBarItem" (click)="popover($event)">
  <label>Tab Item</label>
</div>

.ts

   function popover(ev) {

    this.popoverController
                .create({
                  component: PopoverComponent,
                  event: ev,
                  translucent: true,
                })
                .then(el => {
                  el.present();
                });
    }

结果...

有没有办法解决这个问题,或者手动重新定位它?

【问题讨论】:

标签: angular ionic-framework ionic4


【解决方案1】:

原来我所要做的就是将&lt;ion-content&gt; 添加到我的弹出框组件中。这解决了问题。

【讨论】:

    猜你喜欢
    • 2017-04-17
    • 2020-03-05
    • 1970-01-01
    • 2014-12-21
    • 1970-01-01
    • 2020-02-21
    • 2018-06-14
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多