From 285bce677c8997d55515a760f4d12b05349ebd3f 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:14:18 +0800 Subject: [PATCH] types(List): add check method type --- src/list/index.js | 1 + types/index.d.ts | 3 ++- types/list.d.ts | 5 +++++ 3 files changed, 8 insertions(+), 1 deletion(-) create mode 100644 types/list.d.ts diff --git a/src/list/index.js b/src/list/index.js index 425fdd27c..869499777 100644 --- a/src/list/index.js +++ b/src/list/index.js @@ -65,6 +65,7 @@ export default createComponent({ }, methods: { + // @exposed-api check() { this.$nextTick(() => { if (this.innerLoading || this.finished || this.error) { diff --git a/types/index.d.ts b/types/index.d.ts index a1795e7a3..a48561876 100644 --- a/types/index.d.ts +++ b/types/index.d.ts @@ -10,6 +10,7 @@ import { DropdownItem } from './dropdown-item'; import { Field } from './field'; import { ImagePreview } from './image-preview'; import { Lazyload } from './lazyload'; +import { List } from './list'; import { Locale } from './locale'; import { Notify } from './notify'; import { Toast } from './toast'; @@ -44,7 +45,6 @@ export class Image extends VanComponent {} export class IndexAnchor extends VanComponent {} export class IndexBar extends VanComponent {} export class Info extends VanComponent {} -export class List extends VanComponent {} export class Loading extends VanComponent {} export class NavBar extends VanComponent {} export class NoticeBar extends VanComponent {} @@ -96,6 +96,7 @@ export { Field, ImagePreview, Lazyload, + List, Locale, Notify, Toast diff --git a/types/list.d.ts b/types/list.d.ts new file mode 100644 index 000000000..1b4023a4d --- /dev/null +++ b/types/list.d.ts @@ -0,0 +1,5 @@ +import { VanComponent } from './component'; + +export class List extends VanComponent { + check(): void; +}