drop-card.uvue 626 字节
Newer Older
DCloud_JSON's avatar
DCloud_JSON 已提交
1
<template>
2 3
  <view class="root">
    <template v-for="(item,index) in cardList" :key="index">
4
      <card ref="card" :img="item" :cardIndex="index"></card>
5
    </template>
DCloud_JSON's avatar
DCloud_JSON 已提交
6 7 8
  </view>
</template>
<script lang="ts">
9 10 11 12 13
  import card from './card/card.uvue';
  export default {
    components: {
      card
    },
DCloud_JSON's avatar
DCloud_JSON 已提交
14 15
    data() {
      return {
16 17 18 19
        cardList: [
          '/static/template/drop-card/1.jpg',
          '/static/template/drop-card/2.jpg',
          '/static/template/drop-card/3.jpg'
20
        ] as string[]
DCloud_JSON's avatar
DCloud_JSON 已提交
21 22 23 24 25 26 27 28 29 30
      }
    }
  }
</script>
<style>
  .root {
    flex: 1;
    position: relative;
  }
</style>