Skip to content

Commit

Permalink
bugfix monitoring param number limit range (#1216)
Browse files Browse the repository at this point in the history
Co-authored-by: jimmy <jimmyqiao@augmentum.com.cn>
  • Loading branch information
qyaaaa and jimmy authored Aug 31, 2023
1 parent bcba2bf commit 4b409ef
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -129,8 +129,8 @@
<nz-input-number
[(ngModel)]="params[i].value"
[required]="paramDefine.required"
[nzMin]="-1000"
[nzMax]="65535"
[nzMin]="getNumber(paramDefine.range || '', 0) || -1000"
[nzMax]="getNumber(paramDefine.range || '', 1) || 65535"
[nzStep]="1"
[nzPlaceHolder]="paramDefine.placeholder ? paramDefine.placeholder : ''"
[name]="paramDefine.field"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -340,5 +340,10 @@ export class MonitorNewComponent implements OnInit {
this.checkedTags.delete(tag);
}
}

getNumber(rangeString: string, index: number): number | undefined {
const rangeArray = JSON.parse(rangeString);
return rangeArray[index];
}
// end tag model
}

0 comments on commit 4b409ef

Please sign in to comment.