yanzhen-design-vue
Version:
83 lines (82 loc) • 3.77 kB
TypeScript
import { ContactsModelValueType } from '../constants/contacts';
import { ExtractEmitsTypes } from '@yanzhen-libs/utils-vue';
import { ExtractPropTypes, PropType, SetupContext, WritableComputedRef } from 'vue';
import { ContactsValue } from '../constants';
export type ContactsModelValue = ContactsValue | ContactsValue[];
export declare function contactsModelValueProp(): {
readonly type: PropType<import('@yanzhen-libs/utils-vue').EpPropMergeType<PropType<ContactsModelValue>, never, never>>;
readonly required: false;
readonly validator: ((val: unknown) => boolean) | undefined;
__epPropKey: true;
};
export type ContactsModelValueProp = ReturnType<typeof contactsModelValueProp>;
export declare function contactsModelValueProps(): {
"onUpdate:value": {
type: PropType<(value: ContactsModelValue) => void>;
};
"onUpdate:userList": {
type: PropType<(value: ContactsModelValue) => void>;
};
"onUpdate:outorgList": {
type: PropType<(value: ContactsModelValue) => void>;
};
"onUpdate:roleList": {
type: PropType<(value: ContactsModelValue) => void>;
};
"onUpdate:organizationList": {
type: PropType<(value: ContactsModelValue) => void>;
};
"onUpdate:groupList": {
type: PropType<(value: ContactsModelValue) => void>;
};
value: {
readonly type: PropType<ContactsModelValue>;
readonly required: false;
readonly validator: ((val: unknown) => boolean) | undefined;
__epPropKey: true;
};
userList: {
readonly type: PropType<ContactsModelValue>;
readonly required: false;
readonly validator: ((val: unknown) => boolean) | undefined;
__epPropKey: true;
};
outorgList: {
readonly type: PropType<ContactsModelValue>;
readonly required: false;
readonly validator: ((val: unknown) => boolean) | undefined;
__epPropKey: true;
};
roleList: {
readonly type: PropType<ContactsModelValue>;
readonly required: false;
readonly validator: ((val: unknown) => boolean) | undefined;
__epPropKey: true;
};
organizationList: {
readonly type: PropType<ContactsModelValue>;
readonly required: false;
readonly validator: ((val: unknown) => boolean) | undefined;
__epPropKey: true;
};
groupList: {
readonly type: PropType<ContactsModelValue>;
readonly required: false;
readonly validator: ((val: unknown) => boolean) | undefined;
__epPropKey: true;
};
};
export type ContactsModelValueProps = ExtractPropTypes<ReturnType<typeof contactsModelValueProps>>;
export type ContactsModelValuePropsProp = keyof ContactsModelValueProps;
export declare const contactsModelValueEmits: {
"update:value": (value: ContactsModelValue) => boolean;
"update:user-list": (value: ContactsModelValue) => boolean;
"update:outorg-list": (value: ContactsModelValue) => boolean;
"update:role-list": (value: ContactsModelValue) => boolean;
"update:organization-list": (value: ContactsModelValue) => boolean;
"update:group-list": (value: ContactsModelValue) => boolean;
};
export type ContactsModelValueEmits = ExtractEmitsTypes<typeof contactsModelValueEmits>;
export type ContactsModelValueEmitsProp = keyof ContactsModelValueEmits;
export declare function useContactsVModels<P extends string = ContactsModelValueType>(prop: P, emit?: SetupContext<ContactsModelValueEmits>['emit']): WritableComputedRef<ContactsModelValue | undefined>;
export declare function useContactsVModels<P extends string = ContactsModelValueType>(prop?: null, emit?: SetupContext<ContactsModelValueEmits>['emit']): Record<P, WritableComputedRef<ContactsModelValue | undefined>>;