index.js 666 B

123456789101112131415161718192021222324252627282930313233
  1. import { VantComponent } from '../common/component';
  2. import { GREEN, GRAY_DARK } from '../common/color';
  3. VantComponent({
  4. classes: ['desc-class'],
  5. props: {
  6. icon: String,
  7. steps: Array,
  8. active: Number,
  9. direction: {
  10. type: String,
  11. value: 'horizontal',
  12. },
  13. activeColor: {
  14. type: String,
  15. value: GREEN,
  16. },
  17. inactiveColor: {
  18. type: String,
  19. value: GRAY_DARK,
  20. },
  21. activeIcon: {
  22. type: String,
  23. value: 'checked',
  24. },
  25. inactiveIcon: String,
  26. },
  27. methods: {
  28. onClick(event) {
  29. const { index } = event.currentTarget.dataset;
  30. this.$emit('click-step', index);
  31. },
  32. },
  33. });