tachybase_todo/docs/components/collection-fields/checkbox.md
2021-10-31 11:35:11 +08:00

603 B

Checkbox - 勾选

Interface

export const checkbox: FieldOptions = {
  name: 'checkbox',
  type: 'object',
  group: 'choices',
  order: 1,
  title: '勾选',
  default: {
    dataType: 'boolean',
    // name,
    uiSchema: {
      type: 'boolean',
      // title,
      'x-component': 'Checkbox',
      'x-decorator': 'FormItem',
      'x-designable-bar': 'Checkbox.DesignableBar',
    },
  },
  properties: {
    ...defaultProps,
  },
  operations: [
    { label: '是', value: '$isTruly', selected: true, noValue: true },
    { label: '否', value: '$isFalsy', noValue: true },
  ],
};