fix(grid): fix bug after refactor (#3527)

* fix(grid): fix custom empty text align not center

* fix(grid): fix selection error

* fix(grid): fix multi header tooltip error

* fix(grid): fix grid border style error
This commit is contained in:
gimmyhehe 2025-06-24 15:13:00 +08:00 committed by GitHub
parent e265872bfb
commit aad34cecdb
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
4 changed files with 18 additions and 13 deletions

View File

@ -321,7 +321,7 @@
); );
@apply bg-no-repeat; @apply bg-no-repeat;
background-size: 1px 100%, 100% 1px; background-size: 1px 100%, 100% 1px;
background-position: 100% 0, 100% 99%; background-position: 100% 0, 100% 100%;
} }
&.is__row-span .@{grid-prefix-cls}-body__column { &.is__row-span .@{grid-prefix-cls}-body__column {
@ -330,7 +330,7 @@
.@{grid-prefix-cls}-body__row:last-child { .@{grid-prefix-cls}-body__row:last-child {
.@{grid-prefix-cls}-body__column { .@{grid-prefix-cls}-body__column {
background-position: 100% 0, 100% 97%; background-position: 100% 0, 100% 100%;
} }
} }
@ -869,6 +869,7 @@
@apply flex-auto; @apply flex-auto;
@apply items-center; @apply items-center;
@apply justify-center; @apply justify-center;
@apply text-center;
@apply sticky; @apply sticky;
@apply left-0; @apply left-0;
} }

View File

@ -725,6 +725,7 @@
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: center; justify-content: center;
text-align: center;
position: sticky; position: sticky;
left: 0; left: 0;
flex: auto; flex: auto;

View File

@ -508,10 +508,13 @@ export default {
this.editStore.indexs.rowNodes = rowNodes this.editStore.indexs.rowNodes = rowNodes
}, },
_clearIndexChecked() { _clearIndexChecked() {
let indexCheckeds = this.elemStore['main-body-list'].querySelectorAll('.col__index-checked') const tbody = this.elemStore['main-body-list']
let eachHandler = (colNode) => removeClass(colNode, 'col__index-checked') if (tbody) {
const indexCheckeds = tbody.querySelectorAll('.col__index-checked')
const eachHandler = (colNode) => removeClass(colNode, 'col__index-checked')
arrayEach(indexCheckeds, eachHandler) arrayEach(indexCheckeds, eachHandler)
}
Object.assign(this.editStore.indexs, { rowNodes: [] }) Object.assign(this.editStore.indexs, { rowNodes: [] })

View File

@ -407,15 +407,15 @@ const Methods = {
} }
}, },
// 更新列的 Map // 更新列的 Map
cacheColumnMap() { cacheColumnMap(options) {
let { fullColumnMap, tableFullColumn: fullColumn } = this const { fullColumnMap } = this
let fullColumnIdData = {} const fullColumnIdData = {}
this.fullColumnIdData = fullColumnIdData this.fullColumnIdData = fullColumnIdData
Map.prototype.clear.apply(fullColumnMap) fullColumnMap.clear()
fullColumn.forEach((column, index) => {
let colCache = { colid: column.id, column, index } options.columnCaches.forEach((cache) => {
fullColumnIdData[column.id] = colCache fullColumnIdData[cache.colid] = cache
fullColumnMap.set(column, colCache) fullColumnMap.set(cache.column, cache)
}) })
}, },
// 通过tr的dom元素获取行数据等相关信息 // 通过tr的dom元素获取行数据等相关信息