<template>
<template v-for="(item, index) in data" :key="index">
    <fx-article-item :data="item" :direction="direction" @click="toApHandler"></fx-article-item>
</template>
</template>
<script lang="ts">
    export default {
      name: 'fxArticleList',
    };
</script>
<script setup lang="ts">
    import { onMounted, reactive, ref, nextTick, onUnmounted } from 'vue';
    import fxArticleItem from '../fxArticleItem/index.vue';

    const props = defineProps({
        data: {
            type: Array,
            default: () => {
                return []
            },
        },
        direction : { // 呈现方式 横向 和 竖向 默认横向
            type: String,
            default: () => {
                return 'horizontal' // vertical
            },
        }
    });
    const { data, direction} = props

    const emit = defineEmits(['click']);
    const toApHandler = (type : any, data: any)=> {
        emit('click', type, data)
    }
</script>
<style lang="less">
</style>