types(AddressEdit): add setAddressDetail method type (#5352)

This commit is contained in:
neverland 2019-12-22 12:50:03 +08:00 committed by GitHub
parent 84f53d0014
commit a54a77d8c8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 11 additions and 2 deletions

View File

@ -233,6 +233,7 @@ export default createComponent({
}
},
// @exposed-api
setAddressDetail(value) {
this.data.addressDetail = value;
},

5
types/address-edit.d.ts vendored Normal file
View File

@ -0,0 +1,5 @@
import { VanComponent } from './component';
export class AddressEdit extends VanComponent {
setAddressDetail(val: string): void;
}

4
types/dialog.d.ts vendored
View File

@ -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' {

3
types/index.d.ts vendored
View File

@ -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,