UNPKG

@lui-ui/lui-vue

Version:

This template should help get you started developing with Vue 3 in Vite. The template uses Vue 3 `<script setup>` SFCs, check out the [script setup docs](https://v3.vuejs.org/api/sfc-script-setup.html#sfc-script-setup) to learn more.

25 lines (24 loc) 669 B
import type { Ref } from 'vue'; export interface ModelValueObject { text: string; value: string | number; disabled?: boolean; selected?: boolean; } export interface SelectedOption { text: string; value: string | number; } export type ModelValue = ModelValueObject | string | undefined; export interface ListboxStateType { items: any[]; currentIndex: number; currentId: string; } export type OptionsType = string | ModelValueObject; export interface ContextDefination { selectedOption: Ref<SelectedOption> | Ref<string[]>; updateSelectedOption(option: ModelValue): void; focusButton(): void; currentId: Ref<string>; }