data.tsx 1.05 KB
import { FormSchema } from '/@/components/Form';
import {findDictItemByCode} from "/@/api/system/dict";

export const step1Schemas: FormSchema[] = [
  {
    field: 'icon',
    label: '设备图片: ',
    slot: 'iconSelect',
    component: 'Input',
  },
  {
    field: 'name',
    label: '设备名称',
    required: true,
    component:'Input',
    componentProps:{
      maxLength:30
    }
  },
  {
    field: 'deviceType',
    label: '设备类型',
    required: true,
    component: 'ApiSelect',
    componentProps: {
      api:findDictItemByCode,
      params:{
        dictCode:"device_type"
      },
      labelField:'itemText',
      valueField:'itemValue',
    },
  },
  {
    field: 'label',
    label: '设备标签',
    component:'Input',
    componentProps:{
      maxLength:255
    }
  },
  {
    label: '备注',
    field: 'remark',
    component: 'InputTextArea',
  }
];

export const step2Schemas: FormSchema[] = [
  {
    field: 'pwd',
    component: 'InputPassword',
    label: '支付密码',
    required: true,
    defaultValue: '123456',
  },
];