Skip to content

Commit

Permalink
fix(grid): [grid] fix empty slot error when is-center-empty is set (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
gimmyhehe authored Sep 5, 2024
1 parent 49171e2 commit 4f86a91
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 13 deletions.
2 changes: 1 addition & 1 deletion packages/vue/src/grid/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@opentiny/vue-grid",
"type": "module",
"version": "3.18.1",
"version": "3.18.2",
"description": "",
"license": "MIT",
"sideEffects": false,
Expand Down
18 changes: 6 additions & 12 deletions packages/vue/src/grid/src/table/src/table.ts
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,9 @@ function mergeTreeConfig(_vm) {
}

const renderEmptyPartFn = (opt) => {
const { _vm, tableData, $slots, renderEmpty } = opt
const { _vm, tableData } = opt
const { $grid = {}, renderEmpty } = _vm
const { $slots } = $grid
return () => {
let emptyPartVnode = null
let { computerTableBodyHeight } = _vm
Expand Down Expand Up @@ -272,21 +274,13 @@ function getRenderer(opt) {
visibleColumn
} = opt
const { $grid, ctxMenuStore, editRules, filterStore, footerData, footerMethod, hasFilter, hasTip, height, id } = _vm
const {
isCtxMenu,
isResizable,
renderEmpty,
scrollbarHeight,
selectToolbarStore,
tooltipContentOpts,
vaildTipOpts,
validOpts
} = _vm
const { isCtxMenu, isResizable, scrollbarHeight, selectToolbarStore, tooltipContentOpts, vaildTipOpts, validOpts } =
_vm
const { selectToolbar, renderedToolbar } = $grid

const renderHeader = () =>
showHeader ? h(GridHeader, { ref: 'tableHeader', props, class: _vm.viewCls('tableHeader') }) : [null]
const renderEmptyPart = renderEmptyPartFn({ _vm, tableData, $slots, renderEmpty })
const renderEmptyPart = renderEmptyPartFn({ _vm, tableData })
const renderFooter = renderFooterFn({ _vm, showFooter, footerData, footerMethod, tableColumn, visibleColumn, vSize })
const renderResizeBar = renderResizeBarFn({ _vm, isResizable, overflowX, scrollbarHeight })
const arg1 = { hasFilter, optimizeOpts, filterStore, isCtxMenu, ctxMenuStore, hasTip, tooltipContentOpts }
Expand Down

0 comments on commit 4f86a91

Please sign in to comment.