amis-saas-8240 「纯表达式」当为设置 evalMode 为 true的属性时候,回显有问题

Change-Id: I9bd8c6667faae02af7589615a14864f203550a5c
This commit is contained in:
jiatianqi 2022-11-22 10:49:34 +08:00
parent c4d0577dbd
commit 1836a83bc9

View File

@ -84,8 +84,11 @@ export default class ExpressionFormulaControl extends React.Component<
@autobind
initFormulaPickerValue(value: string) {
const formulaPickerValue =
value?.replace(/^\$\{(.*)\}$/, (match: string, p1: string) => p1) || '';
let formulaPickerValue = value;
if (this.props.evalMode) {
formulaPickerValue =
value?.replace(/^\$\{(.*)\}$/, (match: string, p1: string) => p1) || '';
}
this.setState({
formulaPickerValue
});