|
|
@ -6,7 +6,7 @@ import { useInfiniteScroll } from '@vueuse/core'
|
|
|
|
import dayjs from 'dayjs'
|
|
|
|
import dayjs from 'dayjs'
|
|
|
|
|
|
|
|
|
|
|
|
// import imagesloaded from 'imagesloaded'
|
|
|
|
// import imagesloaded from 'imagesloaded'
|
|
|
|
import { cloneDeep } from 'lodash-es'
|
|
|
|
import { cloneDeep, debounce } from 'lodash-es'
|
|
|
|
|
|
|
|
|
|
|
|
// import Masonry from 'masonry-layout'
|
|
|
|
// import Masonry from 'masonry-layout'
|
|
|
|
import { NIcon, useMessage } from 'naive-ui'
|
|
|
|
import { NIcon, useMessage } from 'naive-ui'
|
|
|
@ -226,10 +226,15 @@ watch(() => collapse.value, (newVal, oldVal) => {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
})
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const asideLoadMore = debounce(() => {
|
|
|
|
|
|
|
|
// console.log("加载了这里首页的数据--------------------");
|
|
|
|
|
|
|
|
loadMore()
|
|
|
|
|
|
|
|
}, 200)
|
|
|
|
|
|
|
|
|
|
|
|
watch(
|
|
|
|
watch(
|
|
|
|
() => searchValue.value,
|
|
|
|
() => searchValue.value,
|
|
|
|
async (newVal, oldVal) => {
|
|
|
|
async (newVal, oldVal) => {
|
|
|
|
// console.log('搜索框的值', newVal, oldVal)
|
|
|
|
// console.log('首页搜索框的值', newVal, oldVal)
|
|
|
|
if (newVal) {
|
|
|
|
if (newVal) {
|
|
|
|
isInitSeaerch.value = true
|
|
|
|
isInitSeaerch.value = true
|
|
|
|
// pagination.pageNo = 0
|
|
|
|
// pagination.pageNo = 0
|
|
|
@ -238,29 +243,30 @@ watch(
|
|
|
|
// isInitSeaerch.value = false
|
|
|
|
// isInitSeaerch.value = false
|
|
|
|
// // configStore.setSearchValue("");
|
|
|
|
// // configStore.setSearchValue("");
|
|
|
|
reset()
|
|
|
|
reset()
|
|
|
|
loadMore()
|
|
|
|
// loadMore()
|
|
|
|
|
|
|
|
asideLoadMore()
|
|
|
|
isInitSeaerch.value = false
|
|
|
|
isInitSeaerch.value = false
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
// else {
|
|
|
|
isInitSeaerch.value = true
|
|
|
|
// isInitSeaerch.value = true
|
|
|
|
// pagination.pageNo = 0
|
|
|
|
// // pagination.pageNo = 0
|
|
|
|
// const more = await featchList()
|
|
|
|
// // const more = await featchList()
|
|
|
|
// listData.value = more
|
|
|
|
// // listData.value = more
|
|
|
|
|
|
|
|
// // isInitSeaerch.value = false
|
|
|
|
|
|
|
|
// reset()
|
|
|
|
|
|
|
|
// loadMore()
|
|
|
|
// isInitSeaerch.value = false
|
|
|
|
// isInitSeaerch.value = false
|
|
|
|
reset()
|
|
|
|
// }
|
|
|
|
loadMore()
|
|
|
|
|
|
|
|
isInitSeaerch.value = false
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
},
|
|
|
|
},
|
|
|
|
)
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
|
|
watch(
|
|
|
|
watch(
|
|
|
|
() => configStore.getAsideValue,
|
|
|
|
() => configStore.getAsideValue,
|
|
|
|
async (newVal, oldVal) => {
|
|
|
|
async (newVal, oldVal) => {
|
|
|
|
// console.log('configStore.getAsideValue变化了啊', configStore.getAsideValue, pagination.pageNo)
|
|
|
|
// console.log('configStore.getAsideValue首页变化了啊', newVal, oldVal, Object.entries(newVal).toString() === Object.entries(oldVal).toString(), pagination.pageNo)
|
|
|
|
if (pagination.pageNo > 1 && newVal && !(Object.entries(newVal).toString() === Object.entries(oldVal).toString())) {
|
|
|
|
if (pagination.pageNo > 1 && newVal && !(Object.entries(newVal).toString() === Object.entries(oldVal).toString())) {
|
|
|
|
reset()
|
|
|
|
reset()
|
|
|
|
loadMore()
|
|
|
|
asideLoadMore()
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
},
|
|
|
|
)
|
|
|
|
)
|
|
|
@ -579,7 +585,9 @@ async function refreshHandler(filtersearchId?: any) {
|
|
|
|
|
|
|
|
|
|
|
|
if (filtersearchId)
|
|
|
|
if (filtersearchId)
|
|
|
|
filterId = filtersearchId
|
|
|
|
filterId = filtersearchId
|
|
|
|
loadMore()
|
|
|
|
// console.log("执行了这里首页的数据");
|
|
|
|
|
|
|
|
// loadMore()
|
|
|
|
|
|
|
|
asideLoadMore()
|
|
|
|
// nextTick(() => {
|
|
|
|
// nextTick(() => {
|
|
|
|
// setTimeout(() => {
|
|
|
|
// setTimeout(() => {
|
|
|
|
// useInfiniteScroll(
|
|
|
|
// useInfiniteScroll(
|
|
|
@ -1082,6 +1090,10 @@ defineExpose({
|
|
|
|
margin-right: 16px;
|
|
|
|
margin-right: 16px;
|
|
|
|
width: 100%;
|
|
|
|
width: 100%;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
::v-deep(.vue-waterfall) {
|
|
|
|
|
|
|
|
padding-top: 2px;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
&-header {
|
|
|
|
&-header {
|
|
|
|
display: flex;
|
|
|
|
display: flex;
|
|
|
|
justify-content: space-between;
|
|
|
|
justify-content: space-between;
|
|
|
|