Browse Source

更改分页总数

wangqin
zhangzhang 1 year ago
parent
commit
27febc35ef
  1. 34
      ruoyi-ui/src/views/JiHeExpressway/components/Pagination.vue

34
ruoyi-ui/src/views/JiHeExpressway/components/Pagination.vue

@ -1,37 +1,43 @@
<template> <template>
<ElPagination v-on="$listeners" v-bind="getProps" ref="ElPaginationRef" class="Pagination" /> <ElPagination
v-on="$listeners"
v-bind="getProps"
ref="ElPaginationRef"
class="Pagination"
/>
</template> </template>
<script> <script>
export default { export default {
name: 'Pagination', name: "Pagination",
computed: { computed: {
getProps() { getProps() {
return { return {
// total // total
layout: "prev, pager, next, sizes, jumper", layout: "prev, pager, next, sizes, jumper,total",
...this.$attrs, ...this.$attrs,
small: true, small: true,
} };
} },
}, },
mounted() { mounted() {
if (!this.$refs.ElPaginationRef) return; if (!this.$refs.ElPaginationRef) return;
const jumpPageDom = this.$refs.ElPaginationRef.$el.querySelector(".el-pagination__jump"); const jumpPageDom = this.$refs.ElPaginationRef.$el.querySelector(
".el-pagination__jump"
);
if (jumpPageDom?.childNodes?.[0]?.nodeValue) if (jumpPageDom?.childNodes?.[0]?.nodeValue)
jumpPageDom.childNodes[0].nodeValue = "跳至"; jumpPageDom.childNodes[0].nodeValue = "跳至";
} },
} };
</script> </script>
<style lang='scss' scoped> <style lang="scss" scoped>
.Pagination { .Pagination {
// color: #fff; // color: #fff;
::v-deep { ::v-deep {
> button, > button,
> ul li { > ul li {
background: #064258; background: #064258;
@ -42,20 +48,20 @@ export default {
> button { > button {
padding: 0 3px; padding: 0 3px;
border: 1px solid #00B3CC; border: 1px solid #00b3cc;
} }
> ul li { > ul li {
background: linear-gradient(180deg, #004960 0%, #004B62 100%); background: linear-gradient(180deg, #004960 0%, #004b62 100%);
margin: 0 1.5px; margin: 0 1.5px;
&.active { &.active {
background: linear-gradient(180deg, #005C79 0%, #009BCC 100%); background: linear-gradient(180deg, #005c79 0%, #009bcc 100%);
} }
} }
.el-pagination__total { .el-pagination__total {
color: #FFF; color: #fff;
} }
.el-pagination__sizes { .el-pagination__sizes {

Loading…
Cancel
Save