Commit 20bbafde9f231c1d5cef318fe4bd0c26ca99fa79
1 parent
b6a35c39
1.处理格式不正确翻译
Showing
1 changed file
with
3 additions
and
2 deletions
src/components/Common/CommonComponent/index.js
| ... | ... | @@ -340,6 +340,7 @@ export default class CommonComponent extends Component { |
| 340 | 340 | const sDateFormatTypeList = ['phone', 'mobile', 'mail', 'postcode']; |
| 341 | 341 | const { sName, showName, sDateFormat } = this.props.showConfig; |
| 342 | 342 | const { record } = this.props; |
| 343 | + const IncorrectFormat = commonFunc.showLocalMessage(this.props, 'IncorrectFormat', '格式不正确'); | |
| 343 | 344 | const value = record[sName]; |
| 344 | 345 | if ( |
| 345 | 346 | value !== undefined && value !== '' && sDateFormatTypeList.includes(sDateFormat) |
| ... | ... | @@ -372,8 +373,8 @@ export default class CommonComponent extends Component { |
| 372 | 373 | } |
| 373 | 374 | |
| 374 | 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 | 378 | } else if (record.verificationFailed) { |
| 378 | 379 | record.verificationFailed = undefined; |
| 379 | 380 | } | ... | ... |