Commit 20bbafde9f231c1d5cef318fe4bd0c26ca99fa79

Authored by Min
1 parent b6a35c39

1.处理格式不正确翻译

src/components/Common/CommonComponent/index.js
@@ -340,6 +340,7 @@ export default class CommonComponent extends Component { @@ -340,6 +340,7 @@ export default class CommonComponent extends Component {
340 const sDateFormatTypeList = ['phone', 'mobile', 'mail', 'postcode']; 340 const sDateFormatTypeList = ['phone', 'mobile', 'mail', 'postcode'];
341 const { sName, showName, sDateFormat } = this.props.showConfig; 341 const { sName, showName, sDateFormat } = this.props.showConfig;
342 const { record } = this.props; 342 const { record } = this.props;
  343 + const IncorrectFormat = commonFunc.showLocalMessage(this.props, 'IncorrectFormat', '格式不正确');
343 const value = record[sName]; 344 const value = record[sName];
344 if ( 345 if (
345 value !== undefined && value !== '' && sDateFormatTypeList.includes(sDateFormat) 346 value !== undefined && value !== '' && sDateFormatTypeList.includes(sDateFormat)
@@ -372,8 +373,8 @@ export default class CommonComponent extends Component { @@ -372,8 +373,8 @@ export default class CommonComponent extends Component {
372 } 373 }
373 374
374 if (flag) { 375 if (flag) {
375 - this.props.onChange(this.props.name, 'verificationFailed', { verificationFailed: true, verificationFailedMsg: `【${showName}】【${sName}】格式不正确!` }, this.props.sId, []);  
376 - message.warning(`【${showName}】【${sName}】格式不正确!`); 376 + this.props.onChange(this.props.name, 'verificationFailed', { verificationFailed: true, verificationFailedMsg: `【${showName}】【${sName}】${IncorrectFormat}!` }, this.props.sId, []);
  377 + message.warning(`【${showName}】【${sName}】${IncorrectFormat}!`);
377 } else if (record.verificationFailed) { 378 } else if (record.verificationFailed) {
378 record.verificationFailed = undefined; 379 record.verificationFailed = undefined;
379 } 380 }