version:5.2.0-beta.16

Change-Id: Ic87f15b87992d3c9dcbc7ff72b15aa710759a7ed
This commit is contained in:
qianchuan 2022-07-07 15:36:20 +08:00
parent f264e2c34f
commit 99fbf15d4c
3 changed files with 15 additions and 3 deletions

View File

@ -1,6 +1,6 @@
{
"name": "amis-editor",
"version": "5.2.0-beta.9",
"version": "5.2.0-beta.16",
"description": "amis 可视化编辑器",
"main": "lib/index.js",
"module": "esm/index.js",

View File

@ -345,7 +345,12 @@ export class FileControlPlugin extends BasePlugin {
getSchemaTpl('remark'),
getSchemaTpl('labelRemark'),
getSchemaTpl('description'),
getSchemaTpl('autoFillApi')
getSchemaTpl('autoFillApi', {
visibleOn: '!this.autoFill || this.autoFill.api'
}),
getSchemaTpl('autoFill', {
visibleOn: '!this.autoFill || !this.autoFill.api'
})
]
},
getSchemaTpl('status', {isFormItem: true}),

View File

@ -24,7 +24,7 @@ import type {
VariableItem,
FuncGroup
} from 'amis-ui/lib/components/formula/Editor';
import type {FormControlProps} from 'amis-core';
import {FormControlProps, dataMapping} from 'amis-core';
import type {BaseEventContext} from 'amis-editor-core';
import {EditorManager} from 'amis-editor-core';
@ -159,6 +159,13 @@ export default class FormulaControl extends React.Component<
return [];
}
if (
variables &&
variables.some((item: any) => isExpression(item.children))
) {
variables = dataMapping(variables, this.props.data);
}
const {context, evalMode} = this.props;
// 自身字段
const field = this.props?.data?.name;