diff --git a/packages/amis-editor/src/plugin/Form/InputFile.tsx b/packages/amis-editor/src/plugin/Form/InputFile.tsx index 2b699a283..a449a82a3 100644 --- a/packages/amis-editor/src/plugin/Form/InputFile.tsx +++ b/packages/amis-editor/src/plugin/Form/InputFile.tsx @@ -329,6 +329,8 @@ export class FileControlPlugin extends BasePlugin { '文件接收器', '默认不填写将上传到 bos,可以在系统配置中设置为自己的 bos 地址。' ), + className: 'inputFile-apiControl', + renderLabel: true, value: '/api/upload/file', __isUpload: true, visibleOn: diff --git a/packages/amis-editor/src/renderer/event-control/actions.tsx b/packages/amis-editor/src/renderer/event-control/actions.tsx index 04749f682..9c84af39b 100644 --- a/packages/amis-editor/src/renderer/event-control/actions.tsx +++ b/packages/amis-editor/src/renderer/event-control/actions.tsx @@ -413,7 +413,7 @@ const ACTION_TYPE_TREE = (manager: any): RendererPluginAction[] => { innerArgs: ['api', 'options'], descDetail: (info: any) => { let apiInfo = info?.args?.api; - if (typeof apiInfo === 'string'){ + if (typeof apiInfo === 'string') { apiInfo = normalizeApi(apiInfo); } return ( @@ -429,7 +429,7 @@ const ACTION_TYPE_TREE = (manager: any): RendererPluginAction[] => { }, schema: { type: 'wrapper', - className: "p-none", + className: 'p-none', body: [ getArgsWrapper( [ @@ -438,6 +438,8 @@ const ACTION_TYPE_TREE = (manager: any): RendererPluginAction[] => { label: '配置请求', mode: 'horizontal', size: 'lg', + inputClassName: 'm-b-none', + renderLabel: true, required: true }), { @@ -456,21 +458,27 @@ const ACTION_TYPE_TREE = (manager: any): RendererPluginAction[] => { remark: { className: 'ae-BaseRemark', icon: 'fa fa-question-circle', - shape: "circle", - placement: "left", - content: '勾选后,服务请求将以静默模式发送,即不会弹出成功或报错提示。' + shape: 'circle', + placement: 'left', + content: + '勾选后,服务请求将以静默模式发送,即不会弹出成功或报错提示。' } } ] } - ] + ], + false, + { + className: 'action-apiControl' + } ), { name: 'outputVar', type: 'input-text', label: '存储结果', placeholder: '请输入存储请求结果的变量名称', - description: '如需执行多次发送请求,可以修改此变量名用于区分不同请求返回的结果', + description: + '如需执行多次发送请求,可以修改此变量名用于区分不同请求返回的结果', mode: 'horizontal', size: 'lg', value: 'responseResult', @@ -513,8 +521,13 @@ const ACTION_TYPE_TREE = (manager: any): RendererPluginAction[] => { label: '配置请求', mode: 'horizontal', size: 'lg', + renderLabel: true, required: true - }) + }), + false, + { + className: 'action-apiControl' + } ) ] } @@ -617,7 +630,11 @@ const ACTION_TYPE_TREE = (manager: any): RendererPluginAction[] => { } } ], - supportComponents: ['form', ...FORMITEM_CMPTS, ...SUPPORT_DISABLED_CMPTS], + supportComponents: [ + 'form', + ...FORMITEM_CMPTS, + ...SUPPORT_DISABLED_CMPTS + ], schema: [ ...renderCmptSelect('选择组件', true), { @@ -656,7 +673,7 @@ const ACTION_TYPE_TREE = (manager: any): RendererPluginAction[] => { ); }, - supportComponents: 'byComponent', + supportComponents: [], schema: renderCmptSelect('选择组件', true) }, { @@ -681,7 +698,7 @@ const ACTION_TYPE_TREE = (manager: any): RendererPluginAction[] => { ); }, - supportComponents: 'byComponent', + supportComponents: [], schema: [ ...renderCmptActionSelect('选择组件', true), getArgsWrapper({ @@ -702,10 +719,15 @@ const ACTION_TYPE_TREE = (manager: any): RendererPluginAction[] => { }, { label: '指定序号', - value: 'appoint', + value: 'appoint' } ], - onChange: (value: string, oldVal: any, data: any, form: any) => { + onChange: ( + value: string, + oldVal: any, + data: any, + form: any + ) => { form.setValueByName('index', undefined); form.setValueByName('value', []); form.setValueByName('__valueInput', undefined); @@ -740,7 +762,7 @@ const ACTION_TYPE_TREE = (manager: any): RendererPluginAction[] => { labelField: 'label', valueField: 'value', required: true, - visibleOn: `data.__rendererName && ${SHOW_SELECT_PROP}`, + visibleOn: `data.__rendererName && ${SHOW_SELECT_PROP}` }, { name: 'key', @@ -794,7 +816,7 @@ const ACTION_TYPE_TREE = (manager: any): RendererPluginAction[] => { labelField: 'label', valueField: 'name', required: true, - visibleOn: `data.__rendererName && ${SHOW_SELECT_PROP}`, + visibleOn: `data.__rendererName && ${SHOW_SELECT_PROP}` }, { name: 'key', @@ -927,9 +949,7 @@ const ACTION_TYPE_TREE = (manager: any): RendererPluginAction[] => { return (