1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
| export function makeRequiredRule() {
| return {
| type: 'Required',
| field: 'formCreate$required',
| title: '是否必填'
| }
| }
|
| export const localeProps = (t, prefix, rules) => {
| return rules.map((rule) => {
| if (rule.field === 'formCreate$required') {
| rule.title = t('props.required') || rule.title
| } else if (rule.field && rule.field !== '_optionType') {
| rule.title = t('components.' + prefix + '.' + rule.field) || rule.title
| }
| return rule
| })
| }
|
|