index.js 792B

12345678910111213141516171819202122232425262728293031323334
  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. });