Fixed #1836 - For ScrollTop
parent
77bb9cab97
commit
7ec9d396e9
|
@ -1,12 +1,52 @@
|
||||||
interface ScrollTopProps {
|
import { ClassComponent, GlobalComponentConstructor } from '../ts-helpers';
|
||||||
target?: string;
|
|
||||||
threshold?: number;
|
type ScrollTopTargetType = 'window' | 'parent';
|
||||||
icon?: string;
|
|
||||||
behavior?: string;
|
export interface ScrollTopProps {
|
||||||
|
/**
|
||||||
|
* Target of the ScrollTop.
|
||||||
|
* @see ScrollTopTargetType
|
||||||
|
* Default value is 'window'.
|
||||||
|
*/
|
||||||
|
target?: ScrollTopTargetType;
|
||||||
|
/**
|
||||||
|
* Defines the threshold value of the vertical scroll position of the target to toggle the visibility.
|
||||||
|
* Default value is 400.
|
||||||
|
*/
|
||||||
|
threshold?: number | undefined;
|
||||||
|
/**
|
||||||
|
* Icon to display.
|
||||||
|
* Default value is 'pi pi-chevron-up'.
|
||||||
|
*/
|
||||||
|
icon?: string | undefined;
|
||||||
|
/**
|
||||||
|
* Defines the scrolling behaviour, "smooth" adds an animation and "auto" scrolls with a jump.
|
||||||
|
* Default value is 'smooth'.
|
||||||
|
*/
|
||||||
|
behavior?: string | undefined;
|
||||||
}
|
}
|
||||||
|
|
||||||
declare class ScrollTop {
|
export interface ScrollTopSlots {
|
||||||
$props: ScrollTopProps;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export declare type ScrollTopEmits = {
|
||||||
|
}
|
||||||
|
|
||||||
|
declare class ScrollTop extends ClassComponent<ScrollTopProps, ScrollTopSlots, ScrollTopEmits> { }
|
||||||
|
|
||||||
|
declare module '@vue/runtime-core' {
|
||||||
|
interface GlobalComponents {
|
||||||
|
ScrollTop: GlobalComponentConstructor<ScrollTop>
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* ScrollTop gets displayed after a certain scroll position and used to navigates to the top of the page quickly.
|
||||||
|
*
|
||||||
|
* Demos:
|
||||||
|
*
|
||||||
|
* - [ScrollTop](https://www.primefaces.org/primevue/showcase/#/scrolltop)
|
||||||
|
*
|
||||||
|
*/
|
||||||
export default ScrollTop;
|
export default ScrollTop;
|
||||||
|
|
Loading…
Reference in New Issue