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