index.js 1001 B

1234567891011121314151617181920212223242526272829303132333435363738
  1. "use strict";
  2. Object.defineProperty(exports, "__esModule", { value: true });
  3. var component_1 = require("../common/component");
  4. var button_1 = require("../mixins/button");
  5. var open_type_1 = require("../mixins/open-type");
  6. component_1.VantComponent({
  7. mixins: [button_1.button, open_type_1.openType],
  8. classes: ['hover-class', 'loading-class'],
  9. props: {
  10. plain: Boolean,
  11. block: Boolean,
  12. round: Boolean,
  13. square: Boolean,
  14. loading: Boolean,
  15. hairline: Boolean,
  16. disabled: Boolean,
  17. loadingText: String,
  18. type: {
  19. type: String,
  20. value: 'default'
  21. },
  22. size: {
  23. type: String,
  24. value: 'normal'
  25. },
  26. loadingSize: {
  27. type: String,
  28. value: '20px'
  29. }
  30. },
  31. methods: {
  32. onClick: function () {
  33. if (!this.data.disabled && !this.data.loading) {
  34. this.$emit('click');
  35. }
  36. }
  37. }
  38. });