From 9a9676d6af7d29ac2221761ad680cecd4e929a39 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=99=88=E5=98=89=E6=B6=B5?= Date: Sun, 22 Dec 2019 17:15:53 +0800 Subject: [PATCH] =?UTF-8?q?types(SwipeCell):=20add=20open=E3=80=81close=20?= =?UTF-8?q?method=20type?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- types/index.d.ts | 3 ++- types/swipe-cell.d.ts | 6 ++++++ 2 files changed, 8 insertions(+), 1 deletion(-) create mode 100644 types/swipe-cell.d.ts 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; +}