hiron0424
2/5/2020 - 10:11 AM

v-for一例

<f7-block class="content-exhibition">
      <f7-block-title>Permanent exhibition</f7-block-title>
      <div
        class="item"
        v-for="(item, i) in permanentExhibition"
        :key="i"
        :class="item.free ? 'free' : ''"
      >
        <div class="item-inner">
          <div class="image">
            <div :style="{ 'background-image': 'url(' + item.img + ')' }"></div>
          </div>
          <div class="textbox">
            <div class="text" v-html="item.price_adult"></div>
            <f7-button
              href="#"
              class="button-fill bgcolor-theme5"
              v-if="item.is_purchased"
            >
              <span>You are Free</span>
            </f7-button>
            <f7-button
              @click="toOffers"
              href="#"
              :id="item.id"
              class="button-fill"
              v-if="!item.is_purchased"
            >
              <span>Buy a ticket</span>
            </f7-button>
          </div>
        </div>
      </div>
    </f7-block>