pull2
Version:
提供了下拉刷新、滚动底部加载组件。原生 js 开发,不依赖任何框架,也可以集成到任何框架。
45 lines (44 loc) • 1.03 kB
TypeScript
import View from './View';
import './RefreshView.less';
export declare enum State {
Default = "default",
Drop = "drop",
Loading = "loading",
Success = "success",
Failed = "failed"
}
declare const defaultDom: {
default: string;
drop: string;
loading: string;
success: string;
failed: string;
};
declare const defaultText: {
default: string;
drop: string;
loading: string;
success: string;
failed: string;
};
export type Options = {
scrollView?: HTMLElement;
text?: Partial<typeof defaultText>;
dom?: Partial<typeof defaultDom>;
};
declare class RefreshView extends View {
state: State;
options: {
scrollView: HTMLElement;
text: typeof defaultText;
dom: typeof defaultDom;
};
tplMarkText: string;
constructor(options?: Options);
private __getWrapper;
private render;
updateOptions(options: Options): void;
private getHtml;
setState(state: State, force?: boolean): void;
}
export default RefreshView;