fix: QIANXING1-860 修复 divider 样式

pull/8328/head
undefined 2025-07-10 15:20:49 +08:00
parent 22918d8c15
commit c6eb1d3b03
2 changed files with 7 additions and 5 deletions

View File

@ -3,7 +3,9 @@ import { defaultConfig } from '../../theme/internal';
import type { Ref } from 'vue';
import { computed } from 'vue';
import devWarning from '../../vc-util/warning';
const themeKey = 'antdvtheme';
import { cssVarPrefix } from '../../theme/util/themeTokenUtil';
const themeKey = cssVarPrefix;
export default function useTheme(theme?: Ref<ThemeConfig>, parentTheme?: Ref<ThemeConfig>) {
const themeConfig = computed(() => theme?.value || {});
const parentThemeConfig = computed<ThemeConfig>(() =>

View File

@ -108,7 +108,7 @@ const genSharedDividerStyle: GenerateStyle<DividerToken> = (token): CSSObject =>
},
},
[`&-horizontal${componentCls}-with-text-start`]: {
[`&-horizontal${componentCls}-with-text-left`]: {
'&::before': {
width: `calc(${orientationMargin} * 100%)`,
},
@ -117,7 +117,7 @@ const genSharedDividerStyle: GenerateStyle<DividerToken> = (token): CSSObject =>
},
},
[`&-horizontal${componentCls}-with-text-end`]: {
[`&-horizontal${componentCls}-with-text-right`]: {
'&::before': {
width: `calc(100% - ${orientationMargin} * 100%)`,
},
@ -178,7 +178,7 @@ const genSharedDividerStyle: GenerateStyle<DividerToken> = (token): CSSObject =>
fontSize: token.fontSize,
},
[`&-horizontal${componentCls}-with-text-start${componentCls}-no-default-orientation-margin-start`]:
[`&-horizontal${componentCls}-with-text-left${componentCls}-no-default-orientation-margin-left`]:
{
'&::before': {
width: 0,
@ -193,7 +193,7 @@ const genSharedDividerStyle: GenerateStyle<DividerToken> = (token): CSSObject =>
},
},
[`&-horizontal${componentCls}-with-text-end${componentCls}-no-default-orientation-margin-end`]:
[`&-horizontal${componentCls}-with-text-right${componentCls}-no-default-orientation-margin-right`]:
{
'&::before': {
width: '100%',