fix(图表): 修复富文本组件垂直居中和置底无法正常滚动

This commit is contained in:
wisonic-s 2024-04-28 14:51:19 +08:00
parent 184850406b
commit d148826fd8
2 changed files with 6 additions and 14 deletions

View File

@ -174,20 +174,12 @@ watch(
} }
) )
const ALIGN_MAP = { const ALIGN_MAP = {
'top-align': { 'top-align': {},
display: 'flex',
'flex-direction': 'column',
'justify-content': 'flex-start'
},
'center-align': { 'center-align': {
display: 'flex', margin: 'auto'
'flex-direction': 'column',
'justify-content': 'center'
}, },
'bottom-align': { 'bottom-align': {
display: 'flex', 'margin-top': 'auto'
'flex-direction': 'column',
'justify-content': 'flex-end'
} }
} }
const wrapperStyle = computed(() => { const wrapperStyle = computed(() => {
@ -468,6 +460,7 @@ defineExpose({
<style lang="less" scoped> <style lang="less" scoped>
.rich-main-class { .rich-main-class {
display: flex;
font-size: initial; font-size: initial;
width: 100%; width: 100%;
height: 100%; height: 100%;
@ -585,7 +578,6 @@ defineExpose({
.custom-text-content { .custom-text-content {
width: 100%; width: 100%;
height: 100%;
overflow-y: auto; overflow-y: auto;
outline: none !important; outline: none !important;
border: none !important; border: none !important;

View File

@ -41,11 +41,11 @@ export default {
}, },
'center-align': { 'center-align': {
component: null, component: null,
tooltip: '居中' tooltip: '居中,只在内容未溢出时生效'
}, },
'bottom-align': { 'bottom-align': {
component: null, component: null,
tooltip: '置底' tooltip: '置底,只在内容未溢出时生效'
} }
} }
for (const key in btnMap) { for (const key in btnMap) {