UNPKG

@opentiny/vue-renderless

Version:

An enterprise-class UI component library, support both Vue.js 2 and Vue.js 3, as well as PC and mobile.

30 lines (27 loc) 1.02 kB
import { ExtractPropTypes, ComputedRef } from 'vue'; import { labelProps } from '@/label/src'; import { ISharedRenderlessFunctionParams, ISharedRenderlessParamUtils } from './shared.type.js'; type ILabelProps = ExtractPropTypes<typeof labelProps>; interface ILabelState { label: ComputedRef<string>; type: ComputedRef<string>; color: ComputedRef<string>; size: ComputedRef<string>; labelStyle: ComputedRef<object>; labelClass: ComputedRef<string>; isRequired: ComputedRef<boolean>; } interface ILabelApi { state: ILabelState; handleClick: (event: MouseEvent) => void; computeLabel: () => string; computeLabelStyle: () => object; computeLabelClass: () => []; } type ILabelRenderlessParams = ISharedRenderlessFunctionParams<never> & { api: ILabelApi; state: ILabelState; props: ILabelProps; }; type ILabelRenderlessParamUtils = ISharedRenderlessParamUtils<never>; export { ILabelApi, ILabelProps, ILabelRenderlessParamUtils, ILabelRenderlessParams, ILabelState };