plus-pro-components
Version:
Page level components developed based on Element Plus.
54 lines (52 loc) • 1.26 kB
TypeScript
import { Component } from 'vue';
import { FormItemValueType } from 'plus-pro-components/es/types';
export type FieldComponentType = {
/**
* parent Component
*/
component: Component;
/**
* parent Props
*/
props?: {
[key: string]: string | boolean | undefined;
type?: 'textarea';
/**
* @default 'plus.field.pleaseSelect'
*/
placeholder?: 'plus.field.pleaseEnter';
};
/**
* children Component
*/
children?: Component;
/**
* has options
* @default false
*/
hasOptions?: boolean;
/**
* has SelectEvent
* @default false
*/
hasSelectEvent?: boolean;
/**
* has version compatibility
* @default false
*/
hasVersionCompatibility?: boolean;
};
export type FieldComponentMapType = Record<Exclude<FormItemValueType, undefined | 'text'>, FieldComponentType>;
export declare const FieldComponentMap: FieldComponentMapType;
/**
* has component
* @param valueType
* @returns
*/
export declare const hasFieldComponent: (valueType?: string) => boolean;
/**
* get component
* @param valueType
* @returns
*/
export declare const getFieldComponent: (valueType?: string) => FieldComponentType;