form-designer-xinyi
Version:
基于vue3的设计器,可视化开发页面表单
113 lines (111 loc) • 3.55 kB
TypeScript
import { PageSchema } from '../../../types/epic-designer';
import { DesignerProps } from './types';
/**
* 接受一个PageSchema对象作为参数。根据传入的schemas和script属性,更新页面对应的数据
* @param pageSchema
*/
declare function setData(schema: PageSchema): void;
/**
* 返回当前页面数据的 PageSchema 对象,包含页面当前的 schemas 和 script 数据。
*/
declare function getData(): PageSchema;
/**
* 重置页面数据为默认数据。
*/
declare function reset(): void;
/**
* 预览
*/
declare function handlePreview(): void;
declare function __VLS_template(): {
header?(_: {}): any;
"header-prefix"?(_: {}): any;
"header-title"?(_: {}): any;
"header-right-prefix"?(_: {}): any;
"header-right-action"?(_: {}): any;
"header-right-suffix"?(_: {}): any;
};
declare const __VLS_component: import('@vue/runtime-core').DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<DesignerProps>, {
disabledZoom: boolean;
hiddenHeader: boolean;
lockDefaultSchemaEdit: boolean;
title: string;
defaultSchema: () => {
schemas: {
type: string;
id: string;
label: string;
children: never[];
componentProps: {
style: {
padding: string;
};
};
}[];
script: string;
};
}>, {
setData: typeof setData;
getData: typeof getData;
reset: typeof reset;
preview: typeof handlePreview;
}, unknown, {}, {}, import('@vue/runtime-core').ComponentOptionsMixin, import('@vue/runtime-core').ComponentOptionsMixin, {
reset: (...args: any[]) => void;
ready: (...args: any[]) => void;
save: (...args: any[]) => void;
toggleDeviceMode: (...args: any[]) => void;
}, string, import('@vue/runtime-core').PublicProps, Readonly<import('@vue/runtime-core').ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<DesignerProps>, {
disabledZoom: boolean;
hiddenHeader: boolean;
lockDefaultSchemaEdit: boolean;
title: string;
defaultSchema: () => {
schemas: {
type: string;
id: string;
label: string;
children: never[];
componentProps: {
style: {
padding: string;
};
};
}[];
script: string;
};
}>>> & {
onReset?: ((...args: any[]) => any) | undefined;
onReady?: ((...args: any[]) => any) | undefined;
onSave?: ((...args: any[]) => any) | undefined;
onToggleDeviceMode?: ((...args: any[]) => any) | undefined;
}, {
title: string;
disabledZoom: boolean;
hiddenHeader: boolean;
lockDefaultSchemaEdit: boolean;
defaultSchema: PageSchema;
}, {}>;
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, ReturnType<typeof __VLS_template>>;
export default _default;
type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
type __VLS_TypePropsToRuntimeProps<T> = {
[K in keyof T]-?: {} extends Pick<T, K> ? {
type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
} : {
type: import('vue').PropType<T[K]>;
required: true;
};
};
type __VLS_WithDefaults<P, D> = {
[K in keyof Pick<P, keyof P>]: K extends keyof D ? __VLS_Prettify<P[K] & {
default: D[K];
}> : P[K];
};
type __VLS_Prettify<T> = {
[K in keyof T]: T[K];
} & {};
type __VLS_WithTemplateSlots<T, S> = T & {
new (): {
$slots: S;
};
};