mirror of
https://gitee.com/baidu/amis.git
synced 2024-12-02 20:09:08 +08:00
fix: 修复事件动作请求接口报错 & 输入框样式调整
This commit is contained in:
parent
056d3251b6
commit
259a96a0e2
@ -109,7 +109,4 @@
|
||||
--link-onClick-fontSize: #{$Editor-right-panel-font-size};
|
||||
--radio-default-default-fontSize: #{$Editor-right-panel-font-size};
|
||||
--select-base-default-option-fontSize: #{$Editor-right-panel-font-size};
|
||||
--Tabs--line-fontSize: #{$Editor-right-panel-font-size};
|
||||
--Tabs--line-active-fontSize: #{$Editor-right-panel-font-size};
|
||||
--Tabs--line-hover-fontSize: #{$Editor-right-panel-font-size};
|
||||
}
|
||||
|
@ -5,8 +5,6 @@ $category-2-height: px2rem(32px);
|
||||
$tooltip-bottom: '[data-tooltip][data-position=' bottom ']:hover:after';
|
||||
|
||||
.editor-right-panel {
|
||||
@include panel-sm-content();
|
||||
|
||||
position: relative;
|
||||
flex: 0 0 auto;
|
||||
width: $right-panel-width;
|
||||
|
@ -83,6 +83,9 @@
|
||||
|
||||
.ae-ApiControl-form {
|
||||
@include panel-sm-content();
|
||||
--Tabs--line-fontSize: #{$Editor-right-panel-font-size};
|
||||
--Tabs--line-active-fontSize: #{$Editor-right-panel-font-size};
|
||||
--Tabs--line-hover-fontSize: #{$Editor-right-panel-font-size};
|
||||
.ae-ApiControl-tabContent {
|
||||
max-height: 560px;
|
||||
overflow-x: hidden;
|
||||
|
@ -25,6 +25,7 @@ div.ae-editor-FormulaControl {
|
||||
|
||||
& &-input {
|
||||
flex: 1;
|
||||
height: 32px;
|
||||
border-radius: var(--input-default-default-top-left-border-radius) 0 0
|
||||
var(--input-default-default-bottom-left-border-radius);
|
||||
max-width: calc(100% - 29px); // 避免表达式内容太长撑开面板
|
||||
@ -32,6 +33,11 @@ div.ae-editor-FormulaControl {
|
||||
&.is-clearable {
|
||||
padding-right: 30px; // 避免间隙过大
|
||||
}
|
||||
|
||||
svg {
|
||||
width: 12px;
|
||||
height: 12px;
|
||||
}
|
||||
}
|
||||
|
||||
&-select-style {
|
||||
|
@ -1646,19 +1646,15 @@ export const ACTION_TYPE_TREE = (manager: any): RendererPluginAction[] => {
|
||||
rootLabel: '页面变量',
|
||||
options: pageVariableOptions
|
||||
}),
|
||||
{
|
||||
type: 'input-formula',
|
||||
getSchemaTpl('formulaControl', {
|
||||
name: 'value',
|
||||
label: '数据设置',
|
||||
variables: '${variables}',
|
||||
evalMode: false,
|
||||
variableMode: 'tabs',
|
||||
inputMode: 'input-group',
|
||||
size: 'lg',
|
||||
mode: 'horizontal',
|
||||
required: true,
|
||||
placeholder: '请输入变量值'
|
||||
}
|
||||
})
|
||||
]
|
||||
}
|
||||
])
|
||||
@ -1677,19 +1673,15 @@ export const ACTION_TYPE_TREE = (manager: any): RendererPluginAction[] => {
|
||||
getCustomNodeTreeSelectSchema({
|
||||
options: variableOptions
|
||||
}),
|
||||
{
|
||||
type: 'input-formula',
|
||||
getSchemaTpl('formulaControl', {
|
||||
name: 'value',
|
||||
label: '数据设置',
|
||||
variables: '${variables}',
|
||||
evalMode: false,
|
||||
variableMode: 'tabs',
|
||||
inputMode: 'input-group',
|
||||
size: 'lg',
|
||||
mode: 'horizontal',
|
||||
required: true,
|
||||
placeholder: '请输入变量值'
|
||||
}
|
||||
})
|
||||
]
|
||||
}
|
||||
])
|
||||
|
@ -731,6 +731,7 @@ export class EventControl extends React.Component<
|
||||
onSubmit(type: string, config: any) {
|
||||
const {actionConfigSubmitFormatter} = this.props;
|
||||
const action = actionConfigSubmitFormatter?.(config) ?? config;
|
||||
delete action.__actionSchema;
|
||||
if (type === 'add') {
|
||||
this.addAction?.(config.eventKey, action);
|
||||
} else if (type === 'update') {
|
||||
|
Loading…
Reference in New Issue
Block a user