mirror of
https://github.com/jumpserver/lina.git
synced 2025-09-25 22:36:23 +00:00
perf: 列表记录默认显示条数
This commit is contained in:
@@ -70,6 +70,7 @@ export default {
|
|||||||
},
|
},
|
||||||
pageCount: 5,
|
pageCount: 5,
|
||||||
paginationLayout: 'total, sizes, prev, pager, next',
|
paginationLayout: 'total, sizes, prev, pager, next',
|
||||||
|
paginationSize: JSON.parse(localStorage.getItem('paginationSize')) || 15,
|
||||||
paginationSizes: [15, 30, 50, 100],
|
paginationSizes: [15, 30, 50, 100],
|
||||||
paginationBackground: true,
|
paginationBackground: true,
|
||||||
transformQuery: query => {
|
transformQuery: query => {
|
||||||
@@ -107,7 +108,6 @@ export default {
|
|||||||
},
|
},
|
||||||
tableConfig() {
|
tableConfig() {
|
||||||
const tableDefaultConfig = this.defaultConfig
|
const tableDefaultConfig = this.defaultConfig
|
||||||
tableDefaultConfig.paginationSize = 15
|
|
||||||
let tableAttrs = tableDefaultConfig.tableAttrs
|
let tableAttrs = tableDefaultConfig.tableAttrs
|
||||||
if (this.config.tableAttrs) {
|
if (this.config.tableAttrs) {
|
||||||
tableAttrs = Object.assign(tableAttrs, this.config.tableAttrs)
|
tableAttrs = Object.assign(tableAttrs, this.config.tableAttrs)
|
||||||
@@ -155,6 +155,7 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
handleSizeChange(val) {
|
handleSizeChange(val) {
|
||||||
|
localStorage.setItem('paginationSize', val)
|
||||||
this.$store.commit('table/SET_TABLE_CONFIG',
|
this.$store.commit('table/SET_TABLE_CONFIG',
|
||||||
{
|
{
|
||||||
key: 'paginationSize',
|
key: 'paginationSize',
|
||||||
|
Reference in New Issue
Block a user