路由修改,文件移动

This commit is contained in:
熊丽君
2021-12-30 16:48:43 +08:00
parent bd085bbe8b
commit cab6a9cfa8
13 changed files with 537 additions and 34 deletions

View File

@ -1,5 +1,5 @@
<template>
<div :class="{ 'hidden': hidden }" class="pagination-container">
<div :class="{ hidden: hidden }" class="pagination-container">
<el-pagination
:background="background"
v-model:current-page="currentPage"
@ -15,86 +15,87 @@
</template>
<script setup>
import { scrollTo } from '@/utils/scroll-to'
import { scrollTo } from "@/utils/scroll-to";
const props = defineProps({
total: {
required: true,
type: Number
type: Number,
},
page: {
type: Number,
default: 1
default: 1,
},
limit: {
type: Number,
default: 20
default: 20,
},
pageSizes: {
type: Array,
default() {
return [10, 20, 30, 50]
}
return [10, 20, 30, 50];
},
},
// 移动端页码按钮的数量端默认值5
pagerCount: {
type: Number,
default: document.body.clientWidth < 992 ? 5 : 7
default: document.body.clientWidth < 992 ? 5 : 7,
},
layout: {
type: String,
default: 'total, sizes, prev, pager, next, jumper'
default: "total, sizes, prev, pager, next, jumper",
},
background: {
type: Boolean,
default: true
default: true,
},
autoScroll: {
type: Boolean,
default: true
default: true,
},
hidden: {
type: Boolean,
default: false
}
})
default: false,
},
});
const emit = defineEmits();
const currentPage = computed({
get() {
return props.page
return props.page;
},
set(val) {
emit('update:page', val)
}
})
emit("update:page", val);
},
});
const pageSize = computed({
get() {
return props.limit
return props.limit;
},
set(val){
emit('update:limit', val)
}
})
set(val) {
emit("update:limit", val);
},
});
function handleSizeChange(val) {
emit('pagination', { page: currentPage.value, limit: val })
emit("pagination", { page: currentPage.value, limit: val });
if (props.autoScroll) {
scrollTo(0, 800)
scrollTo(0, 800);
}
}
function handleCurrentChange(val) {
emit('pagination', { page: val, limit: pageSize.value })
emit("pagination", { page: val, limit: pageSize.value });
if (props.autoScroll) {
scrollTo(0, 800)
scrollTo(0, 800);
}
}
</script>
<style scoped>
.pagination-container {
background: #fff;
padding: 32px 16px;
/* background: #fff; */
/* padding: 32px 16px; */
margin: 0;
height: 50px;
}
.pagination-container.hidden {
display: none;

View File

@ -137,7 +137,7 @@ dt {
}
.webHead {
position: absolute;
z-index: 1;
z-index: 2001;
top: 0;
left: 0;
width: 100%;
@ -157,7 +157,6 @@ dt {
.show_box {
display: none;
position: absolute;
z-index: 2001;
bottom: -170px;
width: 100%;
text-align: center;
@ -165,6 +164,8 @@ dt {
div {
height: 42px;
line-height: 42px;
font-size: 14px;
color: #666666;
background-color: #f2f6ff;
}
._active {