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