vuux
Version:
Vue3 Nuxt3 Nuxt4 组件库
23 lines (22 loc) • 785 B
TypeScript
import { Ref } from 'vue';
import { Emits, MapItem, Props } from '../types';
/**
* hook
*
* @param props 组件属性
* @param mapInputItemRef 每个item实例
* @param emit 组件事件
*/
export declare const useMapInput: (props: Props, mapInputItemRef: Ref<(HTMLLIElement | null)[]>, emit: Emits) => {
items: import('vue').WritableComputedRef<MapItem[], MapItem[]>;
syncValue: () => void;
addItem: () => void;
deleteItem: (index: number) => void;
canDelete: () => boolean;
canAdd: (index: number) => boolean;
getAll: () => MapItem[];
getById: (id: string | number) => MapItem | null;
getByKey: (key: string | number) => MapItem | null;
getByIds: (ids: (string | number)[]) => MapItem[];
getByKeys: (keys: string[]) => MapItem[];
};