提交 7af25e2b 编写于 作者: WodahsOrez's avatar WodahsOrez

update: 表格分页

上级 3fb53ccb
.grid-pagination { .grid-pagination {
height: 44px;
padding: 0 80px 0 20px;
background-color: var(--app-color-white);
display: flex; display: flex;
justify-content: flex-end;
align-items: center; align-items: center;
gap: 15px; justify-content: flex-end;
color: var(--app-color-gray-100); padding: 39px 62px 25px 0;
border-top: 1px solid var(--app-color-gray-400); color: var(--ey-color-gray-100);
// 选择分页大小
.grid-pagination-size {
width: 100px;
color: var(--ey-color-gray-100);
background: var(--ey-color-white);
&.ivu-select .ivu-select-selection {
border-radius: 4px;
border: 1px solid var(--ey-color-gray-200);
height: 30px;
min-height: 30px;
}
margin-left: 18px;
margin-right: 21px;
}
// 中间页数样式
.ivu-page { .ivu-page {
height: 25px; .ivu-page-prev,
display: flex; .ivu-page-next,
.ivu-page-item {
width: 30px;
height: 30px;
min-height: 30px;
border-radius: 4px;
border-width: 0;
font-weight: bold;
background: var(--ey-color-gray-400);
&:hover a {
color: var(--ey-color-blue-green);
} }
.ivu-page-simple-pager { &.ivu-page-disabled {
pointer-events: none;
cursor: pointer; cursor: pointer;
input { a {
border: 0; cursor: pointer;
color: var(--ey-color-gray-100);
} }
&:hover a{
color: var(--ey-color-blue-green);
} }
.grid-page-pre-pro {
transform: rotate(90deg);
} }
.grid-page-next-pro { .ivu-icon {
transform: rotate(-90deg); font-weight: bold;
} }
.grid-page-pre-pro,.grid-page-next-pro {
font-size: 24px;
margin-top: -2px;
cursor: pointer;
} }
.ivu-icon { .ivu-page-item-active {
font-size: 24px; a {
color: var(--app-color-gray-100); color: var(--ey-color-white);
} }
.grid-pagination__dropdown { &:hover a{
cursor: pointer; color: var(--ey-color-white);
span { }
color: var(--app-color-black); background: var(--ey-color-blue-green);
font-weight: 600; }
}
// 页面跳转
.ivu-page-options-elevator {
height: 30px;
line-height: 30px;
input {
height: 30px;
width: 45px;
text-align: center;
}
input:focus {
border-color: var(--ey-color-blue-green);
box-shadow: none;
}
}
}
// 分页大小popover
.grid-pagination-size-popover {
padding: 0;
// margin: 10px 0;
height: 132px;
width: 100px;
.ivu-select-item {
color: var(--ey-color-gray-100);
border-bottom: 1px solid var(--ey-color-gray-250);
padding: 7px 16px 7px 10px;
text-align: left !important;
}
&.ivu-select-dropdown .ivu-select-dropdown-list .ivu-select-item.ivu-select-item-selected {
color: var(--ey-color-gray-100);
background-color: var(--ey-color-white);
&:hover {
color: var(--ey-color-black);
background-color: var(--ey-color-blue-green-110);
} }
.ivu-icon {
margin-left: 15px;
} }
.ivu-select-item:hover {
color: var(--ey-color-black);
background-color: var(--ey-color-blue-green-110);
} }
} }
<template> <template>
<row class="grid-pagination"> <row class="grid-pagination">
<dropdown class="grid-pagination__dropdown" @on-click="handleSizeChange"> <span>&nbsp;{{ totalRow }}&nbsp;</span>
Show <span>{{ limit }}</span> <i-select transfer-class-name="grid-pagination-size-popover" class="grid-pagination-size" :value="limit" :transfer="true" @on-change="handleSizeChange">
<icon type="ios-arrow-down"></icon> <i-option v-for="item in pageSize" :key="item" :value="item" style="text-align: center"
<template #list> >{{ item }} 条/页</i-option
<dropdownMenu> >
<dropdownItem v-for="(value, index) in pageSize" :key="index" :name="value">{{ value }} 条/页</dropdownItem> </i-select>
</dropdownMenu>
</template>
</dropdown>
<div class="grid-page-pre-pro">
<i class="el-icon-download"></i>
</div>
<page <page
class="pull-right" class="pull-right"
:transfer="true"
:total="totalRow" :total="totalRow"
simple show-elevator
size="small"
:current="curPage" :current="curPage"
:page-size="limit" :page-size="limit"
@on-change="handleChange($event)" @on-change="handleChange($event)"
> >
</page> </page>
<div class="grid-page-next-pro">
<i class="el-icon-download"></i>
</div>
</row> </row>
</template> </template>
...@@ -34,7 +23,6 @@ import { Vue, Component, Prop } from "vue-property-decorator"; ...@@ -34,7 +23,6 @@ import { Vue, Component, Prop } from "vue-property-decorator";
@Component({}) @Component({})
export default class AppGridPagination extends Vue { export default class AppGridPagination extends Vue {
/** /**
* 总行数 * 总行数
* *
...@@ -65,7 +53,7 @@ export default class AppGridPagination extends Vue { ...@@ -65,7 +53,7 @@ export default class AppGridPagination extends Vue {
* @type {Array<*>} * @type {Array<*>}
* @memberof AppGridPagination * @memberof AppGridPagination
*/ */
public pageSize= [10, 20, 30, 40, 50, 60, 70, 80, 90, 100]; public pageSize = [10, 20, 30, 40, 50, 60, 70, 80, 90, 100];
/** /**
* 处理当前页改变 * 处理当前页改变
...@@ -74,7 +62,7 @@ export default class AppGridPagination extends Vue { ...@@ -74,7 +62,7 @@ export default class AppGridPagination extends Vue {
* @memberof AppGridPagination * @memberof AppGridPagination
*/ */
public handleChange($event: any) { public handleChange($event: any) {
this.$emit('page-change', $event); this.$emit("page-change", $event);
} }
/** /**
...@@ -84,7 +72,7 @@ export default class AppGridPagination extends Vue { ...@@ -84,7 +72,7 @@ export default class AppGridPagination extends Vue {
* @memberof AppGridPagination * @memberof AppGridPagination
*/ */
public handleSizeChange($event: any) { public handleSizeChange($event: any) {
this.$emit('page-size-change', $event); this.$emit("page-size-change", $event);
} }
} }
</script> </script>
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册