button.js 1.6 KB

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