UNPKG

@aplus-frontend/ui

Version:

28 lines (27 loc) 1.31 kB
import { InjectionKey, Ref, ComputedRef } from 'vue'; export declare const defaultNamespace = "aplus"; export declare const namespaceContextKey: InjectionKey<Ref<string | undefined>>; export declare const useGetDerivedNamespace: (namespaceOverrides?: Ref<string | undefined>) => ComputedRef<string>; export declare const useNamespace: ( /** * 块 一般是指组件名 */ block: string, namespaceOverrides?: Ref<string | undefined>) => { namespace: ComputedRef<string>; b: (blockSuffix?: string) => string; e: (element?: string) => string; m: (modifier?: string) => string; be: (blockSuffix?: string, element?: string) => string; em: (element?: string, modifier?: string) => string; bm: (blockSuffix?: string, modifier?: string) => string; bem: (blockSuffix?: string, element?: string, modifier?: string) => string; is: { (name: string, state: boolean | undefined): string; (name: string): string; }; cssVar: (object: Record<string, string | undefined | null>, useNamespace?: boolean) => Record<string, string>; cssVarName: (name: string) => string; cssVarBlock: (object: Record<string, string>) => Record<string, string>; cssVarBlockName: (name: string) => string; }; export type UseNamespaceReturn = ReturnType<typeof useNamespace>;