
<style scoped>
.container {
  padding: 0;
}
</style>

<template>
  <div class="container">
    <IndexList @click="listClick" :data="contacts"></IndexList>
  </div>
</template>
<script>
import IndexList from '@/components/IndexList'
let contacts = []
function generateBig () {
  for (var i = 65; i < 91; i++) {
    contacts.push(String.fromCharCode(i))
  }
  return contacts
}
generateBig()
contacts = contacts.map(item => {
  return {
    title: item,
    list: [1, 2].map(_item => item + _item)
  }
})
export default {
  props: {},
  components: {
    IndexList
  },
  data: () => {
    return {
      contacts
    }
  },
  methods: {
    listClick (val, index, totalIndex) {
      console.log(val, index, totalIndex)
    }
  }
}
</script>

