我想创建一系列通过一组对象填充的全宽离子卡

时间:2019-06-24 13:21:18

标签: css angular ionic-framework

我想遍历对象数组以创建一系列FULLWIDTH(如果计数是奇数,则为半角,如果最后一个居中,则为半角宽度)。

我创建了一个包含卡片布局的组件,并使用* ngFor遍历数组,但是无论我喂它什么属性或放置它的位置如何(无论在里面还是外面),col的大小似乎都不会受到影响。环)。卡片根据文字动态调整大小

<ion-row>
  <app-artist-view *ngFor="let deal of loadedEvent.deals" [deal]='deal'></app-artist-view>
</ion-row>
<ion-col size = "12"> 
  <ion-card>

    <ion-item>
      <ion-label  class="ion-text-center">{{deal.title}}</ion-label>
    </ion-item>


    <ion-card-content class="ion-text-center">

      <ion-card-subtitle>Name: {{deal.talent.name}}</ion-card-subtitle>
      <ion-card-subtitle>{{deal.performanceType}}</ion-card-subtitle>
      <ion-card-subtitle>Length: {{deal.performanceLength}}</ion-card-subtitle>
      <ion-card-subtitle>Status: {{deal.status}}</ion-card-subtitle>
      <ion-card-subtitle>Value: {{deal.value}}</ion-card-subtitle>
    </ion-card-content>
  </ion-card>
</ion-col>  

卡片根据文本动态调整大小,而不是每个组件的剩余全角

0 个答案:

没有答案