2016-07-16 79 views
0

你好我一直在使用angular2和PrimeNG 我有以下問題:我有一個對話框,我不能垂直動態調整大小。PrimeNG Angular2 css對話框

<div ng-reflect-raw-class="[object Object]" class="ui-dialog ui-widget ui-widget-content ui-corner-all ui-shadow ui-dialog-draggable" style="display: block; visibility: visible; left: 250px; top: 67px; z-index: 1040; opacity: 1.056; width: 563px; "> 
      <div class="ui-dialog-titlebar ui-widget-header ui-helper-clearfix ui-corner-top"> 


<p-dialog header="User details" [(visible)]="displayDialog" [responsive]="true" showEffect="fade" [modal]="true"> 

如果我添加一個HEIGHT =「500」或別的東西對話框的高度將發生變化,但看起來就像這樣:

enter image description here

我想有保存按鈕在底部,並能看到一切。當房間可用時。

回答

-1

最簡單的辦法是組合

PS後加上幾個<br>或固定高度的div:我有你一直在試圖將類添加到使用的styleClass的對話框中,不要加括號通知。

實施例:

<p-dialog header="User details" [(visible)]="displayDialog" [responsive]="true" showEffect="fade" [modal]="true" styleClass="userdialog">

0

正確的方法是在style.css中

.ui-dropdown-panel { 
    position: inherit !important; 
    top:0px !important; 
} 

before open after open

0

.ui-dropdown-item span{ 
 
    font-size: 12px; 
 
} 
 

 
.ui-dropdown-items-wrapper{ 
 
    position: absolute; 
 
    width: 100%; 
 
    border: 1px solid #b4b1b0; 
 
    border-radius: 5px; 
 
}
改變

正確的方法是改變style.css 它解決了我的問題。