mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-10-04 06:47:03 +00:00
Merge pull request #21068 from vi-kon/vue-scroll-patch-1
vue-scroll accepts Element too not just string for container and elements
This commit is contained in:
Vendored
+12
-6
@@ -9,10 +9,10 @@ import { PluginFunction } from "vue";
|
||||
declare namespace VueScrollTo {
|
||||
interface Options {
|
||||
// The element you want to scroll to.
|
||||
el?: string;
|
||||
element?: string;
|
||||
el?: string | Element;
|
||||
element?: string | Element;
|
||||
// The container that has to be scrolled. Default: body
|
||||
container?: string;
|
||||
container?: string | Element;
|
||||
// The duration (in milliseconds) of the scrolling animation. Default: 500
|
||||
duration?: number;
|
||||
// The easing to be used when animating. Default: ease
|
||||
@@ -31,17 +31,23 @@ declare namespace VueScrollTo {
|
||||
// Whether or not we want scrolling on the y axis. Default: true
|
||||
y?: boolean;
|
||||
}
|
||||
|
||||
interface VueStatic {
|
||||
(options: Options): void;
|
||||
(element: string | Element, options?: Options): void;
|
||||
(element: string | Element, duration: number, options?: Options): void;
|
||||
}
|
||||
}
|
||||
|
||||
declare class VueScrollTo {
|
||||
static install: PluginFunction<never>;
|
||||
|
||||
scrollTo(element: string | HTMLElement, options?: VueScrollTo.Options): void;
|
||||
scrollTo: VueScrollTo.VueStatic;
|
||||
}
|
||||
|
||||
declare module "vue/types/vue" {
|
||||
declare module 'vue/types/vue' {
|
||||
interface Vue {
|
||||
$scrollTo: typeof VueScrollTo.prototype.scrollTo;
|
||||
$scrollTo: VueScrollTo.VueStatic;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user