UNPKG

@aimake/nanod

Version:

## 设计模式 NANO DESIGN 是面向于企业级中台化应用的解决方案。服务于 ToB 和 ToE 类型的单页应用,应用于各产品中从而产出了一套设计及前端规范。

55 lines (54 loc) 1.62 kB
import * as React from 'react'; import AnchorLink from './AnchorLink'; export declare type AnchorContainer = HTMLElement | Window; export interface AnchorProps { prefixCls?: string; className?: string; style?: React.CSSProperties; children?: React.ReactNode; offsetTop?: number; bounds?: number; affix?: boolean; showInkInFixed?: boolean; getContainer?: () => AnchorContainer; } export interface AnchorDefaultProps extends AnchorProps { prefixCls: string; affix: boolean; showInkInFixed: boolean; getContainer: () => AnchorContainer; } export default class Anchor extends React.Component<AnchorProps, any> { static Link: typeof AnchorLink; static defaultProps: { prefixCls: string; affix: boolean; showInkInFixed: boolean; getContainer: () => Window; }; static childContextTypes: { antAnchor: any; }; private inkNode; private links; private scrollEvent; private animating; constructor(props: AnchorProps); getChildContext(): { antAnchor: { registerLink: (link: String) => void; unregisterLink: (link: String) => void; activeLink: any; scrollTo: (link: string) => void; }; }; componentDidMount(): void; componentWillUnmount(): void; componentDidUpdate(): void; handleScroll: () => void; handleScrollTo: (link: string) => void; getCurrentAnchor(offsetTop?: number, bounds?: number): String; updateInk: () => void; saveInkNode: (node: HTMLSpanElement) => void; render(): JSX.Element; }