Files
vxe-table/examples/views/table/scroll/ScrollCols.vue
xuliangzhan 08272c6f56 update
2019-06-06 21:59:18 +08:00

41 lines
1.1 KiB
Vue
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
<template>
<div>
<p>可视渲染加载 1 万行 1 万列</p>
<p><grid-api-link name="vxe-grid"/> 的性能比 <table-api-link name="vxe-table"/> n 因为不需要为每个 <table-column-api-link name="vxe-table-column"/> 创建实例列越多越能体现出来</p>
<vxe-grid
border
resizable
show-all-overflow
show-header-all-overflow
height="600"
:columns="tableColumn"
:loading="loading"
:data.sync="tableData"
:select-config="{checkProp: 'checked'}"
:optimization ="{scrollX: {gt: 20, oSize: 4, rSize: 8}, scrollY: {gt: 500, oSize: 20, rSize: 60}}">
</vxe-grid>
</div>
</template>
<script>
export default {
data () {
return {
loading: false,
tableColumn: [],
tableData: []
}
},
created () {
this.loading = true
this.tableData = []
setTimeout(() => {
this.tableData = window.MOCK_DATA_LIST.slice(0, 10000)
this.tableColumn = window.MOCK_COLUMN_LIST.slice(0, 10000)
this.loading = false
}, 500)
}
}
</script>