This commit is contained in:
parent
b404f384d8
commit
7948459b5c
12
src/main.js
12
src/main.js
|
@ -6,5 +6,13 @@ import router from "./router";
|
|||
import ElementPlus from 'element-plus'
|
||||
import 'element-plus/dist/index.css'
|
||||
import './assets/css/common.css'
|
||||
|
||||
createApp(App).use(router).use(ElementPlus).mount('#app')
|
||||
import zhCn from 'element-plus/dist/locale/zh-cn.mjs'
|
||||
zhCn.el.pagination = {
|
||||
goto: "跳转至",
|
||||
pageClassifier: "",
|
||||
pagesize: "",
|
||||
total: "共 {total} 条",
|
||||
};
|
||||
createApp(App).use(router).use(ElementPlus,{
|
||||
locale: zhCn,
|
||||
}).mount('#app')
|
||||
|
|
|
@ -58,7 +58,7 @@
|
|||
<el-table-column
|
||||
:key="item.label"
|
||||
v-if="item.type === 'slot'"
|
||||
:width="item.width"
|
||||
:show-overflow-tooltip="true"
|
||||
:label="item.label"
|
||||
:property="item.property"
|
||||
align="center"
|
||||
|
@ -75,7 +75,7 @@
|
|||
:key="item.label"
|
||||
:property="item.property"
|
||||
:label="item.label"
|
||||
:width="item.width"
|
||||
:show-overflow-tooltip="true"
|
||||
align="center"
|
||||
v-else
|
||||
/>
|
||||
|
@ -86,7 +86,7 @@
|
|||
<div class="pagePart">
|
||||
<el-pagination
|
||||
background
|
||||
layout="prev, pager, next"
|
||||
layout="prev, pager, next,total"
|
||||
:page-size="pagination.pageSize"
|
||||
:total="pagination.total"
|
||||
prev-text="上一页"
|
||||
|
@ -153,7 +153,7 @@ const data = reactive({
|
|||
|
||||
const gridData = [];
|
||||
//切换页数后置顶
|
||||
const tableKey = ref(Math.random())
|
||||
const tableKey = ref(Math.random());
|
||||
// 监听
|
||||
watch(
|
||||
() => props.dialogShow,
|
||||
|
@ -167,7 +167,7 @@ watch(
|
|||
() => props.tableData,
|
||||
(newVal, oldVal) => {
|
||||
data.tableData = props.tableData;
|
||||
tableKey.value = Math.random()
|
||||
tableKey.value = Math.random();
|
||||
}
|
||||
);
|
||||
// 使用生命钩子
|
||||
|
@ -176,6 +176,9 @@ onMounted(() => {
|
|||
data.columns = props.columns;
|
||||
data.title = props.title;
|
||||
data.tableData = props.tableData;
|
||||
const paginationTotal = document.querySelector(".el-pagination__total");
|
||||
console.log(paginationTotal);
|
||||
// paginationTotal.innerText = `总共 ${props.pagination.total} 组数据`;
|
||||
});
|
||||
|
||||
const closeDialog = () => {
|
||||
|
@ -248,6 +251,9 @@ const handle = (current) => {
|
|||
:deep(.el-pagination button:disabled) {
|
||||
background-color: rgba(0, 116, 255, 0) !important;
|
||||
}
|
||||
:deep(.el-pagination > .is-last) {
|
||||
color: #ffffff;
|
||||
}
|
||||
}
|
||||
|
||||
.bo {
|
||||
|
|
Loading…
Reference in New Issue