diff --git a/types/index.d.ts b/types/index.d.ts index a48561876..9faba7a50 100644 --- a/types/index.d.ts +++ b/types/index.d.ts @@ -13,6 +13,7 @@ import { Lazyload } from './lazyload'; import { List } from './list'; import { Locale } from './locale'; import { Notify } from './notify'; +import { SwipeCell } from './swipe-cell'; import { Toast } from './toast'; export const version: string; @@ -74,7 +75,6 @@ export class Sticky extends VanComponent {} export class SubmitBar extends VanComponent {} export class Swipe extends VanComponent {} export class SwipeItem extends VanComponent {} -export class SwipeCell extends VanComponent {} export class Switch extends VanComponent {} export class SwitchCell extends VanComponent {} export class Tab extends VanComponent {} @@ -99,5 +99,6 @@ export { List, Locale, Notify, + SwipeCell, Toast }; diff --git a/types/swipe-cell.d.ts b/types/swipe-cell.d.ts new file mode 100644 index 000000000..d81b77ce2 --- /dev/null +++ b/types/swipe-cell.d.ts @@ -0,0 +1,6 @@ +import { VanComponent } from './component'; + +export class SwipeCell extends VanComponent { + open(position: 'left' | 'right'): void; + close(): void; +}