import { CustomOptionsSetter } 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: CustomOptionsSetter, props: { showDefaultCheck: false, multiple: true, isRsSelect: true, items: [ { name: 'checked', title: '默认选中', type: 'boolean', }, { name: 'label', title: '显示值', type: 'string', }, { name: 'value', title: '选项值', type: 'number', }, { name: 'disabled', title: '是否禁用', supportVariable: true, type: 'boolean', }, ], }, initialValue: (options: any) => { return { label: '选项名', value: options.length || 0, checked: false, disabled: false, }; }, }, };