popconfirm.d.ts 4.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127
  1. import { IconPropType } from "../../../utils/vue/icon.js";
  2. import { EpPropFinalized, EpPropMergeType } from "../../../utils/vue/props/types.js";
  3. import "../../../utils/index.js";
  4. import { PopperEffect } from "../../popper/src/popper.js";
  5. import { Measurable } from "../../popper/src/constants.js";
  6. import { ButtonType } from "../../button/src/button.js";
  7. import "../../button/index.js";
  8. import { ElTooltipTriggerProps } from "../../tooltip/src/trigger.js";
  9. import { ElTooltipContentProps } from "../../tooltip/src/content.js";
  10. import "../../tooltip/index.js";
  11. import { _default } from "./popconfirm.vue.js";
  12. import "../../../index.js";
  13. import * as vue from "vue";
  14. import { ExtractPublicPropTypes } from "vue";
  15. //#region ../../packages/components/popconfirm/src/popconfirm.d.ts
  16. interface PopconfirmProps {
  17. /**
  18. * @description Title
  19. */
  20. title?: string;
  21. /**
  22. * @description Confirm button text
  23. */
  24. confirmButtonText?: string;
  25. /**
  26. * @description Cancel button text
  27. */
  28. cancelButtonText?: string;
  29. /**
  30. * @description Confirm button type
  31. */
  32. confirmButtonType?: ButtonType;
  33. /**
  34. * @description Cancel button type
  35. */
  36. cancelButtonType?: ButtonType;
  37. /**
  38. * @description Icon Component
  39. */
  40. icon?: IconPropType;
  41. /**
  42. * @description Icon color
  43. */
  44. iconColor?: string;
  45. /**
  46. * @description is hide Icon
  47. */
  48. hideIcon?: boolean;
  49. /**
  50. * @description delay of disappear, in millisecond
  51. */
  52. hideAfter?: number;
  53. /**
  54. * @description Tooltip theme, built-in theme: `dark` / `light`
  55. */
  56. effect?: ElTooltipContentProps['effect'];
  57. /**
  58. * @description whether popconfirm is teleported to the body
  59. */
  60. teleported?: ElTooltipContentProps['teleported'];
  61. /**
  62. * @description when popconfirm inactive and `persistent` is `false` , popconfirm will be destroyed
  63. */
  64. persistent?: ElTooltipContentProps['persistent'];
  65. /**
  66. * @description popconfirm width, min width 150px
  67. */
  68. width?: string | number;
  69. /**
  70. * @description Indicates whether virtual triggering is enabled
  71. */
  72. virtualTriggering?: ElTooltipTriggerProps['virtualTriggering'];
  73. /**
  74. * @description Indicates the reference element to which the popper is attached
  75. */
  76. virtualRef?: ElTooltipTriggerProps['virtualRef'];
  77. }
  78. /**
  79. * @deprecated Removed after 3.0.0, Use `PopconfirmProps` instead.
  80. */
  81. declare const popconfirmProps: {
  82. readonly title: StringConstructor;
  83. readonly confirmButtonText: StringConstructor;
  84. readonly cancelButtonText: StringConstructor;
  85. readonly confirmButtonType: EpPropFinalized<StringConstructor, "" | "default" | "info" | "primary" | "success" | "warning" | "text" | "danger", unknown, "primary", boolean>;
  86. readonly cancelButtonType: EpPropFinalized<StringConstructor, "" | "default" | "info" | "primary" | "success" | "warning" | "text" | "danger", unknown, "text", boolean>;
  87. readonly icon: EpPropFinalized<(new (...args: any[]) => (string | vue.Component) & {}) | (() => string | vue.Component) | ((new (...args: any[]) => (string | vue.Component) & {}) | (() => string | vue.Component))[], unknown, unknown, () => any, boolean>;
  88. readonly iconColor: EpPropFinalized<StringConstructor, unknown, unknown, "#f90", boolean>;
  89. readonly hideIcon: BooleanConstructor;
  90. readonly hideAfter: EpPropFinalized<NumberConstructor, unknown, unknown, 200, boolean>;
  91. readonly effect: {
  92. readonly default: "light";
  93. readonly type: vue.PropType<EpPropMergeType<(new (...args: any[]) => string) | (() => PopperEffect) | ((new (...args: any[]) => string) | (() => PopperEffect))[], unknown, unknown>>;
  94. readonly required: false;
  95. readonly validator: ((val: unknown) => boolean) | undefined;
  96. readonly __epPropKey: true;
  97. };
  98. readonly teleported: EpPropFinalized<BooleanConstructor, unknown, unknown, true, boolean>;
  99. readonly persistent: BooleanConstructor;
  100. readonly width: EpPropFinalized<readonly [StringConstructor, NumberConstructor], unknown, unknown, 150, boolean>;
  101. readonly virtualTriggering: BooleanConstructor;
  102. readonly virtualRef: {
  103. readonly type: vue.PropType<Measurable>;
  104. readonly required: false;
  105. readonly validator: ((val: unknown) => boolean) | undefined;
  106. __epPropKey: true;
  107. };
  108. };
  109. declare const popconfirmEmits: {
  110. /**
  111. * @description triggers when click confirm button
  112. */
  113. confirm: (e: MouseEvent) => boolean;
  114. /**
  115. * @description triggers when click cancel button
  116. */
  117. cancel: (e: MouseEvent) => boolean;
  118. };
  119. type PopconfirmEmits = typeof popconfirmEmits;
  120. /**
  121. * @deprecated Removed after 3.0.0, Use `PopconfirmProps` instead.
  122. */
  123. type PopconfirmPropsPublic = ExtractPublicPropTypes<typeof popconfirmProps>;
  124. type PopconfirmInstance = InstanceType<typeof _default> & unknown;
  125. //#endregion
  126. export { PopconfirmEmits, PopconfirmInstance, PopconfirmProps, PopconfirmPropsPublic, popconfirmEmits, popconfirmProps };