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;
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 {
@ -330,7 +330,7 @@
.@{grid-prefix-cls}-body__row:last-child {
.@{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 items-center;
@apply justify-center;
@apply text-center;
@apply sticky;
@apply left-0;
}

View File

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

View File

@ -508,10 +508,13 @@ export default {
this.editStore.indexs.rowNodes = rowNodes
},
_clearIndexChecked() {
let indexCheckeds = this.elemStore['main-body-list'].querySelectorAll('.col__index-checked')
let eachHandler = (colNode) => removeClass(colNode, 'col__index-checked')
const tbody = this.elemStore['main-body-list']
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: [] })

View File

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