<template>
  <view class="item-list-container">
    <template v-for="(item, index) in ds">
      <view class="list-item" :key="index" @click="onItemClick(item)">
        <view class="list-item-left">
          <image class="list-item-img" :src="item.imgUrl"></image>
        </view>
        <view class="list-item-right">
          <view class="item-title">{{ item.title }}</view>
          <view class="item-content">{{ item.date }}</view>
        </view>
      </view>
    </template>
  </view>
</template>

<script>
export default {
  name: 'item-list',
  props: {
    ds: {
      type: Array,
      default: () => [],
    },
    onItemClick: {
      type: Function,
      default: () => {},
    },
  },
  data() {
    return {};
  },
  created() {
    this.children = [];
  },
  onLoad() {
  },
  methods: {},
};
</script>
<style lang="scss" src="./index.scss" />
