399f3094d6948893eb24e97b537873fd567d8f7c1efe0eddb9f8e27cefcaf2e5ba607b4727532622002ccf59731c42144e2b890b8f27c92688e9059730886f 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  1. import { Loading } from '@element-plus/icons-vue';
  2. import { buildProps, definePropType } from '../../../utils/vue/props/runtime.mjs';
  3. import { useSizeProp } from '../../../hooks/use-size/index.mjs';
  4. import { iconPropType } from '../../../utils/vue/icon.mjs';
  5. const buttonTypes = [
  6. "default",
  7. "primary",
  8. "success",
  9. "warning",
  10. "info",
  11. "danger",
  12. "text",
  13. ""
  14. ];
  15. const buttonNativeTypes = ["button", "submit", "reset"];
  16. const buttonProps = buildProps({
  17. size: useSizeProp,
  18. disabled: Boolean,
  19. type: {
  20. type: String,
  21. values: buttonTypes,
  22. default: ""
  23. },
  24. icon: {
  25. type: iconPropType
  26. },
  27. nativeType: {
  28. type: String,
  29. values: buttonNativeTypes,
  30. default: "button"
  31. },
  32. loading: Boolean,
  33. loadingIcon: {
  34. type: iconPropType,
  35. default: () => Loading
  36. },
  37. plain: {
  38. type: Boolean,
  39. default: void 0
  40. },
  41. text: {
  42. type: Boolean,
  43. default: void 0
  44. },
  45. link: Boolean,
  46. bg: Boolean,
  47. autofocus: Boolean,
  48. round: {
  49. type: Boolean,
  50. default: void 0
  51. },
  52. circle: Boolean,
  53. color: String,
  54. dark: Boolean,
  55. autoInsertSpace: {
  56. type: Boolean,
  57. default: void 0
  58. },
  59. tag: {
  60. type: definePropType([String, Object]),
  61. default: "button"
  62. }
  63. });
  64. const buttonEmits = {
  65. click: (evt) => evt instanceof MouseEvent
  66. };
  67. export { buttonEmits, buttonNativeTypes, buttonProps, buttonTypes };
  68. //# sourceMappingURL=button2.mjs.map