mirror of
https://gitee.com/vant-contrib/vant.git
synced 2025-04-06 03:57:59 +08:00
types(Picker): support generic (#6315)
This commit is contained in:
parent
ab5cdd8b33
commit
dad0160bb4
12
types/picker.d.ts
vendored
12
types/picker.d.ts
vendored
@ -1,25 +1,25 @@
|
|||||||
import { VanComponent } from './component';
|
import { VanComponent } from './component';
|
||||||
|
|
||||||
export class Picker extends VanComponent {
|
export class Picker extends VanComponent {
|
||||||
getValues(): string[];
|
getValues<T = string>(): T[];
|
||||||
|
|
||||||
setValues(values: string[]): void;
|
setValues<T = string>(values: T[]): void;
|
||||||
|
|
||||||
getIndexes(): number[];
|
getIndexes(): number[];
|
||||||
|
|
||||||
setIndexes(indexes: number[]): void;
|
setIndexes(indexes: number[]): void;
|
||||||
|
|
||||||
getColumnValue(columnIndex: number): string;
|
getColumnValue<T = string>(columnIndex: number): T;
|
||||||
|
|
||||||
setColumnValue(columnIndex: number, value: string): void;
|
setColumnValue<T = string>(columnIndex: number, value: T): void;
|
||||||
|
|
||||||
getColumnIndex(columnIndex: number): number;
|
getColumnIndex(columnIndex: number): number;
|
||||||
|
|
||||||
setColumnIndex(columnIndex: number, optionIndex: number): void;
|
setColumnIndex(columnIndex: number, optionIndex: number): void;
|
||||||
|
|
||||||
getColumnValues(columnIndex: number): string[];
|
getColumnValues<T = string>(columnIndex: number): T[];
|
||||||
|
|
||||||
setColumnValues(columnIndex: number, values: string[]): void;
|
setColumnValues<T = string>(columnIndex: number, values: T[]): void;
|
||||||
|
|
||||||
confirm(): void;
|
confirm(): void;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user