Ngx-Bootstrap popover没有设置正确的高度或宽度

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

我试图在我的Ionic 2 / Angular 2应用程序中使用ngx-bootstrap,由于某种原因,popover在我的视图中无法正确显示:

<button
  placement="right"
  [outsideClick]="true"
  popover="this is a teseofnwifo ef efo efoih wefohwefo wef  h ioef  whefhweofihwoeht"
  [isOpen]="true"
  triggers="click"

  ion-button full outline 
  class="flex-col rounded box-shadow" 
  color="primary" 
  style="height:100%;font-size:16px;border-width:1px;" 
  (click)="goTo('new-client')" #1>
  <i class="fa fa-user-plus text-shadow" padding style="font-size: 150px;color:red;"></i>
  <span style="font-size:32px;text-transform:none;">New Client</span>
</button>

我不相信我的按钮样式会影响弹出窗口,因为它呈现为单独的组件,但是当显示弹出框时,它的widthheight都设置为4px。我不知道它在哪里设置或者我在某处错过了一些javascript ..

app.module.ts

import { PopoverModule } from 'ngx-bootstrap/popover';

@NgModule({
  declarations: [...],
  imports: [
    PopoverModule.forRoot()
  ]
  ...
})

enter image description here

twitter-bootstrap angular ionic-framework bootstrap-4 ngx-bootstrap
1个回答
2
投票

设置container =“body”,如demo:https://valor-software.com/ngx-bootstrap/#/popover#container-body

如果它将修复大小,那么某些东西正在影响popover风格

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