Angular5材料 - >切换TAB时关闭垫扩展面板

时间:2018-03-19 14:01:15

标签: angular angular-material angular5

我有一个Angular Material标签组件。当我切换Tab时,Mat-expansion-panel已在新标签中打开。所以我点击面板标题不能刷新我的数据。当我切换标签时如何关闭扩展面板?

<mat-tab label="Edelstahl">
              <div class="tab-content visible-sm-12">
                <mat-accordion>
                  <mat-expansion-panel [disabled]="true">
                    <mat-expansion-panel-header>
                      <div class="row_accordion disabled">
                        <div class="row">
                          <div class="col-4 col-sm-3 col-md-3 col-lg-5 col-xl-4">Typ</div>
                          <div class="col-4 col-sm-3 col-md-3 col-lg-2 col-xl-4 text-right">Euro / kg</div>
                          <div class="col-4 col-sm-5 col-md-5 col-lg-2 col-xl-2 offset-lg-1  text-right">Euro / m²</div>
                        </div>
                      </div>
                    </mat-expansion-panel-header>
                  </mat-expansion-panel>
                  <mat-expansion-panel>
                    <mat-expansion-panel-header (click)="getArticelTyp(4945)">
                      <div class="row_accordion">
                        <div class="row">
                          <div class="col-4 col-sm-3 col-md-3 col-lg-5 col-xl-4">12NE</div>
                          <div class="col-4 col-sm-3 col-md-3 col-lg-2 col-xl-4 text-right"> 9,10</div>
                          <div class="col-4 col-sm-5 col-md-5 col-lg-2 col-xl-2 offset-lg-1 text-right">89,29</div>
                        </div>
                      </div>

THX

1 个答案:

答案 0 :(得分:1)

这是Angular Material 2中的known issue6.0.0-beta.0还有待定修正。