import type { CrudSchema } from '@/hooks/web/useCrudSchemas' import { dateFormatter } from '@/utils/formatTime' const { t } = useI18n() // 国际化 /** * @returns {Array} 规则 */ export const Rule = useCrudSchemas(reactive([ { label: '策略代码', field: 'strategyCode', sort: 'custom', table: { fixed: 'left' }, isSearch:true }, { label: '优先级', field: 'priority', sort: 'custom', form: { component: 'InputNumber', componentProps: { min: 0 } }, }, // { // label: '代码', // field: 'code', // sort: 'custom', // isSearch:true // }, { label: '名称', field: 'name', sort: 'custom', isSearch:true }, { label: '条件', field: 'condition', sort: 'custom', }, { label: '配置', field: 'configuration', sort: 'custom', }, // { // label: '操作', // field: 'action', // isDetail: false, // isForm: false , // table: { // width: 150, // fixed: 'right' // } // } ])) //表单校验 export const RuleRules = reactive({ strategyCode: [ { required: true, message: '请输入策略代码', trigger: 'blur' } ], priority: [ { required: true, message: '请输入优先级', trigger: 'blur' } ], // code: [ // { required: true, message: '请输入代码', trigger: 'blur' } // ], configuration: [ { required: true, message: '请输入配置', trigger: 'blur' } ], })