sard-uniapp
Version:
sard-uniapp 是一套基于 Uniapp + Vue3 框架开发的兼容多端的 UI 组件库
17 lines (16 loc) • 740 B
TypeScript
import { type InjectionKey, type Ref } from 'vue';
import { type ActionSheetItemProps } from '../action-sheet-item/common';
export interface ActionSheetContext {
select: (item: ActionSheetItemProps) => void;
addItem: (item: ActionSheetItemProps) => void;
removeItem: (item: ActionSheetItemProps) => void;
}
export declare const actionSheetContextKey: InjectionKey<ActionSheetContext>;
export interface UseActionSheetReturn {
items: Ref<ActionSheetItemProps[]>;
setSelectCallback: (callback: (item: ActionSheetItemProps, index: number) => void) => void;
}
export declare function useActionSheet(): UseActionSheetReturn;
export declare function useActionSheetItem(item: ActionSheetItemProps): {
select: () => void;
};