<template lang="pug">
  .list
    slot
      z-item(v-for="(item, index) in (items || [])" :key="index"
        :item="item"
        @click="itemClick")
</template>

<script>
import zItem from './item.vue'
export default {
  components: {
    zItem
  },
  props: {
    items: {
      type: Array,
    }
  },
  methods: {
    itemClick(item) {
      this.$emit('itemClick', item)
    }
  }
}
</script>

<style scoped lang="less">
.list {
  overflow-y: scroll;
}
</style>
