/** * Select 组件辅助函数 */ import type { SelectOption } from '../types'; /** * 根据值查找选项对象 * @template T 选项值的类型 * @param value 选项值 * @param options 选项列表 * @returns 找到的选项对象,如果没找到返回 undefined */ export declare function findOptionByValue(value: T, options: SelectOption[]): SelectOption | undefined; /** * 根据值数组查找选项对象数组 * @template T 选项值的类型 * @param values 选项值数组 * @param options 选项列表 * @returns 找到的选项对象数组 */ export declare function findOptionsByValues(values: T[], options: SelectOption[]): SelectOption[]; /** * 判断选项是否被选中(单选) * @template T 选项值的类型 * @param optionValue 选项值 * @param selectedValue 当前选中值 * @returns 是否选中 */ export declare function isOptionSelected(optionValue: T, selectedValue: T | null | undefined): boolean; /** * 判断选项是否被选中(多选) * @template T 选项值的类型 * @param optionValue 选项值 * @param selectedValues 当前选中值数组 * @returns 是否选中 */ export declare function isOptionSelectedInMultiple(optionValue: T, selectedValues: T[]): boolean; /** * 生成唯一 ID * @param prefix ID 前缀 * @returns 唯一 ID */ export declare function generateId(prefix?: string): string;