diff --git a/components/anchor/Anchor.tsx b/components/anchor/Anchor.tsx index 4587ff391..4a60eb3d4 100644 --- a/components/anchor/Anchor.tsx +++ b/components/anchor/Anchor.tsx @@ -238,7 +238,7 @@ export default defineComponent({ }); const anchorClass = classNames(pre, { - fixed: !affix && !showInkInFixed, + [`${pre}-fixed`]: !affix && !showInkInFixed, }); const wrapperStyle = { diff --git a/components/anchor/__tests__/__snapshots__/demo.test.js.snap b/components/anchor/__tests__/__snapshots__/demo.test.js.snap index 8889baaff..a06050b82 100644 --- a/components/anchor/__tests__/__snapshots__/demo.test.js.snap +++ b/components/anchor/__tests__/__snapshots__/demo.test.js.snap @@ -31,7 +31,7 @@ exports[`renders ./components/anchor/demo/basic.vue correctly 1`] = ` exports[`renders ./components/anchor/demo/customizeHighlight.vue correctly 1`] = `
-
+