如何使角angular的长度合适

时间:2019-12-03 11:17:46

标签: angular angular-material material-design

1 个答案:

答案 0 :(得分:0)

您可以尝试

            <form fxLayoutAlign="center center" fxFlex fxHide.xs>
                <mat-form-field class="search" fxFlex="50" [floatPlaceholder]="'never'">
                    <input matInput name="search" placeholder="Search" [(ngModel)]="search" />
                    <button mat-button color="primary" *ngIf="isSearchIcon" type="submit" matSuffix mat-icon-button aria-label="Clear" (click)="searchSomething()">
                        <mat-icon>search</mat-icon>
                    </button>
                    <button mat-button color="accent" *ngIf="isClearIcon" (click)="clearSearch()" matSuffix mat-icon-button aria-label="Clear">
                        <mat-icon>close</mat-icon>
                    </button>
                </mat-form-field>
            </form>