This commit is contained in:
不做码农 2022-06-02 19:34:56 +08:00
parent 4db966051e
commit 6357c7005a
5 changed files with 36 additions and 50 deletions

View File

@ -115,7 +115,7 @@ function onGoToGiteeClick() {
:deep(.el-empty__description p) {
font-size: 13px;
}
.head-box-title{
color: var(--base-color-white);
.head-box-title {
color: var(--base-color-white);
}
</style>

View File

@ -1,16 +1,25 @@
<template>
<div :class="{ 'hidden': hidden }" class="pagination-container">
<el-pagination small background v-model:current-page="currentPage" v-model:page-size="pageSize" :layout="layout" :page-sizes="pageSizes"
:pager-count="pagerCount" :total="total" @size-change="handleSizeChange" @current-change="handleCurrentChange" />
<div :class="{ hidden: hidden }" class="pagination-container">
<el-pagination
small
background
v-model:current-page="currentPage"
v-model:page-size="pageSize"
:layout="layout"
:page-sizes="pageSizes"
:pager-count="pagerCount"
:total="total"
@size-change="handleSizeChange"
@current-change="handleCurrentChange" />
</div>
</template>
<script>
// import { scrollTo } from "@/utils/scroll-to";
import { computed } from "vue";
import { computed } from 'vue'
export default {
name: "pagingation",
emits: ["update:page", "update:limit", "pagination"],
name: 'pagingation',
emits: ['update:page', 'update:limit', 'pagination'],
props: {
total: {
required: true,
@ -27,7 +36,7 @@ export default {
pageSizes: {
type: Array,
default() {
return [10, 20, 30, 50];
return [10, 20, 30, 50, 100]
},
},
// 5
@ -37,7 +46,7 @@ export default {
},
layout: {
type: String,
default: "total, sizes, prev, pager, next, jumper",
default: 'total, sizes, prev, pager, next, jumper',
},
background: {
type: Boolean,
@ -52,46 +61,45 @@ export default {
default: false,
},
},
setup(props, {ctx, emit }) {
setup(props, { ctx, emit }) {
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);
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);
}
}
function handleCurrentChange(val) {
emit("pagination", { page: val, limit: pageSize.value });
emit('pagination', { page: val, limit: pageSize.value })
if (props.autoScroll) {
// scrollTo(0, 800);
}
}
return {
currentPage,
pageSize,
currentPage,
pageSize,
handleSizeChange,
handleCurrentChange,
};
}
},
};
}
</script>
<style scoped>
.pagination-container {
@ -101,4 +109,4 @@ export default {
.pagination-container.hidden {
display: none;
}
</style>
</style>

View File

@ -2,7 +2,7 @@ export default {
/**
* 框架版本号
*/
version: '3.8.0',
version: '3.8.1',
/**
* 网页标题
*/

View File

@ -48,7 +48,7 @@
size="small"
icon="Document"
plain
@click="goTarget('http://www.izhaorui.cn/doc/#/changelog?id=v' + version)"
@click="goTarget('http://www.izhaorui.cn/doc/changelog.html#' + version)"
>{{ $t('layout.changeLog') }}
</el-link>
</p>

View File

@ -143,31 +143,9 @@
</el-icon>
</el-tooltip>
</template>
<el-input v-model="info.genPath">
<template #append>
<el-dropdown>
<el-button type="primary">
最近路径快速选择
<el-icon>
<question-filled />
</el-icon>
</el-button>
<template #dropdown>
<el-dropdown-menu>
<el-dropdown-item @click="info.genPath = '/'">恢复默认的生成基础路径</el-dropdown-item>
<el-dropdown-item @click="info.genPath = ''">本项目</el-dropdown-item>
</el-dropdown-menu>
</template>
</el-dropdown>
</template>
</el-input>
<el-input v-model="info.genPath"></el-input>
</el-form-item>
</el-col>
<!-- <el-col :lg="12">
<el-form-item prop="vuePath" label="Vue路径">
<el-input v-model="info.vuePath" placeholder="Vue项目所在绝对路径到项目根目录egD:/ZRAdmin-vue"></el-input>
</el-form-item>
</el-col> -->
<el-col :lg="12">
<el-form-item prop="colNum" label="一行显示列">
<el-radio v-model="info.colNum" :label="12">2列</el-radio>