fix: 修复 table 分页问题
This commit is contained in:
@@ -400,9 +400,9 @@ export default {
|
|||||||
const dateRangeValue = 60
|
const dateRangeValue = 60
|
||||||
const { startTime, endTime } = getNowTime(dateRangeValue)
|
const { startTime, endTime } = getNowTime(dateRangeValue)
|
||||||
const chartTimeFilter = ref({ startTime, endTime, dateRangeValue })
|
const chartTimeFilter = ref({ startTime, endTime, dateRangeValue })
|
||||||
let table = {}
|
let table = ref( '')
|
||||||
if (isBasicTable(props.chartInfo.type)) {
|
if (isBasicTable(props.chartInfo.type)) {
|
||||||
table = {
|
table.value = {
|
||||||
pageSize: chartTableDefaultPageSize,
|
pageSize: chartTableDefaultPageSize,
|
||||||
limit: chartTableTopOptions[0], // top-n
|
limit: chartTableTopOptions[0], // top-n
|
||||||
orderBy: props.chartInfo.params.columns.order[0],
|
orderBy: props.chartInfo.params.columns.order[0],
|
||||||
|
|||||||
@@ -155,7 +155,7 @@ export default {
|
|||||||
})
|
})
|
||||||
}, 100)
|
}, 100)
|
||||||
},
|
},
|
||||||
chartHeightData (e) {
|
changeChartRowHeight (e) {
|
||||||
const width = e.currentTarget.innerWidth
|
const width = e.currentTarget.innerWidth
|
||||||
if (width < 1440) {
|
if (width < 1440) {
|
||||||
this.rowHeight = 25
|
this.rowHeight = 25
|
||||||
@@ -169,7 +169,7 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
mounted () {
|
mounted () {
|
||||||
this.debounceFunc = this.$_.debounce(this.chartHeightData, 100)
|
this.debounceFunc = this.$_.debounce(this.changeChartRowHeight, 100)
|
||||||
window.addEventListener('resize', this.debounceFunc)
|
window.addEventListener('resize', this.debounceFunc)
|
||||||
},
|
},
|
||||||
beforeUnmount () {
|
beforeUnmount () {
|
||||||
|
|||||||
Reference in New Issue
Block a user