<template>
    <el-space direction="vertical" fill class="full-width mouse-hover" v-for="(item, index) in props.news" :key="index">
        <news-item2 :img="item.newsImage" :title="item.newsTitle" :from="`新闻来源：${item.newsOrg} 发表时间：${item.newsDate}`"
            :aeraTags="item.industryList?.map(t => t.industryName)" @click="gotoNewsDetail(item.newsId)" />
        <div class="divider-news-list"></div>
    </el-space>
</template>
<script setup>
import NewsItem2 from '@/components/base/newsList/NewsItem2.vue';
import { useGotoNewsDetail } from '@/router/modules/news';
import { ElSpace } from 'element-plus';

const gotoNewsDetail = useGotoNewsDetail();

const props = defineProps({
    news: {
        type: Array,
        default: () => []
    }
})
</script>

<style lang="css" scoped>
.divider-news-list {
    width: 100%;
    height: 1px;
    background: #eaecee;
}
</style>