0

我的 p 对话框有问题。我想在我的对话框中有淡入淡出标题,如下例所示:

https://i.stack.imgur.com/koh9Y.png

但我得到了这个:

https://i.stack.imgur.com/lEyvY.png

如您所见,我的标题没有淡入淡出效果。这是我的html代码:

<p-dialog header="{{'TASKS.DETAILS' | translate}}" [(visible)]="displayDialog" [responsive]="true" [modal]="true"  showEffect="fade">

    <div class="modal-body">

        <div class="row" [ngStyle]="{'width': '500px'}" >
            <div class="col-sm-4">
                <label>{{'TASKS.DESCRIPTION' | translate}}</label>
            </div>
            <div class="col-sm-8">

            <textarea disabled placeholder=" {{'TASKS.DESCRIPTION' | translate}}"
                      rows="3" cols="30"
            ></textarea>
            </div>
        </div>

    </div>

    <div class="modal-footer">
        <button type="button" class="btn btn-default" >{{'COMMON.CANCEL' | translate}}</button>
        <button type="button" class="btn btn-primary"
        >{{'TASKS.DONE' | translate}}
        </button>
    </div>
</p-dialog>
4

1 回答 1

0

确保您包含primeng.min.csstheme.css文件angular-cli.json

"styles": [
  "src/styles.css",
  "node_modules/primeng/resources/themes/omega/theme.css",
  "node_modules/primeng/resources/primeng.min.css",
  "node_modules/font-awesome/css/font-awesome.min.css",
  "node_modules/primeicons/primeicons.css"
],
于 2018-07-18T22:25:31.983 回答