config.ts 3.09 KB
Newer Older
hucy's avatar
hucy committed
1 2 3
export const form = [
  {
    fild: 'name',
hucy's avatar
hucy committed
4
    label: '姓名',
hucy's avatar
hucy committed
5 6
    col: 'col-6',
    type: 'text',
hucy's avatar
hucy committed
7
    required: true,
hucy's avatar
hucy committed
8
    bind: {
hucy's avatar
hucy committed
9
      readonly: true,
hucy's avatar
hucy committed
10 11 12 13 14 15 16 17
      filled: true,
      lazyRules: true,
      hideBottomSpace: true,
      rules: [(val: any) => (val && val.length > 0) || '必填'],
    },
  },
  {
    fild: 'password',
hucy's avatar
hucy committed
18
    label: '密码',
hucy's avatar
hucy committed
19 20
    col: 'col-6',
    type: 'password',
hucy's avatar
hucy committed
21
    isPwd: true,
hucy's avatar
hucy committed
22 23
    bind: {
      filled: true,
hucy's avatar
hucy committed
24 25 26
      // lazyRules: true,
      // hideBottomSpace: true,
      // rules: [(val: any) => (val && val.length > 0) || '必填'],
hucy's avatar
hucy committed
27 28 29 30 31
    },
  },
  {
    fild: 'age',
    col: 'col-6',
hucy's avatar
hucy committed
32
    label: '年龄',
hucy's avatar
hucy committed
33 34 35 36 37 38 39
    type: 'number',
    bind: {
      filled: true,
    },
  },
  {
    fild: 'country',
hucy's avatar
hucy committed
40
    label: '国家',
hucy's avatar
hucy committed
41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60
    col: 'col-6',
    type: 'select',
    bind: {
      filled: true,
      emitValue: true,
      mapOptions: true,
      options: [
        {
          label: '中国',
          value: 'china',
        },
        {
          label: '俄罗斯',
          value: 'russia',
        },
        {
          label: '法国',
          value: 'france',
        },
      ],
hucy's avatar
hucy committed
61 62 63
      // lazyRules: true,
      // hideBottomSpace: true,
      // rules: [(val: any) => (val && val.length > 0) || '必填'],
hucy's avatar
hucy committed
64 65 66 67 68
      clearable: true,
    },
  },
  {
    fild: 'quantity',
hucy's avatar
hucy committed
69
    label: '数量',
hucy's avatar
hucy committed
70 71 72 73 74 75 76
    col: 'col-6',
    type: 'number',
    bind: {
      filled: true,
    },
  },
  {
hucy's avatar
hucy committed
77
    solt: 'class',
hucy's avatar
hucy committed
78 79 80 81
    col: 'col-6',
  },
  {
    fild: 'remark',
hucy's avatar
hucy committed
82
    label: '备注',
hucy's avatar
hucy committed
83 84 85 86 87 88
    col: 'col-12',
    type: 'textarea',
    bind: {
      filled: true,
    },
  },
hucy's avatar
hucy committed
89
  {
hucy's avatar
hucy committed
90
    solt: 'workingDay',
hucy's avatar
hucy committed
91 92 93 94 95 96
    col: 'col-6',
  },
  {
    fild: 'date1',
    col: 'col-6',
    type: 'date',
hucy's avatar
hucy committed
97
    label: '日期1',
hucy's avatar
hucy committed
98 99 100 101 102 103 104 105
    bind: {
      filled: true,
      clearable: true,
      dateMask: 'YYYY-MM-DD HH:mm:ss',
    },
  },
  {
    fild: 'date2',
hucy's avatar
hucy committed
106
    label: '日期2',
hucy's avatar
hucy committed
107 108 109 110 111 112 113 114 115 116
    col: 'col-6',
    type: 'date',
    bind: {
      filled: true,
      clearable: true,
      dateMask: 'YYYY-MM-DD',
    },
  },
  {
    fild: 'dateMultiple',
hucy's avatar
hucy committed
117
    label: '日期多选',
hucy's avatar
hucy committed
118 119 120 121 122 123 124 125 126 127
    col: 'col-6',
    type: 'dateMultiple',
    bind: {
      filled: true,
      clearable: true,
      dateMask: 'YYYY/MM/DD',
    },
  },
  {
    fild: 'dateRange',
hucy's avatar
hucy committed
128
    label: '日期范围',
hucy's avatar
hucy committed
129 130 131
    col: 'col-6',
    type: 'dateRange',
    bind: {
hucy's avatar
hucy committed
132 133 134 135 136 137 138 139 140 141 142 143
      filled: true,
      clearable: true,
      dateMask: 'YYYY-MM-DD',
    },
  },
  {
    fild: 'dateRangeMultiple',
    label: '日期范围多选',
    col: 'col-6',
    type: 'dateRange',
    bind: {
      multiple: true,
hucy's avatar
hucy committed
144 145 146 147 148 149 150
      filled: true,
      clearable: true,
      dateMask: 'YYYY/MM/DD',
    },
  },
  {
    fild: 'time1',
hucy's avatar
hucy committed
151
    label: '时间1',
hucy's avatar
hucy committed
152 153 154 155 156
    col: 'col-6',
    type: 'time',
    bind: {
      filled: true,
      clearable: true,
hucy's avatar
hucy committed
157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179
      timeMask: 'HH:mm:ss',
    },
  },
  {
    fild: 'colorPick',
    label: '选取颜色',
    col: 'col-6',
    type: 'color',
    bind: {
      filled: true,
      clearable: true,
    },
  },
  {
    fild: 'colorPick2',
    label: '选取颜色2',
    col: 'col-6',
    type: 'color',
    bind: {
      filled: true,
      clearable: true,
      defaultView: 'palette',
      palette: [],
hucy's avatar
hucy committed
180 181
    },
  },
hucy's avatar
hucy committed
182
];