tdesign-vue
Version:
157 lines (156 loc) • 6.39 kB
TypeScript
import { TdAnchorProps, TdAnchorTargetProps, TdAnchorItemProps } from './type';
import './style';
export * from './type';
export declare type AnchorProps = TdAnchorProps;
export declare type AnchorTargetProps = TdAnchorTargetProps;
export declare type AnchorItemProps = TdAnchorItemProps;
export declare const Anchor: import("vue/types/vue").ExtendedVue<{
classPrefix: string;
componentName: string;
commonSizeClassName: Record<string, string>;
commonStatusClassName: Record<string, string>;
} & Record<never, any> & import("../config-provider/config-receiver").ConfigComponent & import("vue").default & import("./anchor").Anchor, {
links: string[];
active: string;
activeLineStyle: boolean | {
top: string;
height: string;
opacity: number;
};
}, {
getScrollContainer(): void;
getAnchorTarget(link: string): HTMLElement;
registerLink(link: string): void;
unregisterLink(link: string): void;
setCurrentActiveLink(link: string): Promise<void>;
updateActiveLine(): void;
emitChange(currentLink: string, prevLink: string): void;
handleLinkClick(link: {
href: string;
title: string;
e: MouseEvent;
}): void;
handleScrollTo(link: string): Promise<void>;
handleScroll(): void;
renderCursor(): string | true | import("vue").VNode | import("vue/types/vnode").ScopedSlotReturnArray;
}, unknown, {
affixProps: import("..").TdAffixProps;
bounds: number;
container: import("..").ScrollContainer;
cursor: (h: import("vue").CreateElement) => import("vue/types/vnode").ScopedSlotReturnValue;
getCurrentAnchor: (activeLink: string) => string;
size: "small" | "medium" | "large";
targetOffset: number;
onChange: (currentLink: string, prevLink: string) => void;
onClick: (link: {
href: string;
title: string;
e: MouseEvent;
}) => void;
}> & import("vue").PluginObject<import("vue/types/vue").ExtendedVue<{
classPrefix: string;
componentName: string;
commonSizeClassName: Record<string, string>;
commonStatusClassName: Record<string, string>;
} & Record<never, any> & import("../config-provider/config-receiver").ConfigComponent & import("vue").default & import("./anchor").Anchor, {
links: string[];
active: string;
activeLineStyle: boolean | {
top: string;
height: string;
opacity: number;
};
}, {
getScrollContainer(): void;
getAnchorTarget(link: string): HTMLElement;
registerLink(link: string): void;
unregisterLink(link: string): void;
setCurrentActiveLink(link: string): Promise<void>;
updateActiveLine(): void;
emitChange(currentLink: string, prevLink: string): void;
handleLinkClick(link: {
href: string;
title: string;
e: MouseEvent;
}): void;
handleScrollTo(link: string): Promise<void>;
handleScroll(): void;
renderCursor(): string | true | import("vue").VNode | import("vue/types/vnode").ScopedSlotReturnArray;
}, unknown, {
affixProps: import("..").TdAffixProps;
bounds: number;
container: import("..").ScrollContainer;
cursor: (h: import("vue").CreateElement) => import("vue/types/vnode").ScopedSlotReturnValue;
getCurrentAnchor: (activeLink: string) => string;
size: "small" | "medium" | "large";
targetOffset: number;
onChange: (currentLink: string, prevLink: string) => void;
onClick: (link: {
href: string;
title: string;
e: MouseEvent;
}) => void;
}>>;
export declare const AnchorItem: import("vue/types/vue").ExtendedVue<{
classPrefix: string;
componentName: string;
commonSizeClassName: Record<string, string>;
commonStatusClassName: Record<string, string>;
} & Record<never, any> & import("../config-provider/config-receiver").ConfigComponent & import("vue").default & import("./anchor-item").Anchor, unknown, {
register(): void;
unregister(): void;
handleClick(e: MouseEvent): void;
renderTitle(): import("vue/types/vnode").ScopedSlotReturnValue;
}, unknown, {
_level: number;
href: string;
target: "_self" | "_blank" | "_parent" | "_top";
title: string | ((h: import("vue").CreateElement) => import("vue/types/vnode").ScopedSlotReturnValue);
}> & import("vue").PluginObject<import("vue/types/vue").ExtendedVue<{
classPrefix: string;
componentName: string;
commonSizeClassName: Record<string, string>;
commonStatusClassName: Record<string, string>;
} & Record<never, any> & import("../config-provider/config-receiver").ConfigComponent & import("vue").default & import("./anchor-item").Anchor, unknown, {
register(): void;
unregister(): void;
handleClick(e: MouseEvent): void;
renderTitle(): import("vue/types/vnode").ScopedSlotReturnValue;
}, unknown, {
_level: number;
href: string;
target: "_self" | "_blank" | "_parent" | "_top";
title: string | ((h: import("vue").CreateElement) => import("vue/types/vnode").ScopedSlotReturnValue);
}>>;
export declare const AnchorTarget: import("vue/types/vue").ExtendedVue<{
useGlobalIcon(tdIcon: Record<string, any>): import("tdesign-icons-vue").GlobalIconConfig;
} & Record<never, any> & import("../config-provider/config-receiver").ConfigComponent & import("vue").default & {
t<T>(pattern: T, placement?: number | import("../config-provider/config-receiver").Placement): string;
} & {
global: import("..").AnchorConfig;
classPrefix: string;
componentName: string;
commonSizeClassName: Record<string, string>;
commonStatusClassName: Record<string, string>;
}, unknown, {
copyText(): void;
}, unknown, {
id: string;
tag: string;
}> & import("vue").PluginObject<import("vue/types/vue").ExtendedVue<{
useGlobalIcon(tdIcon: Record<string, any>): import("tdesign-icons-vue").GlobalIconConfig;
} & Record<never, any> & import("../config-provider/config-receiver").ConfigComponent & import("vue").default & {
t<T>(pattern: T, placement?: number | import("../config-provider/config-receiver").Placement): string;
} & {
global: import("..").AnchorConfig;
classPrefix: string;
componentName: string;
commonSizeClassName: Record<string, string>;
commonStatusClassName: Record<string, string>;
}, unknown, {
copyText(): void;
}, unknown, {
id: string;
tag: string;
}>>;
export default Anchor;