refactor: element-plus升级正式版本移除size为mini的值同步修改

This commit is contained in:
郝先瑞
2022-02-20 23:56:31 +08:00
parent e562386c6e
commit 6ff9269fa8
9 changed files with 228 additions and 35 deletions

View File

@@ -17,7 +17,7 @@
import {computed} from "vue";
import {scrollTo} from '@/utils/scroll-to'
const props=defineProps({
const props = defineProps({
total: {
required: true,
type: Number,
@@ -70,18 +70,19 @@ const pageSize = computed({
get() {
return props.limit
},
set(val){
set(val) {
emit('update:limit', val)
}
})
function handleSizeChange(val){
function handleSizeChange(val) {
emit('pagination', {page: currentPage, limit: val})
if (props.autoScroll) {
scrollTo(0, 800)
}
}
function handleCurrentChange(val){
function handleCurrentChange(val) {
emit('pagination', {page: val, limit: props.pageSizes})
if (props.autoScroll) {
scrollTo(0, 800)