Skip to content

Commit

Permalink
解决api重写后覆盖无效 (baidu#11275)
Browse files Browse the repository at this point in the history
  • Loading branch information
z418577198 authored and allenve committed Dec 12, 2024
1 parent ddfeb82 commit a9553a5
Showing 1 changed file with 49 additions and 47 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -24,53 +24,55 @@ registerActionPanel('ajax', {
</div>
);
},
schema: {
type: 'wrapper',
className: 'p-none',
body: [
getSchemaTpl('apiControl', {
name: 'api',
label: '配置请求',
mode: 'horizontal',
size: 'lg',
inputClassName: 'm-b-none',
renderLabel: true,
required: true
}),
{
name: 'options',
type: 'combo',
label: tipedLabel(
'静默请求',
'开启后,服务请求将以静默模式发送,即不会弹出成功或报错提示。'
),
mode: 'horizontal',
items: [
{
type: 'switch',
name: 'silent',
label: false,
onText: '开启',
offText: '关闭',
mode: 'horizontal',
pipeIn: defaultValue(false)
}
]
},
{
name: 'outputVar',
type: 'input-text',
label: '请求结果',
placeholder: '请输入存储请求结果的变量名称',
description:
'如需执行多次发送请求,可以修改此变量名用于区分不同请求返回的结果',
mode: 'horizontal',
size: 'lg',
value: 'responseResult',
required: true
}
]
},
schema: () => [
{
type: 'wrapper',
className: 'p-none',
body: [
getSchemaTpl('apiControl', {
name: 'api',
label: '配置请求',
mode: 'horizontal',
size: 'lg',
inputClassName: 'm-b-none',
renderLabel: true,
required: true
}),
{
name: 'options',
type: 'combo',
label: tipedLabel(
'静默请求',
'开启后,服务请求将以静默模式发送,即不会弹出成功或报错提示。'
),
mode: 'horizontal',
items: [
{
type: 'switch',
name: 'silent',
label: false,
onText: '开启',
offText: '关闭',
mode: 'horizontal',
pipeIn: defaultValue(false)
}
]
},
{
name: 'outputVar',
type: 'input-text',
label: '请求结果',
placeholder: '请输入存储请求结果的变量名称',
description:
'如需执行多次发送请求,可以修改此变量名用于区分不同请求返回的结果',
mode: 'horizontal',
size: 'lg',
value: 'responseResult',
required: true
}
]
}
],
outputVarDataSchema: [
{
type: 'object',
Expand Down

0 comments on commit a9553a5

Please sign in to comment.