diff --git a/src/address-edit/index.js b/src/address-edit/index.js index 852b4460b..5c28a2906 100644 --- a/src/address-edit/index.js +++ b/src/address-edit/index.js @@ -233,6 +233,7 @@ export default createComponent({ } }, + // @exposed-api setAddressDetail(value) { this.data.addressDetail = value; }, diff --git a/types/address-edit.d.ts b/types/address-edit.d.ts new file mode 100644 index 000000000..b4c20f668 --- /dev/null +++ b/types/address-edit.d.ts @@ -0,0 +1,5 @@ +import { VanComponent } from './component'; + +export class AddressEdit extends VanComponent { + setAddressDetail(val: string): void; +} diff --git a/types/dialog.d.ts b/types/dialog.d.ts index 1b5f7b17e..22d114632 100644 --- a/types/dialog.d.ts +++ b/types/dialog.d.ts @@ -1,3 +1,5 @@ +import { VanComponent } from './component'; + type DialogAction = 'confirm' | 'cancel'; type DialogDone = (close?: boolean) => void; @@ -32,7 +34,7 @@ export interface Dialog { install(): void; setDefaultOptions(options: DialogOptions): void; resetDefaultOptions(): void; - Component: any; + Component: VanComponent; } declare module 'vue/types/vue' { diff --git a/types/index.d.ts b/types/index.d.ts index 42346934c..1faf69f55 100644 --- a/types/index.d.ts +++ b/types/index.d.ts @@ -10,7 +10,7 @@ import { ImagePreview } from './image-preview'; export const version: string; export function install (vue: typeof Vue): void export class ActionSheet extends VanComponent {} -export class AddressEdit extends VanComponent {} + export class AddressList extends VanComponent {} export class Area extends VanComponent {} export class Button extends VanComponent {} @@ -84,6 +84,7 @@ export class Tabs extends VanComponent {} export class Tag extends VanComponent {} export class TreeSelect extends VanComponent {} export class Uploader extends VanComponent {} + export { Toast, Dialog,