import { StatusValue } from '@/constants'; import { StatusOptionsSetter } from 'lowcode/_setters'; export default { name: 'customOptions', title: { label: { type: 'i18n', zh_CN: '自定义选项', en_US: 'customOptions', }, tip: { type: 'i18n', zh_CN: '属性: customOptions | 说明: 自定义选项', en_US: 'prop: customOptions | description: Custom options', }, }, supportVariable: false, type: 'field', display: 'block', setter: { componentName: StatusOptionsSetter, props: { items: [ { name: 'label', title: '显示值', type: 'string', }, { name: 'value', title: '选项值', type: 'number', }, { name: 'status', title: '状态', type: 'select', options: [ { value: StatusValue.NORMAL, label: '正常', }, { value: StatusValue.EXCEPTION, label: '异常', }, { value: StatusValue.COMPLETED, label: '完结', }, ], }, ], }, initialValue: () => { return { label: '选项名', value: 0, status: 0, }; }, }, };