mirror of
https://github.com/dataease/dataease.git
synced 2026-06-16 20:42:07 +08:00
fix(图表): 修复标题为斜体时文字部分遮挡
This commit is contained in:
@@ -181,7 +181,9 @@ const state = reactive({
|
||||
width: 'fit-content',
|
||||
maxWidth: '100%',
|
||||
wordBreak: 'break-word',
|
||||
whiteSpace: 'pre-wrap'
|
||||
whiteSpace: 'pre-wrap',
|
||||
paddingRight: '0px',
|
||||
overflow: 'hidden'
|
||||
} as CSSProperties,
|
||||
drillFilters: [],
|
||||
viewInfoData: null,
|
||||
@@ -304,6 +306,14 @@ const initTitle = () => {
|
||||
CHART_FONT_FAMILY_MAP[ele.name] = ele.name
|
||||
})
|
||||
}
|
||||
if (customStyle.text.isItalic) {
|
||||
if (customStyle.text.hPosition === 'right') {
|
||||
state.title_class.paddingRight = Math.floor(customStyle.text.fontSize / 7) + 'px'
|
||||
} else {
|
||||
state.title_class.paddingRight = '0px'
|
||||
state.title_class.overflow = 'visible'
|
||||
}
|
||||
}
|
||||
state.title_class.fontFamily = customStyle.text.fontFamily
|
||||
? CHART_FONT_FAMILY_MAP[customStyle.text.fontFamily]
|
||||
: DEFAULT_TITLE_STYLE.fontFamily
|
||||
|
||||
Reference in New Issue
Block a user