Merge pull request #10902 from dataease/pr@dev-v2@refactor_table_summary_align

Pr@dev v2@refactor table summary align
This commit is contained in:
wisonic-s 2024-07-11 15:29:15 +08:00 committed by GitHub
commit 529796688b
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 5 additions and 3 deletions

View File

@ -15,7 +15,7 @@
},
"dependencies": {
"@antv/g2plot": "^2.4.29",
"@antv/l7": "2.21.1",
"@antv/l7": "^2.22.0",
"@antv/l7plot": "^0.5.5",
"@antv/s2": "^1.49.0",
"@codemirror/lang-sql": "^6.4.0",

View File

@ -4,7 +4,7 @@ import { copyContent, SortTooltip } from '@/views/chart/components/js/panel/comm
import { S2ChartView, S2DrawOptions } from '@/views/chart/components/js/panel/types/impl/s2'
import { parseJson } from '@/views/chart/components/js/util'
import { S2Event, S2Options, TableColCell, TableDataCell, TableSheet, ViewMeta } from '@antv/s2'
import { isNumber } from 'lodash-es'
import { cloneDeep, isNumber } from 'lodash-es'
import { TABLE_EDITOR_PROPERTY, TABLE_EDITOR_PROPERTY_INNER } from './common'
const { t } = useI18n()
@ -252,7 +252,9 @@ export class TableNormal extends S2ChartView<TableSheet> {
class SummaryCell extends TableDataCell {
getTextStyle() {
return this.theme.colCell.bolderText
const textStyle = cloneDeep(this.theme.colCell.bolderText)
textStyle.textAlign = this.theme.dataCell.text.textAlign
return textStyle
}
getBackgroundColor() {
const { backgroundColor, backgroundColorOpacity } = this.theme.colCell.cell