<template>
    <el-space direction="vertical" fill class="full-width mouse-hover" v-for="(item, index) in props.news" :key="index">
        <news-item-with-tag :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 NewsItemWithTag from '@/components/base/newsList/NewsItemWithTag.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>