create.config.ts
804 Bytes
import { LogFieldsEnum, LogFieldsNameEnum } from '../../../enum/formField/action';
import { JavascriptEditorWithTestModal } from '../../../src/components/JavaScriptFilterModal';
import { FormSchema, useComponentRegister } from '/@/components/Form';
useComponentRegister('JavascriptEditorWithTestModal', JavascriptEditorWithTestModal);
export const formSchemas: FormSchema[] = [
{
field: LogFieldsEnum.JS_SCRIPT,
component: 'JavascriptEditorWithTestModal',
label: LogFieldsNameEnum.JS_SCRIPT,
valueField: 'value',
changeEvent: 'update:value',
componentProps: {
javaScriptEditorProps: {
functionName: 'ToString',
scriptType: 'string',
paramsName: ['msg', 'metadata', 'msgType'],
},
buttonName: 'Test to string function',
},
},
];