mirror of
https://gitee.com/baidu/amis.git
synced 2024-12-05 05:18:34 +08:00
fix: 修复 formulaControl 由于 name 干扰导致赋值不符合预期问题
This commit is contained in:
parent
6437ac4269
commit
760f4eddfc
@ -402,9 +402,11 @@ export default class FormulaControl extends React.Component<
|
||||
|
||||
let curRendererSchema: any = null;
|
||||
if (rendererSchema) {
|
||||
curRendererSchema = Object.assign({}, rendererSchema, data, {
|
||||
curRendererSchema = Object.assign({}, rendererSchema, {
|
||||
type: rendererSchema.type ?? data.type,
|
||||
name: rendererSchema.name ?? data.name ?? 'value'
|
||||
// 目前表单项 wrapControl 还必须依赖一个 name
|
||||
// 所以这里先随便取个名字,这里渲染的时候应该是 value 控制,而不是关联 name
|
||||
name: 'FORMULA_CONTROL_PLACEHOLDER'
|
||||
});
|
||||
|
||||
// 默认要剔除的字段
|
||||
@ -521,9 +523,6 @@ export default class FormulaControl extends React.Component<
|
||||
|
||||
const {formulaPickerOpen, variables, variableMode} = this.state;
|
||||
|
||||
// 自身字段
|
||||
const selfName = this.props?.data?.name;
|
||||
|
||||
// 判断是否含有公式表达式
|
||||
const isExpr = isExpression(value);
|
||||
|
||||
|
@ -1159,13 +1159,6 @@ setSchemaTpl('nav-badge', {
|
||||
setSchemaTpl('nav-default-active', {
|
||||
type: 'ae-nav-default-active'
|
||||
});
|
||||
// 暂未使用
|
||||
setSchemaTpl('formulaControl', (schema: object = {}) => {
|
||||
return {
|
||||
type: 'ae-formulaControl',
|
||||
...schema
|
||||
};
|
||||
});
|
||||
|
||||
/**
|
||||
* 日期范围快捷键组件
|
||||
|
Loading…
Reference in New Issue
Block a user