diff --git a/components/affix/index.tsx b/components/affix/index.tsx index 15937cfb8..72313e490 100644 --- a/components/affix/index.tsx +++ b/components/affix/index.tsx @@ -47,14 +47,13 @@ export const affixProps = () => ({ offsetTop: Number, /** 距离窗口底部达到指定偏移量后触发 */ offsetBottom: Number, - /** 固定状态改变时触发的回调函数 */ - // onChange?: (affixed?: boolean) => void; /** 设置 Affix 需要监听其滚动事件的元素,值为一个返回对应 DOM 元素的函数 */ target: { type: Function as PropType<() => Window | HTMLElement | null>, default: getDefaultTarget, }, prefixCls: String, + /** 固定状态改变时触发的回调函数 */ onChange: Function as PropType, onTestUpdatePosition: Function as PropType, }); @@ -62,8 +61,8 @@ export const affixProps = () => ({ export type AffixProps = Partial>>; export type AffixEmits = { - change: (lastAffix: boolean) => boolean; - testUpdatePosition: () => boolean; + change: (lastAffix: boolean) => void; + testUpdatePosition: () => void; }; export type AffixExpose = { diff --git a/components/anchor/demo/onClick.vue b/components/anchor/demo/onClick.vue index ca2f5999a..ae28d8db9 100644 --- a/components/anchor/demo/onClick.vue +++ b/components/anchor/demo/onClick.vue @@ -28,10 +28,11 @@ Clicking on an anchor does not record history.