Skip to content

Commit

Permalink
Merge branch 'master' of github.com:wuyouhuaz/vxe-table
Browse files Browse the repository at this point in the history
  • Loading branch information
wuyouhua committed Jan 14, 2025
2 parents 86edc50 + 2a0a913 commit b940450
Show file tree
Hide file tree
Showing 17 changed files with 2,330 additions and 1,807 deletions.
6 changes: 5 additions & 1 deletion examples/views/table/TableTest1.vue
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
<template>
<div>
<vxe-button @click="loadData(0)">加载0条</vxe-button>
<vxe-button @click="loadData(5)">加载5条</vxe-button>
<vxe-button @click="loadData(20)">加载20条</vxe-button>
<vxe-button @click="loadData(1000)">加载1000条</vxe-button>
<vxe-button @click="loadData(5000)">加载5k条</vxe-button>
<vxe-button @click="loadData(10000)">加载1w条</vxe-button>
<vxe-button @click="loadData(50000)">加载5w条</vxe-button>
Expand Down Expand Up @@ -213,6 +217,6 @@ const loadData = (rowSize) => {
})
}, 100)
}
loadData(200)
loadData(100)
</script>
4 changes: 2 additions & 2 deletions examples/views/table/TableTest8.vue
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
:scroll-y="{enabled: true, gt: 0}"
:data="tableData"
:footer-data="footerData">
<vxe-column type="checkbox" width="80" fixed="left" drag-sort></vxe-column>
<vxe-column field="checkbox" type="checkbox" width="80" fixed="left" drag-sort></vxe-column>
<vxe-column field="col0" title="列0" width="100" fixed="left"></vxe-column>
<vxe-column field="imgUrl" title="列1" width="80" fixed="left" :cell-render="imgUrlCellRender"></vxe-column>
<vxe-column field="col2" title="列2" width="90"></vxe-column>
Expand Down Expand Up @@ -189,5 +189,5 @@ const loadData = (rowSize: number) => {
}, 350)
}
loadData(200)
loadData(20)
</script>
28 changes: 21 additions & 7 deletions examples/views/table/TableTest9.vue
Original file line number Diff line number Diff line change
@@ -1,19 +1,29 @@
<template>
<div>
<vxe-button @click="loadData(5000)">加载5k条</vxe-button>
<vxe-button @click="loadData(10000)">加载1w条</vxe-button>
<p>
<vxe-button @click="loadData(0)">加载0条</vxe-button>
<vxe-button @click="loadData(5)">加载5条</vxe-button>
<vxe-button @click="loadData(50)">加载50条</vxe-button>
<vxe-button @click="loadData(5000)">加载5k条</vxe-button>
<vxe-button @click="loadData(10000)">加载1w条</vxe-button>
<vxe-button @click="loadData(30000)">加载3w条</vxe-button>
</p>

<vxe-table
border
show-footer
show-overflow
height="800"
:loading="loading"
:column-config="{resizable: true,drag: true}"
:row-config="{drag: true}"
:scroll-x="{enabled: true, gt: 0}"
:scroll-y="{enabled: true, gt: 0}"
:data="tableData">
<vxe-column type="checkbox" width="80" drag-sort></vxe-column>
<vxe-column field="col0" title="列0" width="100"></vxe-column>
:scrollbar-config="{x:{position:'top'},y:{position:'left'}}"
:data="tableData"
:footer-data="footerData">
<vxe-column field="checkbox" type="checkbox" width="80" fixed="left" drag-sort></vxe-column>
<vxe-column field="col0" title="列0" fixed="left" width="100"></vxe-column>
<vxe-column field="imgUrl" title="列1" width="80" :cell-render="imgUrlCellRender"></vxe-column>
<vxe-column field="col2" title="列2" width="90"></vxe-column>
<vxe-column field="col3" title="列3" width="200"></vxe-column>
Expand Down Expand Up @@ -102,7 +112,7 @@
<vxe-column field="col86" title="列86" width="800"></vxe-column>
<vxe-column field="imgList1" title="列88" width="120" :cell-render="imgList1CellRender"></vxe-column>
<vxe-column field="flag1" title="列89" width="100" :cell-render="flag1CellRender"></vxe-column>
<vxe-column field="action" title="操作" width="120" >
<vxe-column field="action" title="操作" width="120" fixed="right" >
<template #default>
<vxe-button mode="text" status="primary">编辑</vxe-button>
<vxe-button mode="text" status="error">删除</vxe-button>
Expand All @@ -124,6 +134,10 @@ interface RowVO {
const tableData = ref<RowVO[]>([])
const loading = ref(false)
const footerData = ref([
{ col2: '456', col3: '324', col4: '98', col6: '11', col74: '546', col75: '78', col83: '45', col86: '444' }
])
const flag1CellRender = reactive<VxeColumnPropTypes.CellRender>({
name: 'VxeSwitch'
})
Expand Down Expand Up @@ -185,5 +199,5 @@ const loadData = (rowSize: number) => {
}, 350)
}
loadData(200)
loadData(16)
</script>
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "vxe-table",
"version": "4.10.5",
"version": "4.10.6-beta.9",
"description": "一个基于 vue 的 PC 端表格组件,支持增删改查、虚拟树、拖拽排序,懒加载、快捷菜单、数据校验、树形结构、打印、导入导出、自定义模板、渲染器、JSON 配置式...",
"scripts": {
"update": "npm install --legacy-peer-deps",
Expand Down Expand Up @@ -28,7 +28,7 @@
"style": "lib/style.css",
"typings": "types/index.d.ts",
"dependencies": {
"vxe-pc-ui": "^4.3.68"
"vxe-pc-ui": "^4.3.71"
},
"devDependencies": {
"@types/resize-observer-browser": "^0.1.11",
Expand Down
7 changes: 6 additions & 1 deletion packages/grid/src/grid.ts
Original file line number Diff line number Diff line change
Expand Up @@ -442,7 +442,12 @@ export default defineComponent({
reactData.tZindex = nextZIndex()
}
}
return nextTick().then(() => gridExtendTableMethods.recalculate(true)).then(() => reactData.isZMax)
return nextTick()
.then(() => gridExtendTableMethods.recalculate(true))
.then(() => {
setTimeout(() => gridExtendTableMethods.recalculate(true), 15)
return reactData.isZMax
})
}

const getFuncSlot = (optSlots: any, slotKey: string) => {
Expand Down
Loading

0 comments on commit b940450

Please sign in to comment.