Merge changes I0f79c25d,Ie1393474

* changes:
  样式优化
  fix: 修复日期类控件自动将 value 默认值运算并设置上的问题
This commit is contained in:
liaoxuezhi 2022-08-01 17:01:32 +08:00 committed by iCode
commit 5ddf197d45

View File

@ -13,7 +13,7 @@ import isString from 'lodash/isString';
import isEqual from 'lodash/isEqual';
import omit from 'lodash/omit';
import cx from 'classnames';
import {FormItem, Button, InputBox, Icon, render, ResultBox} from 'amis';
import {FormItem, Button, InputBox, Icon, ResultBox} from 'amis';
import {FormulaExec, isExpression} from 'amis';
import {PickerContainer} from 'amis';
import {FormulaEditor} from 'amis-ui/lib/components/formula/Editor';
@ -321,7 +321,8 @@ export default class FormulaControl extends React.Component<
'suffix',
'unitOptions',
'keyboard',
'kilobitSeparator'
'kilobitSeparator',
'value'
];
// 当前组件要剔除的字段
@ -356,6 +357,7 @@ export default class FormulaControl extends React.Component<
// 设置popOverContainer
curRendererSchema.popOverContainer = window.document.body;
}
return curRendererSchema;
}
@ -390,6 +392,7 @@ export default class FormulaControl extends React.Component<
rendererWrapper,
manager,
useExternalFormData = false,
render,
...rest
} = this.props;
@ -445,9 +448,9 @@ export default class FormulaControl extends React.Component<
rendererWrapper ? 'border-wrapper' : ''
)}
>
{render(
this.filterCustomRendererProps(rendererSchema),
{
{render('left', this.filterCustomRendererProps(rendererSchema), {
inputOnly: true,
value: value,
data: useExternalFormData
? {
...this.props.data
@ -455,11 +458,7 @@ export default class FormulaControl extends React.Component<
: {},
onChange: this.handleSimpleInputChange,
manager: manager
},
{
...(manager?.env || {})
}
)}
})}
</div>
)}
{!simple && isExpr && (