添加鼠标移动到可点模块 鼠标样式改变 全局新增加载动画
This commit is contained in:
@@ -35,6 +35,7 @@ import noList from "../../components/public/empty-duck.vue";
|
||||
import circleBtn from '@/components/public/circle-btn.vue'
|
||||
import api from "../../utils/api";
|
||||
import tool from '../../toolJs/downLoadMore'
|
||||
import { ElMessage } from 'element-plus'
|
||||
|
||||
//获取数据
|
||||
let pages = ref(1)
|
||||
@@ -70,15 +71,15 @@ let getDataList = (data) => {
|
||||
let postData = {
|
||||
page: pages.value,
|
||||
intermediary: 1,
|
||||
limit:20,
|
||||
...data
|
||||
}
|
||||
api.getLists(postData).then(res => {
|
||||
if (res.code === 200) {
|
||||
loading.value = true
|
||||
dataList.data = res.data.data
|
||||
if (res.data.data.length === 0) {
|
||||
if(res.data.count<20){
|
||||
loading.value = false
|
||||
return
|
||||
}
|
||||
if (pages.value === 1) {
|
||||
setInitial()
|
||||
@@ -91,7 +92,10 @@ let getDataList = (data) => {
|
||||
pageList['2'].push(dataList.data[1])
|
||||
})
|
||||
} else {
|
||||
// ElMessage(res.message)
|
||||
ElMessage({
|
||||
message: res.message,
|
||||
center: true,
|
||||
})
|
||||
}
|
||||
})
|
||||
}
|
||||
@@ -99,10 +103,12 @@ let getDataList = (data) => {
|
||||
//添加数据
|
||||
let addListData = () => {
|
||||
let num = null
|
||||
if (pageList.tab >= 18){
|
||||
loading.value = true
|
||||
if (pageList.tab >= (dataList.count>20?20-2:dataList.count-2)) {
|
||||
if(dataList.count>20){
|
||||
loading.value = true
|
||||
}
|
||||
return
|
||||
}
|
||||
}
|
||||
pageList.tab++
|
||||
if (pageList.height1 > pageList.height2) {
|
||||
num = 2
|
||||
|
||||
Reference in New Issue
Block a user