elementplus 修改分页组件el-pagination的背景色,并且让其居中,显示中文(默认是英文)
在App.vue中添加以下配置
个人博客详情介绍
国际化 | Element Plus (gitee.io)
<template>
<el-config-provider :locale="locale">
<router-view />
</el-config-provider>
</template>
<script setup>
import zhCn from 'element-plus/lib/locale/lang/zh-cn'
import { ref } from "vue";
let locale=ref(zhCn)
</script>
在有分页组件el-pagination组件的添加以下样式即可
.el-pagination {
justify-content: center; //居中
//float: left;居左
//float: right;居右
}
:deep(.el-pagination.is-background .el-pager li:not(.is-disabled).is-active) {
background-color: #ff9800 !important; //修改默认的背景色
}