Skip to content

Commit 5a86ec3

Browse files
authored
fix(grid): remove last visible row border (#3809)
1 parent 8d64cfc commit 5a86ec3

File tree

2 files changed

+3
-28
lines changed

2 files changed

+3
-28
lines changed

packages/theme-saas/src/grid/table.less

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -268,25 +268,6 @@
268268
}
269269
}
270270

271-
// tiny新增滚动条放置表格内
272-
tbody tr.row__last-visible {
273-
&::after {
274-
@apply content-[''];
275-
@apply absolute;
276-
@apply left-0;
277-
@apply right-0;
278-
@apply h-px;
279-
top: calc(var(--body-container-scroll-height) - 1px);
280-
width: var(--body-container-scroll-width);
281-
@apply bg-color-border-separator;
282-
@apply ~'z-[3]';
283-
}
284-
}
285-
286-
&:has(.@{grid-prefix-cls}__footer-wrapper) tbody tr.row__last-visible::after {
287-
display: none;
288-
}
289-
290271
&&__border,
291272
&&__border-saas {
292273
// 启用 border 只有表头生效,默认不建议启用 border 属性,另外如果内嵌列,则表头会自动启用 border 属性

packages/vue/src/grid/src/body/src/body.tsx

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -346,8 +346,6 @@ function renderRows(_vm) {
346346
const seqCount = { value: 0 }
347347
const $seq = ''
348348

349-
const lastVisibleIndex = rowPool.findLastIndex(({ used }) => Boolean(used))
350-
351349
rowPool.forEach(({ id, item: { payload: row, level: rowLevel }, used }, $rowIndex) => {
352350
const rowActived = editConfig && actived.row === row
353351
const virtualRow = isVirtualRow(row)
@@ -382,8 +380,7 @@ function renderRows(_vm) {
382380
isSkipRowRender,
383381
row,
384382
rowActived,
385-
rowClassName,
386-
lastVisibleIndex
383+
rowClassName
387384
}
388385

389386
Object.assign(args, { rowIndex, rowLevel, rowid, rows, selection, seq, treeConfig, used, selectRow })
@@ -441,7 +438,7 @@ function renderRowAfter({ $table, _vm, row, rowIndex, rows, id, used }) {
441438

442439
function renderRow(args) {
443440
const { $rowIndex, $seq, $table, _vm, editStore, id, isSkipRowRender, row, rowActived, rowClassName } = args
444-
const { rowIndex, rowLevel, rowid, rows, selection, selectRow, seq, treeConfig, used, lastVisibleIndex } = args
441+
const { rowIndex, rowLevel, rowid, rows, selection, selectRow, seq, treeConfig, used } = args
445442

446443
if (isSkipRowRender) {
447444
return
@@ -474,8 +471,7 @@ function renderRow(args) {
474471
'row__new': editStore.insertList.includes(row),
475472
'row__selected': selection.includes(row),
476473
'row__radio': selectRow === row,
477-
'row__actived': rowActived,
478-
'row__last-visible': lastVisibleIndex === $rowIndex
474+
'row__actived': rowActived
479475
},
480476
rowClassName
481477
? isFunction(rowClassName)
@@ -862,8 +858,6 @@ export default defineComponent({
862858
'no-data': isNoData && $table.isShapeTable
863859
}}
864860
style={{
865-
'--body-container-scroll-height': `${containerScrollHeight}px`,
866-
'--body-container-scroll-width': `${containerScrollWidth}px`,
867861
height: bodyWrapperHeight ? `${bodyWrapperHeight}px` : undefined,
868862
minHeight: bodyWrapperMinHeight ? `${bodyWrapperMinHeight}px` : undefined,
869863
maxHeight: bodyWrapperMaxHeight ? `${bodyWrapperMaxHeight}px` : undefined

0 commit comments

Comments
 (0)