Skip to content

Commit

Permalink
chore(amis-editor): wizard接口配置使用apiControl,以便和其它组件配置面板保持一致 (#11463)
Browse files Browse the repository at this point in the history
* chore(amis-editor): wizard接口配置使用apiControl,以便和其它组件配置面板保持一致

Closes #11462

* chore(amis-editor): Breadcrumb接口配置使用apiControl,以便和其它组件配置面板保持一致

* chore(amis-editor): Steps组件接口配置使用apiControl,以便和其它组件配置面板保持一致

* chore(amis-editor): Tasks组件接口配置使用apiControl,以便和其它组件配置面板保持一致

* chore(amis-editor): InputArray组件接口配置使用apiControl,以便和其它组件配置面板保持一致

* chore(amis-editor): Form组件接口配置使用apiControl,以便和其它组件配置面板保持一致

* chore(amis-editor): Action组件接口配置使用apiControl,以便和其它组件配置面板保持一致

* chore(amis-editor): TableCell组件接口配置使用apiControl,以便和其它组件配置面板保持一致

* chore(amis-editor): Button组件接口配置使用apiControl,以便和其它组件配置面板保持一致

* chore(amis-editor): ConditionBuilder组件接口配置使用apiControl,以便和其它组件配置面板保持一致

* chore(amis-editor): 删除历史api配置模板,避免后续被使用引起的不一致性问题
  • Loading branch information
ranwawa authored Jan 9, 2025
1 parent 54e92dc commit df34821
Show file tree
Hide file tree
Showing 10 changed files with 23 additions and 339 deletions.
2 changes: 1 addition & 1 deletion packages/amis-editor/src/plugin/Breadcrumb.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ export class BreadcrumbPlugin extends BasePlugin {
type: 'input-text',
name: 'separator'
},
getSchemaTpl('api', {
getSchemaTpl('apiControl', {
label: '动态数据',
name: 'source'
}),
Expand Down
2 changes: 1 addition & 1 deletion packages/amis-editor/src/plugin/Form/InputArray.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ export class ArrayControlPlugin extends BasePlugin {
pipeIn: defaultValue(true)
}),

getSchemaTpl('api', {
getSchemaTpl('apiControl', {
name: 'deleteApi',
label: '删除前的请求',
visibleOn: 'this.removable'
Expand Down
2 changes: 1 addition & 1 deletion packages/amis-editor/src/plugin/Form/Item.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -238,7 +238,7 @@ export class ItemPlugin extends BasePlugin {
getSchemaTpl('validationErrors'),
getSchemaTpl('validateOnChange'),
getSchemaTpl('submitOnChange'),
getSchemaTpl('api', {
getSchemaTpl('apiControl', {
name: 'validateApi',
label: '校验接口',
description: '单独校验这个表单项的接口'
Expand Down
2 changes: 1 addition & 1 deletion packages/amis-editor/src/plugin/Others/Action.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,7 @@ export class ActionPlugin extends BasePlugin {
)
},

getSchemaTpl('api', {
getSchemaTpl('apiControl', {
label: '目标API',
visibleOn: 'this.actionType == "ajax" || this.actionType == "download"'
}),
Expand Down
2 changes: 1 addition & 1 deletion packages/amis-editor/src/plugin/Others/TableCell.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ export class TableCellPlugin extends BasePlugin {
pipeIn: (value: any) => !!value
}),

getSchemaTpl('api', {
getSchemaTpl('apiControl', {
label: '立即保存接口',
description:
'是否单独给立即保存配置接口,如果不配置,则默认使用quickSaveItemApi。',
Expand Down
2 changes: 1 addition & 1 deletion packages/amis-editor/src/plugin/Steps.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ export class StepsPlugin extends BasePlugin {
}
]
},
getSchemaTpl('api', {
getSchemaTpl('apiControl', {
name: 'source',
label: '获取步骤接口'
})
Expand Down
6 changes: 3 additions & 3 deletions packages/amis-editor/src/plugin/Tasks.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ export class TasksPlugin extends BasePlugin {
description: '可以不设置,如果检测接口返回这些信息的话。'
},

getSchemaTpl('api', {
getSchemaTpl('apiControl', {
name: 'checkApi',
label: '状态检测接口'
}),
Expand All @@ -103,12 +103,12 @@ export class TasksPlugin extends BasePlugin {
label: '定时检测间隔'
},

getSchemaTpl('api', {
getSchemaTpl('apiControl', {
name: 'submitApi',
label: '提交接口'
}),

getSchemaTpl('api', {
getSchemaTpl('apiControl', {
name: 'reSubmitApi',
label: '重试接口'
}),
Expand Down
24 changes: 12 additions & 12 deletions packages/amis-editor/src/plugin/Wizard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -416,7 +416,7 @@ export class WizardPlugin extends BasePlugin {
visibleOn: 'this.mode == "horizontal"'
}),

getSchemaTpl('api', {
getSchemaTpl('apiControl', {
label: '保存接口',
description:
'如果接口返回了 <code>step</code> 变量,且数值是数字类型,比如 <code>3</code>,提交完后回跳到第 3 步'
Expand All @@ -438,7 +438,7 @@ export class WizardPlugin extends BasePlugin {
pipeOut: (value: any) => (value ? '' : undefined)
}),

getSchemaTpl('api', {
getSchemaTpl('apiControl', {
name: 'asyncApi',
label: '异步检测接口',
visibleOn: 'this.asyncApi != null',
Expand All @@ -450,7 +450,7 @@ export class WizardPlugin extends BasePlugin {
type: 'divider'
},

getSchemaTpl('api', {
getSchemaTpl('apiControl', {
name: 'initApi',
label: '初始化接口',
description: '用来初始化表单数据'
Expand All @@ -472,7 +472,7 @@ export class WizardPlugin extends BasePlugin {
pipeOut: (value: any) => (value ? '' : undefined)
}),

getSchemaTpl('api', {
getSchemaTpl('apiControl', {
name: 'initAsyncApi',
label: '异步检测接口',
visibleOn: 'this.initAsyncApi != null',
Expand Down Expand Up @@ -506,7 +506,7 @@ export class WizardPlugin extends BasePlugin {
{
title: '接口',
body: [
getSchemaTpl('api', {
getSchemaTpl('apiControl', {
name: 'initApi',
label: '初始化接口',
description:
Expand All @@ -530,7 +530,7 @@ export class WizardPlugin extends BasePlugin {
pipeOut: (value: any) => (value ? '' : undefined)
}),

getSchemaTpl('api', {
getSchemaTpl('apiControl', {
name: 'initAsyncApi',
label: '异步检测接口',
visibleOn: 'this.initAsyncApi != null',
Expand Down Expand Up @@ -575,7 +575,7 @@ export class WizardPlugin extends BasePlugin {
type: 'divider'
},

getSchemaTpl('api', {
getSchemaTpl('apiControl', {
label: '保存接口',
description:
'用来保存表单数据, 最后一步点击完成触发,<code>如果最后一步中已经设置保存接口,则此处设置无效。</code>'
Expand All @@ -597,7 +597,7 @@ export class WizardPlugin extends BasePlugin {
pipeOut: (value: any) => (value ? '' : undefined)
}),

getSchemaTpl('api', {
getSchemaTpl('apiControl', {
name: 'asyncApi',
label: '异步检测接口',
visibleOn: 'this.asyncApi != null',
Expand Down Expand Up @@ -767,7 +767,7 @@ export class WizardPlugin extends BasePlugin {
getSchemaTpl('title', {
pipeIn: (value: any, data: any) => value || data.label
}),
getSchemaTpl('api', {
getSchemaTpl('apiControl', {
label: '保存接口',
description:
'如果接口返回了 <code>step</code> 变量,且数值是数字类型,比如 <code>3</code>,提交完后回跳到第 3 步'
Expand All @@ -789,7 +789,7 @@ export class WizardPlugin extends BasePlugin {
pipeOut: (value: any) => (value ? '' : undefined)
}),

getSchemaTpl('api', {
getSchemaTpl('apiControl', {
name: 'asyncApi',
label: '异步检测接口',
visibleOn: 'this.asyncApi != null',
Expand All @@ -799,7 +799,7 @@ export class WizardPlugin extends BasePlugin {
{
type: 'divider'
},
getSchemaTpl('api', {
getSchemaTpl('apiControl', {
name: 'initApi',
label: '初始化接口',
description: '用来初始化表单数据'
Expand All @@ -821,7 +821,7 @@ export class WizardPlugin extends BasePlugin {
pipeOut: (value: any) => (value ? '' : undefined)
}),

getSchemaTpl('api', {
getSchemaTpl('apiControl', {
name: 'initAsyncApi',
label: '异步检测接口',
visibleOn: 'this.initAsyncApi != null',
Expand Down
2 changes: 1 addition & 1 deletion packages/amis-editor/src/renderer/event-control/helper.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -780,7 +780,7 @@ export const getOldActionSchema = (
)
},

getSchemaTpl('api', {
getSchemaTpl('getOldActionSchema', {
label: '目标API',
visibleOn: 'this.actionType == "ajax"'
}),
Expand Down
Loading

0 comments on commit df34821

Please sign in to comment.