mirror of
https://gitee.com/vant-contrib/vant.git
synced 2025-04-05 19:41:42 +08:00
types(Swipe): add swipeTo、resize method types
This commit is contained in:
parent
9a9676d6af
commit
a1831b8638
4
types/index.d.ts
vendored
4
types/index.d.ts
vendored
@ -13,11 +13,13 @@ import { Lazyload } from './lazyload';
|
||||
import { List } from './list';
|
||||
import { Locale } from './locale';
|
||||
import { Notify } from './notify';
|
||||
import { Swipe } from './swipe';
|
||||
import { SwipeCell } from './swipe-cell';
|
||||
import { Toast } from './toast';
|
||||
|
||||
export const version: string;
|
||||
export function install(vue: typeof Vue): void;
|
||||
|
||||
export class ActionSheet extends VanComponent {}
|
||||
export class AddressList extends VanComponent {}
|
||||
export class Button extends VanComponent {}
|
||||
@ -73,7 +75,6 @@ export class Stepper extends VanComponent {}
|
||||
export class Steps extends VanComponent {}
|
||||
export class Sticky extends VanComponent {}
|
||||
export class SubmitBar extends VanComponent {}
|
||||
export class Swipe extends VanComponent {}
|
||||
export class SwipeItem extends VanComponent {}
|
||||
export class Switch extends VanComponent {}
|
||||
export class SwitchCell extends VanComponent {}
|
||||
@ -99,6 +100,7 @@ export {
|
||||
List,
|
||||
Locale,
|
||||
Notify,
|
||||
Swipe,
|
||||
SwipeCell,
|
||||
Toast
|
||||
};
|
||||
|
10
types/swipe.d.ts
vendored
Normal file
10
types/swipe.d.ts
vendored
Normal file
@ -0,0 +1,10 @@
|
||||
import { VanComponent } from './component';
|
||||
|
||||
export type SwipeToOptions = {
|
||||
immediate?: boolean;
|
||||
};
|
||||
|
||||
export class Swipe extends VanComponent {
|
||||
swipeTo(index: number, options?: SwipeToOptions): void;
|
||||
resize(): void;
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user