diff --git a/packages/datetime-picker/en-US.md b/packages/datetime-picker/en-US.md index 3420d3a72..f8a9ea1cf 100644 --- a/packages/datetime-picker/en-US.md +++ b/packages/datetime-picker/en-US.md @@ -1,4 +1,5 @@ ## DatetimePicker +The DatetimePicker component is usually used with [Popup](#/en-US/popup) Component. ### Install ``` javascript diff --git a/packages/datetime-picker/zh-CN.md b/packages/datetime-picker/zh-CN.md index 40042e14d..8999f4d56 100644 --- a/packages/datetime-picker/zh-CN.md +++ b/packages/datetime-picker/zh-CN.md @@ -1,4 +1,5 @@ ## DatetimePicker 时间选择 +时间选择组件通常与 [弹出层](#/zh-CN/popup) 组件配合使用 ### 使用指南 ``` javascript diff --git a/types/component.d.ts b/types/component.d.ts index cba56dde6..52a9489a9 100644 --- a/types/component.d.ts +++ b/types/component.d.ts @@ -1,3 +1,4 @@ export class VanComponent { static name: string; + install(): void; } diff --git a/types/dialog.d.ts b/types/dialog.d.ts index c62943384..2ebf08631 100644 --- a/types/dialog.d.ts +++ b/types/dialog.d.ts @@ -16,6 +16,9 @@ export interface Dialog { alert(options: DialogOptions): Promise; confirm(options: DialogOptions): Promise; close(): void; + install(): void; + setDefaultOptions(options: DialogOptions): void; + resetDefaultOptions(): void; } declare module 'vue/types/vue' { diff --git a/types/image-preview.d.ts b/types/image-preview.d.ts index 6260d9752..896a351ce 100644 --- a/types/image-preview.d.ts +++ b/types/image-preview.d.ts @@ -7,6 +7,7 @@ export class VanImagePreview extends VanPopupMixin { export interface ImagePreview { (images: string[], startPosition?: number): VanImagePreview; + install(): void; } export const ImagePreview: ImagePreview; diff --git a/types/index.d.ts b/types/index.d.ts index 4e2e10f22..16a3757ad 100644 --- a/types/index.d.ts +++ b/types/index.d.ts @@ -2,6 +2,7 @@ import Vue from 'vue'; import { VanComponent } from './component'; import { Toast } from './toast'; import { Dialog } from './dialog'; +import { Locale } from './locale'; import { Lazyload } from './lazyload'; import { Waterfall } from './waterfall'; import { ImagePreview } from './image-preview'; @@ -21,6 +22,7 @@ export class CellGroup extends VanComponent {} export class CellSwipe extends VanComponent {} export class Checkbox extends VanComponent {} export class CheckboxGroup extends VanComponent {} +export class Circle extends VanComponent {} export class Col extends VanComponent {} export class Collapse extends VanComponent {} export class CollapseItem extends VanComponent {} @@ -49,9 +51,11 @@ export class Progress extends VanComponent {} export class PullRefresh extends VanComponent {} export class Radio extends VanComponent {} export class RadioGroup extends VanComponent {} +export class Rate extends VanComponent {} export class Row extends VanComponent {} export class Search extends VanComponent {} export class Sku extends VanComponent {} +export class Slider extends VanComponent {} export class Step extends VanComponent {} export class Stepper extends VanComponent {} export class Steps extends VanComponent {} @@ -70,6 +74,7 @@ export class Uploader extends VanComponent {} export { Toast, Dialog, + Locale, Lazyload, Waterfall, ImagePreview diff --git a/types/locale.d.ts b/types/locale.d.ts new file mode 100644 index 000000000..d32c4e51d --- /dev/null +++ b/types/locale.d.ts @@ -0,0 +1,7 @@ +export interface Locale { + install(): void; + use(lang: string, messages: Object): void; + add(messages: Object): void; +} + +export const Locale: Locale; diff --git a/types/toast.d.ts b/types/toast.d.ts index 9ba849549..727762c7c 100644 --- a/types/toast.d.ts +++ b/types/toast.d.ts @@ -13,6 +13,10 @@ export interface Toast { success(options?: ToastOptions): void; fail(options?: ToastOptions): void; clear(): void; + install(): void; + setDefaultOptions(options: ToastOptions): void; + resetDefaultOptions(): void; + allowMultiple(allow: boolean): void } declare module 'vue/types/vue' {