优化
This commit is contained in:
@@ -9,5 +9,6 @@ export const defaultAttribute:VxeTableProps = {
|
|||||||
columnConfig: { resizable: true },
|
columnConfig: { resizable: true },
|
||||||
rowConfig: { isCurrent: true, isHover: true },
|
rowConfig: { isCurrent: true, isHover: true },
|
||||||
scrollX: { scrollToLeftOnChange: true },
|
scrollX: { scrollToLeftOnChange: true },
|
||||||
|
scrollY: { scrollToTopOnChange: true,enabled:true },
|
||||||
treeConfig: {}
|
treeConfig: {}
|
||||||
}
|
}
|
||||||
@@ -48,6 +48,7 @@ export default class TableStore {
|
|||||||
}
|
}
|
||||||
|
|
||||||
index() {
|
index() {
|
||||||
|
this.table.data = []
|
||||||
this.table.loading = true
|
this.table.loading = true
|
||||||
// 重置用的数据数据
|
// 重置用的数据数据
|
||||||
if (!this.initData) {
|
if (!this.initData) {
|
||||||
@@ -124,7 +125,10 @@ export default class TableStore {
|
|||||||
() => {
|
() => {
|
||||||
this.table.params.pageNum = data.page
|
this.table.params.pageNum = data.page
|
||||||
if (this.isWebPaging) {
|
if (this.isWebPaging) {
|
||||||
this.table.data = this.table.webPagingData[data.page - 1]
|
this.table.data = []
|
||||||
|
requestAnimationFrame(() => {
|
||||||
|
this.table.data = this.table.webPagingData[data.page - 1]
|
||||||
|
})
|
||||||
} else {
|
} else {
|
||||||
this.index()
|
this.index()
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user