首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >材料芯片文本被包装,而不是扩展芯片。

材料芯片文本被包装,而不是扩展芯片。
EN

Stack Overflow用户
提问于 2019-12-13 12:42:39
回答 1查看 1.7K关注 0票数 1

我使用的角度材料8.2.3,当我设置文本在芯片文本是包装和混乱。我想要的是芯片被扩展,用一行填充所有的文本。

这怎麽可能?守则是:

代码语言:javascript
复制
<mat-form-field style="margin-left:20px" *ngIf="filterStatus">
    <mat-chip-list>
        <mat-chip color="warn" removable (removed)="removeFilter()" selected>
            Filter view on {{dateFrom | date:'yyyy:MM:dd'}}
            <mat-icon matChipRemove>cancel</mat-icon>
        </mat-chip>
    </mat-chip-list>
</mat-form-field>   
EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2019-12-13 15:12:32

难道芯片太宽,不能装在它的容器里吗?

看看我做的这个例子。它再现了您遇到的问题:https://stackblitz.com/edit/angular-p2hwr9

代码语言:javascript
复制
<h3>Chip list with container width set</h3>
<div style="width:150px">
  <mat-chip-list>
    <mat-chip color="warn" removable (removed)="removeFilter()" selected>
      Filter view on {{dateFrom | date:'yyyy:MM:dd'}} - This is a sample view
      <mat-icon matChipRemove>cancel</mat-icon>
    </mat-chip>
  </mat-chip-list>
</div>

<h3>Chip list without container width set</h3>
<mat-chip-list>
    <mat-chip color="warn" removable (removed)="removeFilter()" selected>
        Filter view on {{dateFrom | date:'yyyy:MM:dd'}} - This is a sample view
        <mat-icon matChipRemove>cancel</mat-icon>
    </mat-chip>
</mat-chip-list>
票数 1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/59322861

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档