UNPKG

@farris/ui-vue

Version:

Farris Vue, a Farris Design based Vue3 component library.

61 lines (60 loc) 1.56 kB
import { ComputedRef, Ref } from "vue"; import { EditorConfig, EditorMap } from "../event-parameter.props"; export interface UseBaseEditor { /** * 参数组件值变化后的响应函数 * @param $event 鼠标事件对象 */ onValueChange: (selectItems: any[], value: any) => void; /** * 构造属性 */ createEditorProps: () => void; } export interface UseEditorProxy { /** * 获取编辑器类型 */ getEditorType: () => string; /** * 获取编辑器配置 */ getEditorConfig: () => EditorConfig; /** * 获取编辑器映射 */ getEditorMap: () => EditorMap; } export interface UseEditorInput extends UseBaseEditor { shouldRenderAppendButton?: ComputedRef<boolean>; } export interface UseParameterEditor { /** * 组件结构数据 */ tabs: Ref<any[]>; /** * 重组表单组件数据 */ assembleOutline: () => void; /** * 重组字段数据 */ assembleSchemaFieldsByComponent: () => void; /** * 重组变量数据 */ assembleStateVariables: () => void; /** * 处理表单组件的返回值 */ processFromOutlineData: (data: any, textareaRef: HTMLTextAreaElement, result?: string) => string; /** * 处理字段的返回值 */ processFromFieldData: (data: any, textareaRef: HTMLTextAreaElement) => string | undefined; /** * 处理变量的返回值 */ processFromVariableData: (data: any, textareaRef: HTMLTextAreaElement) => string; }