<script setup>

const newsList = computed(() => newsRes.value.data);

// 取得新聞資料
const { data: newsRes } = await useMyFetch('/social/getNewsList', "GET")

</script>

<template>
  <div class="toolbar">
    <div class="tTitle">最新消息</div>
  </div>
  <div class="content">
    <div>
      <NuxtLinkLocale :to="'/social/news/detail/'+item.id" class="item" v-for="(item, index) in newsList"
        :key="index">
        <div class="title ellipsis">{{ item.title }}</div>
        <div class="date">{{ item.create_time }}</div>
      </NuxtLinkLocale>
    </div>
  </div>
</template>

<style lang="less">

</style>
