mirror of
https://gitee.com/baidu/amis.git
synced 2024-12-16 01:40:53 +08:00
fix: 修复日期类控件自动将 value 默认值运算并设置上的问题
Change-Id: Ie1393474a59455b991e09bfc3a84f574b6cdbff9
This commit is contained in:
parent
177b417f99
commit
94f5cb05c6
@ -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 && (
|
||||
|
Loading…
Reference in New Issue
Block a user