drop-card.uvue 667 字节
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
  </view>
</template>
Y
yurj26 已提交
8
<script lang="uts">
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'
W
wanganxp 已提交
20
        ] as string.ImageURIString[]
DCloud_JSON's avatar
DCloud_JSON 已提交
21 22 23 24
      }
    }
  }
</script>
W
wanganxp 已提交
25
<style>
DCloud_JSON's avatar
DCloud_JSON 已提交
26 27
  .root {
    flex: 1;
A
Anne_LXM 已提交
28 29
    position: relative;
    align-items: center;
DCloud_JSON's avatar
DCloud_JSON 已提交
30
  }
A
Anne_LXM 已提交
31
</style>