index.js 1.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  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. icon: String,
  11. color: String,
  12. plain: Boolean,
  13. block: Boolean,
  14. round: Boolean,
  15. square: Boolean,
  16. loading: Boolean,
  17. hairline: Boolean,
  18. disabled: Boolean,
  19. loadingText: String,
  20. type: {
  21. type: String,
  22. value: 'default'
  23. },
  24. size: {
  25. type: String,
  26. value: 'normal'
  27. },
  28. loadingSize: {
  29. type: String,
  30. value: '20px'
  31. }
  32. },
  33. methods: {
  34. onClick: function () {
  35. if (!this.data.disabled && !this.data.loading) {
  36. this.$emit('click');
  37. }
  38. }
  39. }
  40. });