import type { CrudSchema } from '@/hooks/web/useCrudSchemas' // 表单校验 export const BarcodeRules = reactive({ code: [required], order: [required], length: [required], prefixLenght: [required], entityProperties: [required], trimEnd: [required], isEncypt: [required], }) export const Barcode = useCrudSchemas(reactive([ { label: 'id', field: 'id', sort: 'custom', isForm: false, }, { label: '代码', field: 'code', sort: 'custom', isSearch: true, }, { label: '名称', field: 'name', sort: 'custom', isSearch: true, }, { label: '描述', field: 'description', sort: 'custom', isSearch: true, }, { label: '顺序', field: 'order', sort: 'custom', form: { component: 'InputNumber', value: 0 }, }, { label: '长度', field: 'length', sort: 'custom', form: { component: 'InputNumber', value: 0 }, }, { label: '前缀长度', field: 'prefixLenght', sort: 'custom', form: { component: 'InputNumber', value: 0 }, }, { label: '前缀字符', field: 'prefixChar', sort: 'custom', }, { label: '实体属性', field: 'entityProperties', sort: 'custom', }, { label: '加密方法', field: 'encyptMethod', sort: 'custom', }, { label: '主表ID', field: 'masterId', sort: 'custom', form: { component: 'InputNumber', value: 0 }, }, { label: '截断尾部空格', field: 'trimEnd', sort: 'custom', }, { label: '是否加密', field: 'isEncypt', sort: 'custom', }, { label: '操作', field: 'action', isForm: false, table: { width: 150, fixed: 'right' } } ]))