button.js 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143
  1. Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
  2. require("../../../_virtual/_rolldown/runtime.js");
  3. const require_runtime$1 = require("../../../utils/vue/props/runtime.js");
  4. const require_icon = require("../../../utils/vue/icon.js");
  5. const require_index = require("../../../hooks/use-size/index.js");
  6. let _element_plus_icons_vue = require("@element-plus/icons-vue");
  7. //#region ../../packages/components/button/src/button.ts
  8. const buttonTypes = [
  9. "default",
  10. "primary",
  11. "success",
  12. "warning",
  13. "info",
  14. "danger",
  15. "text",
  16. ""
  17. ];
  18. const buttonNativeTypes = [
  19. "button",
  20. "submit",
  21. "reset"
  22. ];
  23. /**
  24. * @deprecated Removed after 3.0.0, Use `ButtonProps` instead.
  25. */
  26. const buttonProps = require_runtime$1.buildProps({
  27. /**
  28. * @description button size
  29. */
  30. size: require_index.useSizeProp,
  31. /**
  32. * @description disable the button
  33. */
  34. disabled: {
  35. type: Boolean,
  36. default: void 0
  37. },
  38. /**
  39. * @description button type
  40. */
  41. type: {
  42. type: String,
  43. values: buttonTypes,
  44. default: ""
  45. },
  46. /**
  47. * @description icon component
  48. */
  49. icon: { type: require_icon.iconPropType },
  50. /**
  51. * @description native button type
  52. */
  53. nativeType: {
  54. type: String,
  55. values: buttonNativeTypes,
  56. default: "button"
  57. },
  58. /**
  59. * @description determine whether it's loading
  60. */
  61. loading: Boolean,
  62. /**
  63. * @description customize loading icon component
  64. */
  65. loadingIcon: {
  66. type: require_icon.iconPropType,
  67. default: () => _element_plus_icons_vue.Loading
  68. },
  69. /**
  70. * @description determine whether it's a plain button
  71. */
  72. plain: {
  73. type: Boolean,
  74. default: void 0
  75. },
  76. /**
  77. * @description determine whether it's a text button
  78. */
  79. text: {
  80. type: Boolean,
  81. default: void 0
  82. },
  83. /**
  84. * @description determine whether it's a link button
  85. */
  86. link: Boolean,
  87. /**
  88. * @description determine whether the text button background color is always on
  89. */
  90. bg: Boolean,
  91. /**
  92. * @description native button autofocus
  93. */
  94. autofocus: Boolean,
  95. /**
  96. * @description determine whether it's a round button
  97. */
  98. round: {
  99. type: Boolean,
  100. default: void 0
  101. },
  102. /**
  103. * @description determine whether it's a circle button
  104. */
  105. circle: Boolean,
  106. /**
  107. * @description determine whether it's a dashed button
  108. */
  109. dashed: {
  110. type: Boolean,
  111. default: void 0
  112. },
  113. /**
  114. * @description custom button color, automatically calculate `hover` and `active` color
  115. */
  116. color: String,
  117. /**
  118. * @description dark mode, which automatically converts `color` to dark mode colors
  119. */
  120. dark: Boolean,
  121. /**
  122. * @description automatically insert a space between two chinese characters
  123. */
  124. autoInsertSpace: {
  125. type: Boolean,
  126. default: void 0
  127. },
  128. /**
  129. * @description custom element tag
  130. */
  131. tag: {
  132. type: require_runtime$1.definePropType([String, Object]),
  133. default: "button"
  134. }
  135. });
  136. const buttonEmits = { click: (evt) => evt instanceof MouseEvent };
  137. //#endregion
  138. exports.buttonEmits = buttonEmits;
  139. exports.buttonNativeTypes = buttonNativeTypes;
  140. exports.buttonProps = buttonProps;
  141. exports.buttonTypes = buttonTypes;
  142. //# sourceMappingURL=button.js.map