@heartlee/element-components
Version:
a component library for Vue 3 base on element-plus. Forked from element-pro-components. 根据业务需求自用,如需使用,请移步官方仓库使用
35 lines (34 loc) • 1.37 kB
TypeScript
import { Ref, WritableComputedRef, ComputedRef } from 'vue';
import type { IRouteRecordRaw, IScreenSize, UnknownObject, InstallOptions, MaybeRef } from '../types/index';
/** get the global config */
export declare function useProOptions(): Required<InstallOptions>;
/**
* toggle show
* @param state init value (default `false`)
*/
export declare function useShow(state?: MaybeRef<boolean>): {
show: Ref<boolean>;
toggleShow: () => void;
};
/** Gets the responsive breakpoint of the current screen */
export declare function useScreenSize(): Ref<IScreenSize>;
/**
* routes with no value will get `vue-router` routes
* @param props components props
*/
export declare function useCurrentRoutes(props: Readonly<{
routes?: IRouteRecordRaw[];
}>): Ref<IRouteRecordRaw[]> | ComputedRef<IRouteRecordRaw[]>;
/**
* exclusion `class` `style` for attrs
* @param excludeKeys Additional exclusion value
*/
export declare function useAttrs(excludeKeys?: string[]): Ref<UnknownObject>;
/**
* bind model value
* @param props value props
* @param key value key
* @param defaultValue config the default value
* @param emit update function
*/
export declare function useVModel<T>(props: Readonly<UnknownObject>, key?: string, defaultValue?: T, emit?: (name: string, ...args: unknown[]) => void): WritableComputedRef<T | undefined>;