我想让主要的 ng 数据表列设置为自动适应以及重新调整大小。所以我已经解决了在两个 css 类 .ui-datatable table 和 .ui-datatable-tablewrapper 中更改的这个问题。
我已经使用文件上传来上传文件,并且我想在选择其中一个文件时验证文件,如果该文件不是有效文件,则将其删除。
.html
<p-fileUpload #fileUpload name="datafiles"
[accept]=FileExtentionValue
[url]="FileUploadUrl"
[showUploadButton]="isUploadEnable"
[disabled]="diableFileupload"
(onUpload)="onUpload($event)"
(onSelect)="validateFile($event)"
multiple="multiple">
</p-fileUpload>
Run Code Online (Sandbox Code Playgroud)
.ts
onUpload(event) {
for (let file of event.files) {
this.uploadedFiles.push(file);
}
this.messageService.add({ severity: 'info', summary: 'File Uploaded', detail: '' });
}
Run Code Online (Sandbox Code Playgroud)
验证填充名称
validateFile(event) {
let tempFiles: any = [];
var FileNmaeMust: any;
for (let file of event.files) {
tempFiles.push(file.name);
}
for (let i = 0; i < tempFiles.length; i++) {
let count = 1;
for (let j = 0; j < this.ClientDataFileTypeValue.length; j++) {
FileNmaeMust = ""; …Run Code Online (Sandbox Code Playgroud) 我已经使用了ng prime对话框,并尝试在其上添加ng-pick日期选择器,但是当单击日期选择器时,其隐藏在dialogbox.plz后面,我的代码是
<p-dialog [contentStyle]="{'max-height':'190px' ,'max-width':'500px','width':'100%','height':'auto'}" header="Filter Columns" styleClass="quick-view-grid-row filterbox " [(visible)]="displayFilter"
appendTo="body" showEffect="fade" [modal]="true">
<div *ngIf="filterRow.datatype==='DateRange'">
<!--<p-calendar [defaultDate]="currentdate" timezone="utc" styleClass="calender rightPadding" autofocus required="true" name="date" appendTo="body" [style]="{ 'width':'auto','z-index': '1089'}" [(ngModel)]="filterRow.values" [maxDate]="currentdate" [monthNavigator]="true" selectionMode="range" [placeholder]=filterRow.values [yearNavigator]="true" yearRange="2000:2030" showButtonBar="true" [showIcon]="true"></p-calendar>
<span>{{currentdate}}</span> -->
<input [(ngModel)]="filterRow.values" [owlDateTimeTrigger]="dt5" [owlDateTime]="dt5">
<owl-date-time #dt5></owl-date-time>
</div>
</p-dialog>
Run Code Online (Sandbox Code Playgroud)