props.d.ts 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. import { IBaseProps } from '../_util/base';
  2. /**
  3. * @description 可勾选列表
  4. */
  5. export interface ChecklistItem {
  6. /**
  7. * @description 可勾选项的描述文案
  8. */
  9. description?: string;
  10. /**
  11. * @description 可勾选项的图片地址
  12. */
  13. image?: string;
  14. /**
  15. * @description 可勾选项的标题文案
  16. */
  17. title: string;
  18. /**
  19. * @description 可勾选项的值
  20. */
  21. value: string | number;
  22. }
  23. interface IChecklistProps extends IBaseProps {
  24. /**
  25. * @description 默认值
  26. */
  27. value: Array<string | number> | string | number;
  28. /**
  29. * @description 默认值
  30. */
  31. defaultValue: Array<string | number> | string | number;
  32. /**
  33. * @description 是否支持多选
  34. * @default false
  35. */
  36. multiple: boolean;
  37. /**
  38. * @description 可勾选列表数据配置选项内容
  39. */
  40. options: Array<ChecklistItem>;
  41. /**
  42. * @description 可勾选列表值改变时触发
  43. */
  44. onChange: (v: Array<string | number> | string | number, item: ChecklistItem | Array<ChecklistItem>, e: Record<string, any>) => void;
  45. }
  46. export declare const ChecklistDefaultProps: Partial<IChecklistProps>;
  47. export {};