props.d.ts 1021 B

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. import { IBaseProps } from '../_util/base';
  2. export interface IActionItem {
  3. text: string;
  4. icon: string;
  5. description?: string;
  6. danger?: boolean;
  7. disabled?: boolean;
  8. }
  9. /**
  10. * @description 头像,可展示头像以及用户名等简要信息。
  11. */
  12. export interface IActionSheetProps extends IBaseProps {
  13. /**
  14. * @description 标题
  15. * @default ""
  16. */
  17. title: string;
  18. /**
  19. * @description 面板选项列表
  20. * @default []
  21. */
  22. actions: IActionItem[];
  23. /**
  24. * @description 取消按钮文字
  25. * @default []
  26. */
  27. cancelText: string;
  28. /**
  29. * @description 是否显示
  30. * @default false
  31. */
  32. visible: boolean;
  33. /**
  34. * @description 点击选项时触发,禁用或加载状态下不会触发
  35. */
  36. onAction: (aciton: IActionItem, index: number, e: any) => void;
  37. /**
  38. * @description 关闭时触发
  39. */
  40. onClose: (e: any) => void;
  41. }
  42. export declare const ActionSheetDefaultProps: Partial<IActionSheetProps>;