diff --git a/components/anchor/style/index.ts b/components/anchor/style/index.ts index 7289418e62..191a21f26c 100644 --- a/components/anchor/style/index.ts +++ b/components/anchor/style/index.ts @@ -69,7 +69,7 @@ const genSharedAnchorStyle: GenerateStyle = (token): CSSObject => { }, }, - [`&:not(&-horizontal)`]: { + [`&:not(${componentCls}-horizontal)`]: { [componentCls]: { '&::before': { position: 'absolute',