2023年6月29日 修改更多(少于4条时隐藏,可线上课)
This commit is contained in:
parent
df7c65b251
commit
9afb9f64e9
|
@ -36,7 +36,7 @@
|
||||||
<itemPage :data="item" @to-live-page="toLivePage" @funpingjia="funpingjia"></itemPage>
|
<itemPage :data="item" @to-live-page="toLivePage" @funpingjia="funpingjia"></itemPage>
|
||||||
</a-col>
|
</a-col>
|
||||||
<a-col :span="25" style="line-height: 50px;">
|
<a-col :span="25" style="line-height: 50px;">
|
||||||
<div v-show="1 == pageNo && current>0">
|
<div v-show="1 == pageNo && current > 0 && total > 4">
|
||||||
<div style="text-align: center;"><a @click="funMore">更多...</a></div>
|
<div style="text-align: center;"><a @click="funMore">更多...</a></div>
|
||||||
</div>
|
</div>
|
||||||
<div v-show="current==0">
|
<div v-show="current==0">
|
||||||
|
@ -79,6 +79,7 @@ const route = useRouter();
|
||||||
|
|
||||||
let pageNo = 1
|
let pageNo = 1
|
||||||
let current = 0
|
let current = 0
|
||||||
|
let total = 0
|
||||||
const emit = defineEmits(['setTotal']);
|
const emit = defineEmits(['setTotal']);
|
||||||
|
|
||||||
const { createMessage } = useMessage();
|
const { createMessage } = useMessage();
|
||||||
|
@ -126,6 +127,7 @@ function loadData(num?) {
|
||||||
// console.log(`🚀 ~ file: index.vue:104 ~ list ~ res:`, res)
|
// console.log(`🚀 ~ file: index.vue:104 ~ list ~ res:`, res)
|
||||||
listData.value.push(...res.records)
|
listData.value.push(...res.records)
|
||||||
current = res.pages
|
current = res.pages
|
||||||
|
total = res.total
|
||||||
// listData.value = res.records;
|
// listData.value = res.records;
|
||||||
// console.log(`🚀 ~ file: kclbList.vue:113 ~ list ~ listData.value:`, listData.value)
|
// console.log(`🚀 ~ file: kclbList.vue:113 ~ list ~ listData.value:`, listData.value)
|
||||||
})
|
})
|
||||||
|
|
|
@ -24,7 +24,7 @@
|
||||||
<itemPage :data="item" @to-live-page="toLivePage" @funpingjia="funpingjia"></itemPage>
|
<itemPage :data="item" @to-live-page="toLivePage" @funpingjia="funpingjia"></itemPage>
|
||||||
</a-col>
|
</a-col>
|
||||||
<a-col :span="25" style="line-height: 50px;">
|
<a-col :span="25" style="line-height: 50px;">
|
||||||
<div v-show="1 == pageNo && current>0">
|
<div v-show="1 == pageNo && current > 0 && total < 4 ">
|
||||||
<div style="text-align: center;"><a @click="funMore">更多...</a></div>
|
<div style="text-align: center;"><a @click="funMore">更多...</a></div>
|
||||||
</div>
|
</div>
|
||||||
<div v-show="current==0">
|
<div v-show="current==0">
|
||||||
|
@ -67,6 +67,7 @@ const route = useRouter();
|
||||||
|
|
||||||
let pageNo = 1
|
let pageNo = 1
|
||||||
let current = 0
|
let current = 0
|
||||||
|
let total = 0
|
||||||
const emit = defineEmits(['setTotal']);
|
const emit = defineEmits(['setTotal']);
|
||||||
|
|
||||||
const { createMessage } = useMessage();
|
const { createMessage } = useMessage();
|
||||||
|
@ -111,6 +112,7 @@ function loadData(num?) {
|
||||||
// console.log(`🚀 ~ file: index.vue:104 ~ list ~ res:`, res)
|
// console.log(`🚀 ~ file: index.vue:104 ~ list ~ res:`, res)
|
||||||
listData.value.push(...res.records)
|
listData.value.push(...res.records)
|
||||||
current = res.pages
|
current = res.pages
|
||||||
|
total = res.total
|
||||||
// pageNo = res.pages
|
// pageNo = res.pages
|
||||||
|
|
||||||
// if(res.total){
|
// if(res.total){
|
||||||
|
|
|
@ -24,7 +24,7 @@
|
||||||
<itemPage :data="item" @to-live-page="toLivePage" @funpingjia="funpingjia"></itemPage>
|
<itemPage :data="item" @to-live-page="toLivePage" @funpingjia="funpingjia"></itemPage>
|
||||||
</a-col>
|
</a-col>
|
||||||
<a-col :span="25" style="line-height: 50px;">
|
<a-col :span="25" style="line-height: 50px;">
|
||||||
<div v-show="1 == pageNo && current>0 && pageNo != current">
|
<div v-show="1 == pageNo && current > 0 && total > 4">
|
||||||
<div style="text-align: center;"><a @click="funMore">更多...</a></div>
|
<div style="text-align: center;"><a @click="funMore">更多...</a></div>
|
||||||
</div>
|
</div>
|
||||||
<div v-show="current==0">
|
<div v-show="current==0">
|
||||||
|
@ -67,6 +67,7 @@ const route = useRouter();
|
||||||
|
|
||||||
let pageNo = 1
|
let pageNo = 1
|
||||||
let current = 0
|
let current = 0
|
||||||
|
let total = 0
|
||||||
const emit = defineEmits(['setTotal']);
|
const emit = defineEmits(['setTotal']);
|
||||||
|
|
||||||
const { createMessage } = useMessage();
|
const { createMessage } = useMessage();
|
||||||
|
@ -110,6 +111,7 @@ function loadData(num?) {
|
||||||
console.log(`🚀 ~ file: index.vue:104 ~ list ~ res:`, res)
|
console.log(`🚀 ~ file: index.vue:104 ~ list ~ res:`, res)
|
||||||
listData.value.push(...res.records)
|
listData.value.push(...res.records)
|
||||||
current = res.pages
|
current = res.pages
|
||||||
|
total = res.total
|
||||||
// listData.value = res.records;
|
// listData.value = res.records;
|
||||||
// console.log(`🚀 ~ file: kclbList.vue:113 ~ list ~ listData.value:`, listData.value)
|
// console.log(`🚀 ~ file: kclbList.vue:113 ~ list ~ listData.value:`, listData.value)
|
||||||
})
|
})
|
||||||
|
|
Loading…
Reference in New Issue