map.js 1.29 KB
Newer Older
ddcat1115's avatar
ddcat1115 committed
1
import React from 'react';
jim's avatar
jim committed
2
import { Icon } from 'antd';
ddcat1115's avatar
ddcat1115 committed
3 4
import styles from './index.less';

jim's avatar
jim committed
5
export default {
ddcat1115's avatar
ddcat1115 committed
6 7 8
  UserName: {
    props: {
      size: 'large',
ι™ˆεΈ…'s avatar
ι™ˆεΈ… committed
9
      id: 'userName',
ddcat1115's avatar
ddcat1115 committed
10 11 12
      prefix: <Icon type="user" className={styles.prefixIcon} />,
      placeholder: 'admin',
    },
jim's avatar
jim committed
13 14 15 16 17 18
    rules: [
      {
        required: true,
        message: 'Please enter username!',
      },
    ],
ddcat1115's avatar
ddcat1115 committed
19 20 21 22 23 24
  },
  Password: {
    props: {
      size: 'large',
      prefix: <Icon type="lock" className={styles.prefixIcon} />,
      type: 'password',
ι™ˆεΈ…'s avatar
ι™ˆεΈ… committed
25
      id: 'password',
ddcat1115's avatar
ddcat1115 committed
26 27
      placeholder: '888888',
    },
jim's avatar
jim committed
28 29 30 31 32 33
    rules: [
      {
        required: true,
        message: 'Please enter password!',
      },
    ],
ddcat1115's avatar
ddcat1115 committed
34 35 36 37 38
  },
  Mobile: {
    props: {
      size: 'large',
      prefix: <Icon type="mobile" className={styles.prefixIcon} />,
39
      placeholder: 'mobile number',
ddcat1115's avatar
ddcat1115 committed
40
    },
jim's avatar
jim committed
41 42 43 44 45 46 47 48 49 50
    rules: [
      {
        required: true,
        message: 'Please enter mobile number!',
      },
      {
        pattern: /^1\d{10}$/,
        message: 'Wrong mobile number format!',
      },
    ],
ddcat1115's avatar
ddcat1115 committed
51 52 53 54 55
  },
  Captcha: {
    props: {
      size: 'large',
      prefix: <Icon type="mail" className={styles.prefixIcon} />,
56
      placeholder: 'captcha',
ddcat1115's avatar
ddcat1115 committed
57
    },
jim's avatar
jim committed
58 59 60 61 62 63
    rules: [
      {
        required: true,
        message: 'Please enter Captcha!',
      },
    ],
ddcat1115's avatar
ddcat1115 committed
64 65
  },
};