d-render
Version:
基于 Element Plus 二次封装的数据驱动渲染组件库 - 表单、搜索表单、表格配置化渲染
30 lines (29 loc) • 1.49 kB
TypeScript
import { Ref } from 'vue';
import { IAnyObject, IRenderConfig, IRenderConfigDependOn, TFormConfig } from '@d-render/shared';
interface IEffectFunc {
value: (...args: Array<unknown>) => unknown | Promise<unknown>;
}
interface IEffect {
[key: string]: string | IEffectFunc;
}
export type IObjectKey = IRenderConfigDependOn;
export type IKey = IObjectKey | string;
export declare const getValuesByKeys: (data?: IAnyObject, keys?: Array<IKey>) => {};
export declare const setValuesByKeys: (target?: IAnyObject, keys?: Array<IKey>, values?: IAnyObject) => void;
export declare const cloneDeepConfig: (config: TFormConfig) => TFormConfig;
export declare const isHideLabel: (config: TFormConfig) => boolean;
export declare const getLabelWidth: (config: TFormConfig) => string | undefined;
export declare const getChangeIndex: (values: Array<unknown>, oldValues: Array<unknown>) => number[];
export declare const secureNewFn: (...params: Array<string>) => Function;
export declare const judgeUseFn: (key: string, config: IRenderConfig, effect: IEffect) => any;
export declare class UpdateModelQueue {
getModel: () => IAnyObject | Ref<IAnyObject>;
updateModel: (value: IAnyObject) => void;
data: Map<string, unknown>;
isCollect?: boolean;
constructor(getModel: () => IAnyObject | Ref<IAnyObject>, updateModel: (value: IAnyObject) => void);
init(): void;
append(key: string, value: unknown): void;
update(): void;
}
export {};