angular 弹出窗口组件(如上传组件)中添加自定义文字

import-template.component.ts
添加

  @Input()
  public showInfo:boolean = false;
  @Input()
  public infoDetail:string;

import-template.component.html

  <div *ngIf="showInfo" style="margin-top: 15px;margin-left:15px;color: red" [innerHTML]="infoDetail">
  </div>

需要使用该组件的地方

<import-template (errMsg)="importErrorMsg($event)" [excelName]="'xxx.xlsx'"
                 [excelPath]="'template/xxx.xlsx'" [backendUrl]="backendUrl"
                 [showInfo]="true" [infoDetail]="infoDetail" [asyncImport]="true"
                 [asyncResultUrl]="asyncResultUrl" [asyncImportEnum]="asyncImportEnum" (refresh)="search()"></import-template>
<error-message [errMsg]="errMessage"></error-message>

你可能感兴趣的:(angular 弹出窗口组件(如上传组件)中添加自定义文字)