From dad0160bb4d94beb73633a3a4f776d4f32c901a5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=8E=E6=98=8A=E5=A4=A9?= <32523475+lihaotian0607@users.noreply.github.com> Date: Wed, 20 May 2020 11:52:15 +0800 Subject: [PATCH] types(Picker): support generic (#6315) --- types/picker.d.ts | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/types/picker.d.ts b/types/picker.d.ts index ac54d0471..a870a06b7 100644 --- a/types/picker.d.ts +++ b/types/picker.d.ts @@ -1,25 +1,25 @@ import { VanComponent } from './component'; export class Picker extends VanComponent { - getValues(): string[]; + getValues(): T[]; - setValues(values: string[]): void; + setValues(values: T[]): void; getIndexes(): number[]; setIndexes(indexes: number[]): void; - getColumnValue(columnIndex: number): string; + getColumnValue(columnIndex: number): T; - setColumnValue(columnIndex: number, value: string): void; + setColumnValue(columnIndex: number, value: T): void; getColumnIndex(columnIndex: number): number; setColumnIndex(columnIndex: number, optionIndex: number): void; - getColumnValues(columnIndex: number): string[]; + getColumnValues(columnIndex: number): T[]; - setColumnValues(columnIndex: number, values: string[]): void; + setColumnValues(columnIndex: number, values: T[]): void; confirm(): void; }