|
@@ -12,8 +12,8 @@
|
|
|
<a-menu @click="changeMenu" v-model:selectedKeys="rightCurrent" mode="horizontal" :items="rightTopItems" />
|
|
|
</div>
|
|
|
<!-- <div class="grayLine"></div> -->
|
|
|
- <div class="newsBox">
|
|
|
- <div class="news" v-for="item in list" :key="item.id">
|
|
|
+ <div v-if="list.length>0" class="newsBox">
|
|
|
+ <div class="news" v-for="item in list" :key="item.id">
|
|
|
<div v-if="item.url!=''" class="news_one">
|
|
|
<img class="news_one_img" :src="item.fileUrl" alt="">
|
|
|
</div>
|
|
@@ -31,8 +31,11 @@
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
+ <div v-else style="text-align: center;margin-top: 20px;">
|
|
|
+ 暂无数据
|
|
|
+ </div>
|
|
|
<div v-if="total>0" class="pagination">
|
|
|
- <a-pagination v-model:current="pagecurrent" :total="total" />
|
|
|
+ <a-pagination v-model:current="pagecurrent" :pageSize='pageSize' :total="total" />
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
@@ -53,6 +56,7 @@ const rightCurrent = ref(['1']);
|
|
|
|
|
|
const list = ref([])
|
|
|
const pagecurrent = ref(1)
|
|
|
+const pageSize = ref(5)
|
|
|
const total = ref(0)
|
|
|
|
|
|
const props = defineProps({
|
|
@@ -92,6 +96,7 @@ const changeMenu = async (data) =>{
|
|
|
console.log('点击了',rightCurrent.value[0]);
|
|
|
let find = rightTopItems.value.find(v => v.id == data.item.id)
|
|
|
columnIdName.value = find.name
|
|
|
+ pagecurrent.value = 1
|
|
|
await getArticle(find)
|
|
|
}
|
|
|
watch(pagecurrent, async() => {
|
|
@@ -103,7 +108,7 @@ const getArticle = async (data) =>{
|
|
|
//获取列表
|
|
|
let res = await getArticleByOpen({
|
|
|
"pageNum": pagecurrent.value || 1,
|
|
|
- "pageSize": 5,
|
|
|
+ "pageSize": pageSize.value,
|
|
|
"columnId": data.columnId,
|
|
|
"subId": data.id,
|
|
|
})
|
|
@@ -118,7 +123,7 @@ const getArticle = async (data) =>{
|
|
|
})
|
|
|
list.value = data
|
|
|
|
|
|
- pagecurrent.value = 1
|
|
|
+
|
|
|
total.value = res?.data?.total
|
|
|
|
|
|
}else{
|