|
|
@@ -1,7 +1,7 @@
|
|
|
<template>
|
|
|
<app-view class="news-list" flex>
|
|
|
<template #header>
|
|
|
- <app-navbar title="市场资讯" />
|
|
|
+ <app-navbar :title="title" />
|
|
|
</template>
|
|
|
<Tabs v-model:active="currentColumnId" @change="onClickTab">
|
|
|
<template v-for="(item, index) in siteColumns" :key="index">
|
|
|
@@ -12,13 +12,14 @@
|
|
|
v-model:pageIndex="pageIndex" :page-count="pageCount" @refresh="onRefresh">
|
|
|
<Empty v-if="!dataList.length" />
|
|
|
<template v-for="(item, index) in dataList" :key="index">
|
|
|
- <Cell class="article-item" title-class="article-item__title" value-class="article-item__time" :title="item.title"
|
|
|
- :value="formatDate(item.publishdate, 'MM/DD')" :to="{ name: 'news-detail', query: { id: item.id } }" />
|
|
|
+ <Cell class="article-item" title-class="article-item__title" value-class="article-item__time"
|
|
|
+ :title="item.title" :value="formatDate(item.publishdate, 'MM/DD')"
|
|
|
+ :to="{ name: 'news-detail', query: { id: item.id } }" />
|
|
|
</template>
|
|
|
</app-pull-refresh>
|
|
|
</app-view>
|
|
|
</template>
|
|
|
-
|
|
|
+
|
|
|
<script lang="ts" setup>
|
|
|
import { shallowRef } from 'vue'
|
|
|
import { Cell, Tab, Tabs, Empty } from 'vant'
|
|
|
@@ -27,6 +28,13 @@ import { useRequest } from '@/hooks/request'
|
|
|
import { querySiteColumnDetail, querySiteColumnConfig } from '@/services/api/news'
|
|
|
import AppPullRefresh from '@mobile/components/base/pull-refresh/index.vue'
|
|
|
|
|
|
+defineProps({
|
|
|
+ title: {
|
|
|
+ type: String,
|
|
|
+ default: '市场资讯'
|
|
|
+ }
|
|
|
+})
|
|
|
+
|
|
|
const pullRefreshRef = shallowRef()
|
|
|
const dataList = shallowRef<Model.SiteColumnDetailRsp[]>([])
|
|
|
const siteColumns = shallowRef<Model.SiteColumnConfigRsp[]>([])
|
|
|
@@ -69,7 +77,7 @@ const onClickTab = () => {
|
|
|
pullRefreshRef.value?.refresh()
|
|
|
}
|
|
|
</script>
|
|
|
-
|
|
|
+
|
|
|
<style lang="less">
|
|
|
@import './index.less';
|
|
|
</style>
|